Search code examples
junitejbopenjpa

SQL traces not shown in junit


I am working on an application using EJB and OpenJPA. FOr unit testing I use junit.I am running junits using Websphere's embedded container.

EJBContainer.createEJBContainer(map containing db properties);

In persistence.xml I have set :

<property name="openjpa.Log" value="DefaultLevel=WARN, Runtime=INFO, Tool=INFO, SQL=TRACE" />

I expect SQL traces in console, but no traces are shown.

What else do I need to do for SQL traces?


Solution

  • I'd start by reading the knowledge center documentation. From what I recall, you need to use WAS logging rather than OpenJPA p.xml configuration.