cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Wernke zur Borg <>
Subject Re: CommonsJdbcEventLogger does not print the queries
Date Tue, 24 Jan 2012 10:00:09 GMT

On 2012-01-24 10:29, Christian Grobmeier wrote:
> Hello Werner,
> On Tue, Jan 24, 2012 at 9:35 AM, Wernke zur Borg
> <>  wrote:
>> I switched from QueryLogger to CommonsJdbcEventLogger but now I can't
>> get it to print the detailed queries any more.
>> I am trying to debug a problem with my code and I set:
>> = DEBUG
> not sure why this doesn't work anymore. But for a workaround you can
> level the whole cayenne package:
> This helped me to see the sql statements again.
> Cheers
> Christian

Hi Christian,

thanks for the hint, but in the meantime I found the reason for the 
problem, which is my custom JdbcAdapter subclass. I had to provide an 
own JdbcAdapter implementation for some other reason, and as a 
consequence of that I ran into a NullPointerException with 
SelectAction.performAction() where it says:

adapter.getJdbcEventLogger().logSelectCount( ... );

returning null for the logger. Since the logger is dynamically injected, 
it seems that this injection somehow does not work with my subclass. My 
workaround to create a logger in my subclass's constructor is working 
but apparently does not see the log level setting, which explains the 
effect that queries are not logged.

Now the question remains, how do you properly inject the logger into 
your own JdbcAdapter subclass?

Thanks, Wernke

This email (including any attachments) may contain confidential and/or privileged
information or information otherwise protected from disclosure.  If you are not the
intended recipient, please notify the sender immediately, do not copy this message
or any attachments and do not use it or any purpose or disclose its content to any
person, but delete this message and any attachments from your system.
RHEA System S.A. (RHEA) disclaims any and all liability if this email transmission
was virus corrupted, altered or falsified.

If a Non Disclosure Agreement (NDA) exists between RHEA and the receiving
organization, then all contents shall be considered proprietary and covered under
the NDA.

View raw message