473,231 Members | 1,556 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,231 software developers and data experts.

development center build fails


I have DB2 8.1 FP7, when I try to build a Java stored procedure it fails
during a call to DB2_REPLACE_JAR. Even the build folder "bld1096553970703"
is not there - it has a different name,

regards,
Hubert

DB2ADMIN.PROCEDURE2 - Build started.
DROP SPECIFIC PROCEDURE DB2ADMIN.SQL030805133228210
DB2ADMIN.PROCEDURE2 - Drop stored procedure completed.
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";"c:\jt400.jar"
procedure22.java
DB2ADMIN.PROCEDURE2 - Javac completed.
C:\PROGRA~1\IBM\SQLLIB\java\jdk\bin\jar cf SQL30705013217030.jar
procedure22.class
DB2ADMIN.PROCEDURE2 - Jar file created.
Call SQLJ.DB2_REPLACE_JAR (<<C:\Documents and
Settings\db2admin\Application
Data\IBM\DB2\DC\Projects\bld1096553970703\SQL30705 013217030.jar>>,
'DB2ADMIN.SQL30705013217030')
[IBM][CLI Driver][DB2/NT] SQL0444N Routine "SQLJ.DB2_REPLACE_JAR"
(specific name "") is implemented with code in library or path "",
function "" which cannot be accessed. Reason code: "". SQLSTATE=42724

DB2ADMIN.PROCEDURE2 - Build failed.
DB2ADMIN.PROCEDURE2 - Roll back completed successfully.

Nov 12 '05 #1
2 3579
The stored procedure builder and related tools were rebuilt in V82 to
use the Java JCC driver instead of the old JDBC. Due to some
limitations of JCC, DB2 had to implement some cataloged versions of the
SQLJ-schema functions (install_jar, replace_jar) that took BLOB objects
as parameters instead of filenames. Here's a sample java program that
uses them - very basic, it just demonstrates their use:

import java.sql.*;
import java.lang.*;
import java.io.*;

