Uploaded image for project: 'Application Server 7'
  1. Application Server 7
  2. AS7-1522

Regression in Hibernate's logging to find query errors

    XMLWordPrintable

Details

    • Bug
    • Resolution: Won't Do
    • Major
    • None
    • 7.0.0.Final
    • JPA / Hibernate
    • None
    • Documentation (Ref Guide, User Guide, etc.)
    • Workaround Exists
    • Hide

      I think adding the following property to your persistence.xml (PU definition) would help:
      <property name="hibernate.show_sql" value="true"/>

      Show
      I think adding the following property to your persistence.xml (PU definition) would help: <property name="hibernate.show_sql" value="true"/>

    Description

      Hibernate 3.x is logging the generated SQL queries when the logger category org.hibernate.SQL is set to DEBUG. This feature is extremely helpful in finding mapping errors because you can inspect the mapping result in the log file. For instance, see the Hibernate docs at http://docs.jboss.org/hibernate/core/3.6/reference/en-US/html/session-configuration.html#configuration-logging

      I'll attach a testcase so that you can easily reproduce this issue.

      Attachments

        1. server.log
          8 kB
        2. standalone.xml
          17 kB
        3. testcase.ear.zip
          7 kB
        4. testcase-src.zip
          5 kB

        Activity

          People

            smarlow1@redhat.com Scott Marlow
            juergen.zimmermann Juergen Zimmermann
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: