473,385 Members | 2,014 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.

Java stored procedure error ....

Trying to use the "DB2 Development Center" on UDB V8 on my Windows XP.
I am new to stored procedures.

The stored procedure code I am using is at:
https://www6.software.ibm.com/dw/edu...b2spdc/sp.java

I was able to successfully 'build' the stored procedure that I created
using Development Center, however, at run time it is showing the
following error:

A database manager error occurred.[IBM][CLI Driver][DB2/NT] SQL4302N
Java stored procedure or user-defined function
"DB2ADMIN.CHECKRETAILERCREDIT", specific name "SQL040608143836354"
aborted with an exception "". SQLSTATE=38501

Can someone let me know what this error is or is there any way we can
start a trace or something similar in Java to find out more details
about this error.

TIA
Raquel.
Nov 12 '05 #1
5 8891
Probably a cranky JVM...you can see the the exception in your
db2diag.log file (in sqllib\<instancename>). If that doesn't explain it,
post what jvm you're jdk_path is pointing to (maker, and build date).

Raquel wrote:
Trying to use the "DB2 Development Center" on UDB V8 on my Windows XP.
I am new to stored procedures.

The stored procedure code I am using is at:
https://www6.software.ibm.com/dw/edu...b2spdc/sp.java

I was able to successfully 'build' the stored procedure that I created
using Development Center, however, at run time it is showing the
following error:

A database manager error occurred.[IBM][CLI Driver][DB2/NT] SQL4302N
Java stored procedure or user-defined function
"DB2ADMIN.CHECKRETAILERCREDIT", specific name "SQL040608143836354"
aborted with an exception "". SQLSTATE=38501

Can someone let me know what this error is or is there any way we can
start a trace or something similar in Java to find out more details
about this error.

TIA
Raquel.

Nov 12 '05 #2
ra****************@yahoo.com (Raquel) wrote in message news:<9a*************************@posting.google.c om>...
Trying to use the "DB2 Development Center" on UDB V8 on my Windows XP.
I am new to stored procedures.

The stored procedure code I am using is at:
https://www6.software.ibm.com/dw/edu...b2spdc/sp.java

I was able to successfully 'build' the stored procedure that I created
using Development Center, however, at run time it is showing the
following error:

A database manager error occurred.[IBM][CLI Driver][DB2/NT] SQL4302N
Java stored procedure or user-defined function
"DB2ADMIN.CHECKRETAILERCREDIT", specific name "SQL040608143836354"
aborted with an exception "". SQLSTATE=38501

Can someone let me know what this error is or is there any way we can
start a trace or something similar in Java to find out more details
about this error.

TIA
Raquel.


try a simple one first, to make sure your DB2 Server is ready for J-SP.
Then test with the sampel from IBM.
Looks like the code aborted itself.
Nov 12 '05 #3
I downloaded UDB PE V8 from IBM and I guess JDK and JVM get downloaded
along with it. By the way, how do I find WHAT JVM is being used
(maker, build etc.); please pardon my ignorance in this regard but I
am kinda new to all this.

Following is the output from db2diag.log:

/Output-start/

2004-06-09-09.48.39.030000 Instance:DB2 Node:000
PID:2512(db2fmp.exe) TID:1884 Appid:none
BSU Java support sqlejCallJavaRoutine_dll Probe:315

Exception thrown during routine invocation:

