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.