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