I am running a Query "select d.breed from Dog d " .This query gives an
argument exception because Dog does not have a field called breed.Now there
is no way I can make openjpa log this exception.The only way I can see this
exception is by having  a try and catch block in my code and catching and
printing out the exception myself.

No matter what DefaultLevel of openjpa.Log was:WARN,FATAL,TRACE,INFO. The
Argument exception was not logged.

I also tried the various logging channels I made RUNTIME=TRACE,
RUNTIME=FATAL,QUERY=TRACE etc.But even using different logging channels did
not help in logging the exception.

I am not sure if the support for these different Logging Channels is
actually there in openjpa, because if you look at the
org.apache.openjpa.lib.jdbc.DataSourceLogs.java you see only 2 types of logs
jdbc and sql.

In another application I was running I had a sql Exception
(DuplicateKeys).Now there was no way in which I could make openjpa log this
sql exception either.

So my question is that is there currently any way to log these Argument
Exceptions and sql Exceptions in openjpa.

Reply via email to