4

I'm currently working on a project that is being deployed on a Glassfish server. When there is an exception, I can easily see the stack trace on the Glassfish log. However, sometimes when there is an issue with something related to persistence such as relation annotations or lazy loading, the response from the server is HTTP 500 Internal Server Error without any exception in any log file. Tinkering around, brute-forcing the error without any clue on what is actually wrong takes a tremendous amount of time. Is there a way to enable a verbose mode so that I can see this exception or is this a technical limitation of Glassfish?

Martin
  • 2,606
  • 4
  • 24
  • 38

1 Answers1

0

I know the question is a little bit older but i recently run into the same issues and would share my findings with you guys.

For me the following two approaches helped to track down my problem.

Log out SQL statements with persistence.xml:

<property name = "hibernate.show_sql" value = "true" /> // hibernate

<property name="eclipselink.logging.level" value="FINE"/> //eclipse link

Log contraint violations as described in the answer to following question:

javax.validation.ConstraintViolationException

Community
  • 1
  • 1
Tobi Tiggers
  • 442
  • 3
  • 14