Thanks for taking the time to respond, Knut. One of the reasons I asked this
question is, currently in my patch for DERBY-1275, a user can't use the
symbols or a hex value to specify the traceLevel. Instead, they have to
specify the int value just as they need to through ij.

Code can be added to let the user specify the symbol or hex values for
the jvm properties introduced by DERBY-1275 but keeping in mind the
incremental development process, I will go ahead and post my patch which
will just accept the int value for the properties and we can go from there.

I added a jira entry for ij
DERBY-2246 Support a way to specify traceLevel attribute value as
symbols/hex values rather than int value inside ij url

Mamta


On 1/16/07, Knut Anders Hatlen <[EMAIL PROTECTED] > wrote:

Mamta Satoor < [EMAIL PROTECTED]> 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

Reply via email to