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

Java Stored procedure

P: n/a
Uma
DB2I.PROCEDURE1 - Build started.
C:\SQLLIB\java\jdk\bin\javac -classpath
".;C:\SQLLIB\java\db2java.zip;C:\SQLLIB\java\runti me.zip;C:\SQLLIB\java\sqlj.zip"
"PROCEDURE1.java"
DB2I.PROCEDURE1 - Javac completed.
C:\SQLLIB\java\jdk\bin\jar cf SQL40620024042610.jar PROCEDURE1.class
DB2I.PROCEDURE1 - Jar file created.
Call sqlj.install_jar ('file:///C|/Documents and
Settings/Utalasila/Application
Data/IBM/DB2/DC/Projects/bld1090352445660/SQL40620024042610.jar',
'"DB2I".SQL40620024042610', 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
Nov 12 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
aka
just a guess, but possibly this helps:

E:\sqllib\BIN>db2 ? 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.zip" 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_jar fails due to lack of jre...
"Uma" <ta******@hotmail.com> schrieb im Newsbeitrag
news:fd**************************@posting.google.c om...
DB2I.PROCEDURE1 - Build started.
C:\SQLLIB\java\jdk\bin\javac -classpath
".;C:\SQLLIB\java\db2java.zip;C:\SQLLIB\java\runti me.zip;C:\SQLLIB\java\sqlj
..zip" "PROCEDURE1.java"
DB2I.PROCEDURE1 - Javac completed.
C:\SQLLIB\java\jdk\bin\jar cf SQL40620024042610.jar PROCEDURE1.class
DB2I.PROCEDURE1 - Jar file created.
Call sqlj.install_jar ('file:///C|/Documents and
Settings/Utalasila/Application
Data/IBM/DB2/DC/Projects/bld1090352445660/SQL40620024042610.jar',
'"DB2I".SQL40620024042610', 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

Nov 12 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.