By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,287 Members | 1,284 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,287 IT Pros & Developers. It's quick & easy.

Java and procedures

P: n/a
bea
Hi.

I'm trying to call a stored procedure and it executes a external Java
class but I have this error:

SQL4304N Java stored procedure or user-defined function "SENDMAIL",
specific name "SQL070306100655300" could not load Java class
"PKG70206092310980/Enviacorreo", reason code "1". SQLSTATE=42724

Can you help me?

Thank you.

Mar 7 '07 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Ray
On Mar 7, 7:58 am, "bea" <mbeatrizrodrig...@gmail.comwrote:
Hi.

I'm trying to call a stored procedure and it executes a external Java
class but I have this error:

SQL4304N Java stored procedure or user-defined function "SENDMAIL",
specific name "SQL070306100655300" could not load Java class
"PKG70206092310980/Enviacorreo", reason code "1". SQLSTATE=42724

Can you help me?

Thank you.
The best thing to do first is ask DB2.

db2 =? SQL4304
SQL4304N Java stored procedure or user-defined function
"<name>", specific name "<spec-name>" could not load
Java class "<class>", reason code "<reason-code>".

Explanation:

The Java class given by the EXTERNAL NAME clause of a CREATE
PROCEDURE or CREATE FUNCTION statement could not be loaded. The
reason codes are:
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.

4 Could not load driver for "jdbc:default:connection".

5 Could not establish default context.

User Response:

Ensure that the compiled ".class" file is installed in the
CLASSPATH, for example under "sqllib/function". Ensure it
implements the required Java interfaces and is "public".

sqlcode : -4304

sqlstate : 42724

Mar 7 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.