Enable tracing in WAS for JPA
From the main menu of the Application Server's Admin Console choose:
- Troubleshooting
- Logs and trace
- Your server
- Change log detail levels
- Switch to one of the two tabs:
- "Configuration" for a durable change, which are effective after restart
- "Runtime" for immediately active changes, which are reverted after restart
- Add messages of all severities from
com.ibm.ws.jpa.*
Your final trace configuration could look like this:
*=info: com.ibm.ws.jpa.*=all
This may be active immediately or after restart, depending on your choice above.
Now you find the information to be logged in the server's trace.log
file, which is stored in the server's log directory. E.g.
C:\IBM\SDP\runtimes\base_v7\profiles\AppSrv01\logs\server1
Solution
The cause of your problem may vary widely. So you have to rely on the diagnosis of your trace file.
However, in my situation I found the following there:
JPAPUnitInfo 3 Caught unexpected exception:org.hibernate.AnnotationException: Use of @OneToMany or @ManyToMany targeting an unmapped class: com.acme.Class1.prop2[com.acme.Class2]
It could be helpful for you, to look out for an AnnotationException
too. In my case, I added Class2
to the PU definition in my persistence.xml
. That worked.
Good luck folks ;-)