0x0012F2EC : 0x00E9D060 `...

2004-06-09-09.48.39.186000 Instance:DB2 Node:000
PID:2512(db2fmp.exe) TID:1884 Appid:none
BSU Java support sqlejLogException Probe:10

ADM10000W A Java exception has been caught. The Java stack traceback
has been
written to the db2diag.log.

2004-06-09-09.48.39.186001 Instance:DB2 Node:000
PID:2512(db2fmp.exe) TID:1884 Appid:none
BSU Java support sqlejLogException Probe:10

java.lang.NullPointerException
at CheckRetailerCredit.checkRetailerCredit(CheckRetai lerCredit.java:42)

0x0012F13C : 0x00000000 ....

2004-06-09-09.48.39.201000 Instance:DB2 Node:000
PID:2512(db2fmp.exe) TID:1884 Appid:none
routine_infrastructure sqlerJavaCallRoutine Probe:30

Error from DB2ER CallUDF. RC:

0x0012F3F8 : 0xFFFFEF32 2...

/Output-end/

Guess, it can be surmised that it is a NullPointerException. Any ideas
why it could be so?

TIA
Raquel.
Nov 12 '05 #4
ok, looking more closely at the Stored procedure code in
https://www6.software.ibm.com/dw/edu...b2spdc/sp.java , it has
the following piece of code:

while (rs1.next())
{.....}

How is rs1 being populated?? I don't see it in the code. Should there
not have been something along these lines in the code:

rs1 = stmt.getResultSet();

Is the above piece of code missing and is this the reason why the code
is throwing a NullPointerException?

TIA
Raquel.
Nov 12 '05 #5
Looks like there's a bug in the sample class you're running. The
exception give you the line that failed (42).

Raquel wrote:
I downloaded UDB PE V8 from IBM and I guess JDK and JVM get downloaded
along with it. By the way, how do I find WHAT JVM is being used
(maker, build etc.); please pardon my ignorance in this regard but I
am kinda new to all this.

Following is the output from db2diag.log:

/Output-start/

2004-06-09-09.48.39.030000 Instance:DB2 Node:000
PID:2512(db2fmp.exe) TID:1884 Appid:none
BSU Java support sqlejCallJavaRoutine_dll Probe:315

Exception thrown during routine invocation:

0x0012F2EC : 0x00E9D060 `...

2004-06-09-09.48.39.186000 Instance:DB2 Node:000
PID:2512(db2fmp.exe) TID:1884 Appid:none
BSU Java support sqlejLogException Probe:10

ADM10000W A Java exception has been caught. The Java stack traceback
has been
written to the db2diag.log.

2004-06-09-09.48.39.186001 Instance:DB2 Node:000
PID:2512(db2fmp.exe) TID:1884 Appid:none
BSU Java support sqlejLogException Probe:10

java.lang.NullPointerException
at CheckRetailerCredit.checkRetailerCredit(CheckRetai lerCredit.java:42)

0x0012F13C : 0x00000000 ....

2004-06-09-09.48.39.201000 Instance:DB2 Node:000
PID:2512(db2fmp.exe) TID:1884 Appid:none
routine_infrastructure sqlerJavaCallRoutine Probe:30

Error from DB2ER CallUDF. RC:

0x0012F3F8 : 0xFFFFEF32 2...

/Output-end/

Guess, it can be surmised that it is a NullPointerException. Any ideas
why it could be so?

TIA
Raquel.

Nov 12 '05 #6

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

Similar topics

3
by: dinesh prasad | last post by:
I'm trying to use a servlet to process a form, then send that data to an SQL server stored procedure. I'm using the WebLogic 8 App. server. I am able to retrieve database information, so I know my...
7
by: Alex | last post by:
Hi all, I am trying to install a java stored procedure via the windows development centre. The linux box is running 8.1 FP4 as is the windoze platform. If I am on the linux box i can install...
3
by: Rhino | last post by:
I've spent the last couple of hours trying to figure out how to debug a Java stored procedure and am just going in circles. The last straw came when I got "Cannot open input stream for default"...
0
by: Rhino | last post by:
I've written several Java stored procedures now (DB2 V7.2) and I'd like to write down a few "best practices" for reference so that I will have them handy for future development. Would the...
4
by: Rhino | last post by:
Is it possible for a Java Stored Procedure in DB2 V7.2 (Windows) to pass a Throwable back to the calling program as an OUT parameter? If yes, what datatype should I use when registering the...
1
by: Alex | last post by:
Hi all, Just been dabbling with java stored procedures and I'm having problems replacing System: db2 8.1.4 on RH 7.1 linux system 1). Look at java jdbc samples as supplied with db2 and run...
2
by: Kent Lewandowski | last post by:
hi all, Recently I wrote some stored procedures using java jdbc code (admittedly my first stab) and then tried to implement the same within java packages (for code reuse). I encountered...
2
by: Jobs | last post by:
Download the JAVA , .NET and SQL Server interview with answers Download the JAVA , .NET and SQL Server interview sheet and rate yourself. This will help you judge yourself are you really worth of...
1
by: amgupta8 | last post by:
Note: This problem occurred when I updated the JDK from 1.3.1 to 1.4.1 or 1.4.2. Nothing else was changed in the code, other than updating the JDK on the database server (dbm cfg parm jdk_path) and...
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.