db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Knut Anders Hatlen <Knut.Hat...@Sun.COM>
Subject Re: Specifying the traceLevel property through ij
Date Tue, 16 Jan 2007 15:53:07 GMT
Mamta Satoor <msatoor@gmail.com> writes:

> Hi,
>
> I am working on DERBY-1275 "Provide a way to enable client tracing without
> changing the application" which will provide a way to specify client tracing
> without having to change the client application. While working on it, I
> tried testing the exisitng functionality of setting the traceLevel through
> the jdbc url in ij and found that I couldn't make it work with either of the
> 2 documented ways of specifying the traceLevel value
> http://db.apache.org/derby/docs/10.2/adminguide/cadminappsclienttracing.html
>
> Following is what I tried
> $ java org.apache.derby.tools.ij
> ij version 10.3
> ij> connect 'jdbc:derby://localhost:1527/c:/dellater/db1;traceLevel=
> org.apache.derby.jdbc.ClientDataSource.TRACE_CONNECTION_CALLS;create=true';
> ERROR XJ213: The traceLevel connection property does not have a valid format
> for a number.
> ij> connect
> 'jdbc:derby://localhost:1527/c:/dellater/db1;traceLevel=0xFFFFFFFF;create=true';
> ERROR XJ213: The traceLevel connection property does not have a valid format
> for a number.
>
> I haven't tried this yet through a Java JDBC program but I thought that one
> should be able to specify this property through ij as well. I can file a
> jira entry if we agree that this is a bug.

I don't think this is a bug. The documentation doesn't say that you
can use the name of the constant or the value in hex format in the
connection URL. The section of the adminguide that you referred to has
this example:

String url = "jdbc:derby://samplehost.sampledomain.com:1528/mydb" +
 ";traceFile=/u/user1/trace.out" +
 ";traceLevel=" +
 org.apache.derby.jdbc.ClientDataSource.TRACE_PROTOCOL_FLOWS;

The actual SQL text in this example is

  ...;traceLevel=64

not

  ...;traceLevel=o.a.d.jdbc.ClientDataSource.TRACE_PROTOCOL_FLOWS

That said, it would be more convenient to be able to specify trace
levels with symbols, so you shouldn't let this stop you from filing a
JIRA.

-- 
Knut Anders

Mime
View raw message