Hi,
I'm writing my first java stored proc. At this stage I'm just trying to get a stub example to build correctly. Below is the actual procedure:
Code:
package org.xenbase.database.proc;
import java.sql.*;
public class ALL_ALIGNED_PROBES_MQT_REFRESH
{
public static void ALL_ALIGNED_PROBES_MQT_REFRESH() throws SQLException, Exception
{}
}
When I try to build the code in my DB2 Dev center (running on XP), I get the following message output:
DB2INST1.ALL_ALIGNED_PROBES_MQT_REFRESH - Build started.
C:\PROGRA~1\IBM\SQLLIB\java\jdk\bin\javac -classpath ".;C:\PROGRA~1\IBM\SQLLIB\java\db2java.zip;C:\PROG RA~1\IBM\SQLLIB\java\runtime.zip;C:\PROGRA~1\IBM\S QLLIB\java\sqlj.zip" org\xenbase\database\proc\ALL_ALIGNED_PROBES_MQT_R EFRESH.java
DB2INST1.ALL_ALIGNED_PROBES_MQT_REFRESH - Javac completed.
C:\PROGRA~1\IBM\SQLLIB\java\jdk\bin\jar cf SQL90412031809470.jar org\xenbase\database\proc\ALL_ALIGNED_PROBES_MQT_R EFRESH.class
DB2INST1.ALL_ALIGNED_PROBES_MQT_REFRESH - Jar file created.
Call SQLJ.DB2_INSTALL_JAR (<<C:\Documents and Settings\jarabek\Application Data\IBM\DB2\DC\Projects\bld1242249204970\SQL90412 031809470.jar>>, 'DB2INST1.SQL90412031809470', 0)
[IBM][CLI Driver][DB2/LINUX] SQL4301N Java or .NET interpreter startup or communication failed, reason code "2". SQLSTATE=58004
DB2INST1.ALL_ALIGNED_PROBES_MQT_REFRESH - Build failed.
DB2INST1.ALL_ALIGNED_PROBES_MQT_REFRESH - Roll back completed successfully.
I believe the key message in this error is:
SQL4301N Java or .NET interpreter startup or communication failed, reason code "2". SQLSTATE=58004 DB2 info center says code 2 means "A Java Native Interface call to the Java interpreter failed". So for starters I don't even know what that error means, so obviously I'm stumped as to how to solve it.
Given that I've written the procedure on my windows machine, but DB2 dev. center displays the stored procedure as being on the database which is on a linux server, I'm unclear as to where the procedure is being compiled / run.
Here is the db2 server information:
DB21085I Instance "db2inst1" uses "32" bits and DB2 code release "SQL08027"
with level identifier "03080106".
Informational tokens are "DB2 v8.1.0.128", "s061108", "MI00175", and FixPak
"14".
Product is installed at "/opt/IBM/db2/V8.1".
All of the threads on this forum that seem to reference a similar problem seem to make reference to a setting called JDK11_PATH in the dbm cfg file. I don't appear to have any setting. The closest that exists on our server is: (JDK_PATH) = /opt/IBMJava2-141
Any advice would be really appreciated.
Sincerely,
Jarabek