473,385 Members | 1,312 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,385 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 3584
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, ...it’s 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...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.