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 a Java stored procedure that is
giving me a CLI0111 error. Unfortunately, the CLIxxxx errors are very vague.
The db2diag.log is a little more helpful:
2004-01-27-17.35.27.804000 Instance:DB2 Node:000
PID:3224(db2dari.exe) TID:4080 Appid:
BSU Java support sqlejNMstp_setBigDecimal Probe:40
Invalid null BigDecimal given.
I only have a couple of lines of code that involve BigDecimals but I've
looked at the code and I can't see anything wrong with it. I thought I'd try
debugging to see if I could nail the problem.
I tried debugging via the Stored Procedure Builder, which is where I wrote
the procedure. After considerable poking around, I was unable to get the
"Build for Debug" menu option to work, even though I had "Build for Debug"
checked in the wizard when I built the stored procedure. This option is also
turned on in the properties for the procedure.
After reading the Help and Google posts on this subject, I read that Java
stored procedures can *not* be debugged in the Stored Procedure Builder. Did
I misread that or is that true?
Anyway, I read that I should get and use the IBM Distributed Debugger so I
downloaded and installed V9.2, which is described as being for DB2 V8.1 in
the hopes that it would still work with DB2 V7.2 FP9.
Unfortunately, when I ran "idebug.exe -qdaemon -quiport=8000,8001" on my
command line, a message in the command window said "Cannot open input stream
for default". A simple dialog that said "Listening to port(s): 8001,8000"
also poppsed up so I took the chance that maybe the error was not
significant. I started the Stored Procedure Builder but I still can't "Build
for debug".
I can't even find the IBM Distributed Debugger under Start/Programs and
there is no icon or help for it anywhere that I can see. All I can find is
the README but it says nothing about this. I suspect some kind of
installation/configuration problem - I'm not great at
installing/configuring! - but I can't figure out how to get past this. I
couldn't find a single post on any newsgroup that mentioned this problem -
and darn few about the IBM Distributed Debugger at all.
I tried db2 force applications all/db2stop/db2start in the hope that this
would fix things up but no luck. The DB2ROUTINE_DEBUG environment variable
is set to ON and DB2_USE_JDK12 is set to YES. The db2dbg table and view are
present and populated. I have SYSADM authority. I am trying to debug a
stored procedure on a standalone machine so it might seem strange to use a
distributed debugger but I really don't need a distributed debugger: I just
need something/anything that I can use to debug a Java stored procedure. I
need to be able to step through my stored procedure and watch the variable
values change.
Can anyone tell me how to get past my problem?
--
Rhino
---
rhino1 AT sympatico DOT ca
"If you want the best seat in the house, you'll have to move the cat."