db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Myrna van Lunteren <m.v.lunte...@gmail.com>
Subject Re: debugging java stored procedures
Date Mon, 18 Jan 2010 19:23:05 GMT
On Mon, Jan 18, 2010 at 10:25 AM, Thomas <Thomas.K.Hill@t-online.de> wrote:
> Hi,
>
> any tipps from anyone which would help to debug java stored procedures?
>
> Not being able/knowing how to debug the code executed by the database
> using the eclipse debugger, I have included System.out.println statements
> into the procedures, but have no idea where these end up when running
> against a network server on a remote host mode (have checked tomcat logs,
> but haven't found anything).
>
> Thanks
>
>
>
>
>

This will not help much, but did you test it in steps - i.e. first
test on your local machine - and with the stored procedure's java code
in a class on your local machine rather than a jar in the database?
But you've probably already done that?

In eclipse you might be able to suspend the run by putting a
breakpoint in the source, then 'attaching' to the appropriate
suspended thread...

The tomcat installation should point you to where it's starting
networkserver, and you might be able to add some debugging/tracing
properties to a derby.properties file (to be created) in that
directory.
Helpful derby.properties settings are:
     derby.infolog.append=true
     derby.stream.error.logSeverityLevel=0
     derby.language.logStatementText=true
More detailed errors should then show up in a derby.log file somewhere
on the server.

There are also tracing properties you can switch on for network server
and client - check the  manual
http://db.apache.org/derby/docs/dev/adminguide/cadminappsclienttracing.html
and
http://db.apache.org/derby/docs/dev/adminguide/radminconfig.html
and
http://db.apache.org/derby/docs/dev/adminguide/radminconfigdb2jdrdatracedirectory.html

HTH
Myrna

Mime
View raw message