Java and procedures

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • bea

    #1

    Java and procedures

    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 "SQL07030610065 5300" could not load Java class
    "PKG70206092310 980/Enviacorreo", reason code "1". SQLSTATE=42724

    Can you help me?

    Thank you.

  • Ray

    #2
    Re: Java and procedures

    On Mar 7, 7:58 am, "bea" <mbeatrizrodrig ...@gmail.comwr ote:
    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 "SQL07030610065 5300" could not load Java class
    "PKG70206092310 980/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.a pp.StoredProc" or "COM.ibm.db2.ap p.UDF") or lacked
    the Java "public" access flag.

    3 The default constructor failed or was unavailable.

    4 Could not load driver for "jdbc:default:c onnection".

    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

    Comment

    Working...