//argv[0] -- database connection string (JCC format)
//argv[1] -- username
//argv[2] -- password
//argv[3] -- first JAR file
//argv[4] -- second JAR file
public class testinstjar
{
public static void main(String[] argv) throws Exception
{
Class.forName("com.ibm.db2.jcc.DB2Driver").newInst ance();
Connection conn = DriverManager.getConnection(argv[0], argv[1],
argv[2]);

CallableStatement stmt = conn.prepareCall("CALL
SQLJ.DB2_INSTALL_JAR(?, ?)");
FileInputStream jarFile = new FileInputStream(argv[3]);
stmt.setBinaryStream(1, jarFile, jarFile.available());
stmt.setString(2, "MYJARID");
stmt.execute();
System.out.println("Installjar complete");

stmt.close();
stmt = conn.prepareCall("CALL SQLJ.DB2_REPLACE_JAR(?, ?)");
jarFile = new FileInputStream(argv[4]);
stmt.setBinaryStream(1, jarFile, jarFile.available());
stmt.setString(2, "MYJARID");
stmt.execute();
System.out.println("replacejar complete");

stmt.close();
stmt = conn.prepareCall("CALL SQLJ.REMOVE_JAR(?)");
stmt.setString(1, "MYJARID");
stmt.execute();
System.out.println("removejar complete");

stmt.close();
conn.close();
}
}

NOTE: at this time, these functions are not documented for a reason --
they are ONLY intended for use with the stored procedure builder.
However, they function exactly like the normal SQLJ-schema functions
that have filenames for parameters, except that instead of filenames, a
BLOB representing the file is given instead.

In this case, although I'm not sure why, it looks like the procedure
builder is passing the engine some bad data (in the form of a
non-existent file) and that's resulting in a funny error.

A -444 usually means that a library (or function on that library) could
not be found, but I don't think that's the case here. I would check the
engine's <install>\bin\routine (<install> is typically c:\sqllib)
directory and ensure that a file called db2jarsp.dll is present
(assuming your server is on a Windows machine).

However, as you say, the file that is being installed simply does not
exist on your client. That would lead me to think that the problem is
starting on the procedure builder, which then calls the
SQLJ.DB2_REFRESH_JAR() procedure to update the JAR file with some bad
data, which somehow results in the rather unusual -444 error you are seeing.

It might be worthwhile to contact IBM DB2 support about this. It may be
nice for them if you could run the test JAVA program above just to
ensure that the DB2_REFRESH_JAR (and install and remove procedures) are
actually working in normal conditions on your system. Any simple JAR
files will do - so long as they are actual JAR files containing java
classes.

hubert_s wrote:
I have DB2 8.1 FP7, when I try to build a Java stored procedure it fails
during a call to DB2_REPLACE_JAR. Even the build folder "bld1096553970703"
is not there - it has a different name,

regards,
Hubert

DB2ADMIN.PROCEDURE2 - Build started.
DROP SPECIFIC PROCEDURE DB2ADMIN.SQL030805133228210
DB2ADMIN.PROCEDURE2 - Drop stored procedure completed.
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";"c:\jt400.jar"
procedure22.java
DB2ADMIN.PROCEDURE2 - Javac completed.
C:\PROGRA~1\IBM\SQLLIB\java\jdk\bin\jar cf SQL30705013217030.jar
procedure22.class
DB2ADMIN.PROCEDURE2 - Jar file created.
Call SQLJ.DB2_REPLACE_JAR (<<C:\Documents and
Settings\db2admin\Application
Data\IBM\DB2\DC\Projects\bld1096553970703\SQL30705 013217030.jar>>,
'DB2ADMIN.SQL30705013217030')
[IBM][CLI Driver][DB2/NT] SQL0444N Routine "SQLJ.DB2_REPLACE_JAR"
(specific name "") is implemented with code in library or path "",
function "" which cannot be accessed. Reason code: "". SQLSTATE=42724

DB2ADMIN.PROCEDURE2 - Build failed.
DB2ADMIN.PROCEDURE2 - Roll back completed successfully.

Nov 12 '05 #2
Actually... if you've updated from an earlier fixpak of DB2 V8, have you
run the "db2updv8" utility to update the function/procedure definitions
to include the new ones included to FP7?

hubert_s wrote:
I have DB2 8.1 FP7, when I try to build a Java stored procedure it fails
during a call to DB2_REPLACE_JAR. Even the build folder "bld1096553970703"
is not there - it has a different name,

regards,
Hubert

DB2ADMIN.PROCEDURE2 - Build started.
DROP SPECIFIC PROCEDURE DB2ADMIN.SQL030805133228210
DB2ADMIN.PROCEDURE2 - Drop stored procedure completed.
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";"c:\jt400.jar"
procedure22.java
DB2ADMIN.PROCEDURE2 - Javac completed.
C:\PROGRA~1\IBM\SQLLIB\java\jdk\bin\jar cf SQL30705013217030.jar
procedure22.class
DB2ADMIN.PROCEDURE2 - Jar file created.
Call SQLJ.DB2_REPLACE_JAR (<<C:\Documents and
Settings\db2admin\Application
Data\IBM\DB2\DC\Projects\bld1096553970703\SQL30705 013217030.jar>>,
'DB2ADMIN.SQL30705013217030')
[IBM][CLI Driver][DB2/NT] SQL0444N Routine "SQLJ.DB2_REPLACE_JAR"
(specific name "") is implemented with code in library or path "",
function "" which cannot be accessed. Reason code: "". SQLSTATE=42724

DB2ADMIN.PROCEDURE2 - Build failed.
DB2ADMIN.PROCEDURE2 - Roll back completed successfully.

Nov 12 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: eric | last post by:
Hi, I would like to build the inParams SQLJ sample procedure from the Development Center. if I declare a #sql public iterator SpIterat, the Development Center complains this should be in a...
1
by: blackpzh | last post by:
We moved our DB from one AIX to another AIX by using backup/restore, ...its a long story..., then when we buid a java stored procedure in development center, we got following message, and a...
3
by: Henry Reardon | last post by:
Can someone remind me how to re-install the Development Center? I was playing with the Environment Settings a bit the other day and, ever since, it hasn't worked right. I can create a new Project...
0
by: hubert_s | last post by:
Hi, I have DB2 8.2 on Win 2K. When I try to use some external *.jar files in a stored procedure I have to put them directly in "Properties->Build->Compile options" instead of just adding the...
1
by: Henry Reardon | last post by:
I have been having problems with the Development Center for several days now. It seemed to be working fine when I initially installed DB2 (LUW) Version 8 (FP7) and upgraded to FP8, except that I...
1
by: VB | last post by:
iTechArt Group - Custom Software Development and Offshore outsourcing Company http://www.itechart.com/ Offshore custom software development company iTechArt - Web site and Content Management...
0
by: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.