× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



It is clear from your second error that you have no authority to do that specific folder access.

I normally put my User defined java classes in my own classpath.. And set the path before invoking it.


-----Original Message-----
From: java400-l-bounces@xxxxxxxxxxxx [mailto:java400-l-bounces@xxxxxxxxxxxx] On Behalf Of Derek Chow
Sent: 15 September 2010 23:11
To: java400-l@xxxxxxxxxxxx
Subject: Issue on calling Java stored Procedure

Hi All,

I created a Java stored procedure and ran into issue when calling it with iSeries Navigator.

If I put the StoredProc.class file directly inside '/QIBM/UserData/OS400/SQLLib/Function' folder, I received the following error:

SQL State: 42724
Vendor Code: -4304
Message: [SQL4304] Java stored procedure or user-defined function GETIFSCNT, specific name GETIFSCNT could not load Java class StoredProc for reason code 1. Cause . . . . . : The Java class given by the EXTERNAL NAME clause of a CREATE PROCEDURE or CREATE FUNCTION statement could not be loaded. The reason codes and their meanings follow: 1 -- The class was not found on the CLASSPATH. 2 -- The class did not implement the required interface ("com.ibm.db2.app.StoredProc" or "com.ibm.db2.app.UDF") or lacked the Java "public" access flag. 3 -- The default constructor failed or was unavailable. Recovery . . . : Ensure that the compiled ".class" file is installed in the CLASSPATH, for example under "/QIBM/UserData/OS400/SQLLib/Function". Ensure it implements the required Java interfaces and is "public".

If I created a subfolder 'StoredProc' inside the '/QIBM/UserData/OS400/SQLLib/Function' folder and then put the 'StoredProc.class' file inside the subfolder to avoid the classpath issue (suggested by a post in this forum), I received the following error:

SQL State: 42501
Vendor Code: -551
Message: [SQL0551] Not authorized to object StoredProc.getIFSObjCount in /QIBM/UserData/OS400/SQLLib/Function type *N. Cause . . . . . : An operation was attempted on object StoredProc.getIFSObjCount in /QIBM/UserData/OS400/SQLLib/Function type *N. This operation cannot be performed without the required authority. Recovery . . . : Obtain the required authority from either the security officer or the object owner. If you are not authorized to a logical file, obtain the authority to the based-on files of the logical file. Try the operation again.

It is a Java parameter style stored procedure. I checked the parameters and they should be correct. The '/QIBM/UserData/OS400/SQLLib/Function' path was added in the CLASSPATH environment variable (*SYS level). Any suggestion to resolve the issue? Please advise.

Thanks,
Derek

--
This is the Java Programming on and around the IBM i (JAVA400-L) mailing list To post a message email: JAVA400-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/java400-l
or email: JAVA400-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/java400-l.



Consider the environment and think before you print this email.

Registered Address: Fortis House Tollgate Eastleigh Hampshire SO53 3YA Registered Number: 354568 England
Authorised and regulated by the Financial Services Authority

This e-mail together with any attachments are intended for the addressee only and may be private and confidential. If you are not the intended recipient, or the person responsible for delivering it to the intended recipient, you must not open any attachments, or copy, disclose, distribute, retain or use this e-mail, including any attachments, in any way whatsoever; please return it to us immediately using the reply facility on e-mail.

Consider the environment and think before you print this email.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.