Java Stored procedure

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

    Java Stored procedure

    DB2I.PROCEDURE1 - Build started.
    C:\SQLLIB\java\ jdk\bin\javac -classpath
    ".;C:\SQLLIB\ja va\db2java.zip; C:\SQLLIB\java\ runtime.zip;C:\ SQLLIB\java\sql j.zip"
    "PROCEDURE1.jav a"
    DB2I.PROCEDURE1 - Javac completed.
    C:\SQLLIB\java\ jdk\bin\jar cf SQL406200240426 10.jar PROCEDURE1.clas s
    DB2I.PROCEDURE1 - Jar file created.
    Call sqlj.install_ja r ('file:///C|/Documents and
    Settings/Utalasila/Application
    Data/IBM/DB2/DC/Projects/bld109035244566 0/SQL406200240426 10.jar',
    '"DB2I".SQL4062 0024042610', 0)
    [IBM][CLI Driver][DB2/NT] SQL4301N Java interpreter startup or
    communication failed, reason code "-4301". SQLSTATE=58004

    DB2I.PROCEDURE1 - Build failed.
    DB2I.PROCEDURE1 - Roll back completed successfully.


    Iam getting this error , when I tried to compile Java stored
    procedure..

    [IBM][CLI Driver][DB2/NT] SQL4301N Java interpreter startup or
    communication failed, reason code "-4301". SQLSTATE=58004




    I am using DB2 UDB8.1 Fixpack 6 on windows 2000


    Thanks
    Uma
  • aka

    #2
    Re: Java Stored procedure

    just a guess, but possibly this helps:

    E:\sqllib\BIN>d b2 ? sql4301n


    SQL4301N Java or .NET interpreter startup or communication
    failed, reason code "<reason-code>".

    Explanation:

    An error occurred while attempting to start or communicate with a
    Java interpreter. The reason codes are:


    1 Java environment variables or Java database configuration
    parameters are invalid.

    2 A Java Native Interface call to the Java interpreter failed.

    3 The "db2java.zi p" file may be corrupt or missing.

    4 The Java interpreter has terminated itself and cannot be
    restarted.

    5 Unable to load a dependent .NET library.

    6 A call to the .NET interpreter failed.

    User Response:

    For Java, ensure that the Java database configuration parameters
    (jdk_path and java_heap_sz) are correctly set. Ensure that a
    supported Java runtime environment is installed. Ensure that
    internal DB2 classes (COM.ibm.db2) are not overridden by user
    classes.

    For .NET, ensure that the DB2 instance is configured correctly
    to run a .NET procedure or function (mscoree.dll must be present
    in the system PATH). Ensure that db2clr.dll is present in the
    sqllib/bin directory, and that IBM.Data.DB2 is installed in the
    global assembly cache.

    sqlcode : -4301

    sqlstate : 58004


    As I assume from your output you probably didn't set up PATH and CLASSPATH
    variables, and because of that the db2 java stored procedure
    sqlj.install_ja r fails due to lack of jre...


    "Uma" <talashil@hotma il.com> schrieb im Newsbeitrag
    news:fd3302b1.0 407201144.71fa5 3aa@posting.goo gle.com...[color=blue]
    > DB2I.PROCEDURE1 - Build started.
    > C:\SQLLIB\java\ jdk\bin\javac -classpath
    >[/color]
    ".;C:\SQLLIB\ja va\db2java.zip; C:\SQLLIB\java\ runtime.zip;C:\ SQLLIB\java\sql j
    ..zip"[color=blue]
    > "PROCEDURE1.jav a"
    > DB2I.PROCEDURE1 - Javac completed.
    > C:\SQLLIB\java\ jdk\bin\jar cf SQL406200240426 10.jar PROCEDURE1.clas s
    > DB2I.PROCEDURE1 - Jar file created.
    > Call sqlj.install_ja r ('file:///C|/Documents and
    > Settings/Utalasila/Application
    > Data/IBM/DB2/DC/Projects/bld109035244566 0/SQL406200240426 10.jar',
    > '"DB2I".SQL4062 0024042610', 0)
    > [IBM][CLI Driver][DB2/NT] SQL4301N Java interpreter startup or
    > communication failed, reason code "-4301". SQLSTATE=58004
    >
    > DB2I.PROCEDURE1 - Build failed.
    > DB2I.PROCEDURE1 - Roll back completed successfully.
    >
    >
    > Iam getting this error , when I tried to compile Java stored
    > procedure..
    >
    > [IBM][CLI Driver][DB2/NT] SQL4301N Java interpreter startup or
    > communication failed, reason code "-4301". SQLSTATE=58004
    >
    >
    >
    >
    > I am using DB2 UDB8.1 Fixpack 6 on windows 2000
    >
    >
    > Thanks
    > Uma[/color]


    Comment

    Working...