Skip to main content

How to show full stacktrace in glassfish?

No replies
vlazyguy
Offline
Joined: 2006-12-10

I am getting a PersistenceException when invoking

em.persist(object);

and the following stacktrace is only shown when I catch the exception and I print the stacktrace.

javax.persistence.TransactionRequiredException
at com.sun.enterprise.util.EntityManagerWrapper.doTxRequiredCheck(EntityManagerWrapper.java:236)
at com.sun.enterprise.util.EntityManagerWrapper.doTransactionScopedTxCheck(EntityManagerWrapper.java:200)
at com.sun.enterprise.util.EntityManagerWrapper.persist(EntityManagerWrapper.java:426)

How do I automatically enable the stacktrace to be printed to the server log automatically?

I am using Spring + JSF + JPA/Hibernate