473,769 Members | 5,742 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.CHECK RETAILERCREDIT" , specific name "SQL04060814383 6354"
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 8919
Probably a cranky JVM...you can see the the exception in your
db2diag.log file (in sqllib\<instanc ename>). 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.CHECK RETAILERCREDIT" , specific name "SQL04060814383 6354"
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.goo gle.com>...
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.CHECK RETAILERCREDIT" , specific name "SQL04060814383 6354"
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 sqlejCallJavaRo utine_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 sqlejLogExcepti on 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 sqlejLogExcepti on Probe:10

java.lang.NullP ointerException
at CheckRetailerCr edit.checkRetai lerCredit(Check RetailerCredit. java:42)

0x0012F13C : 0x00000000 ....

2004-06-09-09.48.39.201000 Instance:DB2 Node:000
PID:2512(db2fmp .exe) TID:1884 Appid:none
routine_infrast ructure sqlerJavaCallRo utine Probe:30

Error from DB2ER CallUDF. RC:

0x0012F3F8 : 0xFFFFEF32 2...

/Output-end/

Guess, it can be surmised that it is a NullPointerExce ption. 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.getResultS et();

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

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 sqlejCallJavaRo utine_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 sqlejLogExcepti on 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 sqlejLogExcepti on Probe:10

java.lang.NullP ointerException
at CheckRetailerCr edit.checkRetai lerCredit(Check RetailerCredit. java:42)

0x0012F13C : 0x00000000 ....

2004-06-09-09.48.39.201000 Instance:DB2 Node:000
PID:2512(db2fmp .exe) TID:1884 Appid:none
routine_infrast ructure sqlerJavaCallRo utine Probe:30

Error from DB2ER CallUDF. RC:

0x0012F3F8 : 0xFFFFEF32 2...

/Output-end/

Guess, it can be surmised that it is a NullPointerExce ption. 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
22146
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 application server can talk to the database. I've determined the failure occurs when the the following statement is executed: cstmt.execute(); (due to the failure of println statements placed afterwards). I get the following error after trying to...
7
3255
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 the sample jdbc stored procedures o.k. For the purpose of this test I created a sample procedure that executes "select * from department" when conected to the sample database on the linux box.
3
2805
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" when I launched the IBM Distributed Debugger via D:\IBMDebug>idebug.exe -qdaemon -quiport=8000,8001 First, a bit of background. I am running DB2 V7.2 with Fixpack 9 applied on Windows XP Professional (all critical service applied). I've written...
0
4278
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 experts here agree with the following? Would they add any other points? 1. If the shop standard calls for logging of application errors, a stored procedure should log any error that it encounters immediately upon detecting it and then return to the...
4
3191
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 Throwable as an OUT parameter and what datatype should I use in the CREATE PROCEDURE and DROP PROCEDURE statements? Here's what I tried: - the method signature for the stored procedure included: Throwable throwable
1
2404
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 the SpServer and Spclient progs against the default database SAMPLE. And everything works.
2
9244
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 problems doing this. I wanted to implemented a generic "Helper" class like this: /** * Helper
2
6966
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 attending interviews. If you own a company best way to judge if the candidate is worth of it. http://www.questpond.com/InterviewRatingSheet.zip
1
2975
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 recompiling/executing the code with 1.4.1 (deploying the newly compiled stored procedure code as well). This is the original exception that I got before I tried any code modifications: java.io.IOException: invalid offset/length at...
0
9423
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10210
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9990
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9861
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7406
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6672
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5298
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3956
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3561
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.