Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / Databases / June 2004

Tip: Looking for answers? Try searching our database.

Stored procedure error ....

Thread view: 
Raquel - 09 Jun 2004 07:14 GMT
Trying to use the "DB2 Development Center" on UDB V8 on my Windows XP. I am
new to java stored procedures.

The stored procedure code I am using is at:
https://www6.software.ibm.com/dw/education/dm/db2spdc/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

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(CheckRetailerCredit.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.
Raquel - 09 Jun 2004 10:39 GMT
ok, looking more closely at the Stored procedure code in
https://www6.software.ibm.com/dw/education/dm/db2spdc/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.
jim caprioli - 09 Jun 2004 23:54 GMT
stmt.getResultSet(); ????????????????????????????????????????
LOL

> ok, looking more closely at the Stored procedure code in
> https://www6.software.ibm.com/dw/education/dm/db2spdc/sp.java , it has  
[quoted text clipped - 14 lines]
> TIA
> Raquel.

Signature

http://NiLOSTEP.com/

Raquel - 10 Jun 2004 06:05 GMT
ok Jim, I did not get the pun. Are you suggesting that "rs1 =
stmt.getResultSet();" should HAVE been there in the stored procedure code
or are you suggesting that it is redundant.

TIA
Raquel.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.