Uploaded image for project: 'Hibernate ORM'
  1. Hibernate ORM
  2. HHH-11426

NullPointerException in getPersistenceUnitUtil().getIdentifier() on detached enhanced entity

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 5.2.6
    • Fix Version/s: 5.2.8, 5.1.7
    • Labels:
      None
    • Environment:
      Arch Linux, Tomcat 8.5/9
    • Bug Testcase Reminder (view):

      Bug reports should generally be accompanied by a test case!

    • Worked in:
    • Last commented by a user?:
      true

      Description

      The exception occurs on entityManagerFactory.getPersistenceUnitUtil().getIdentifier(entity), passing a detached and enhanced entity as argument. When I disable hibernate-enhance-maven-plugin or back to 5.2.2, the exception don't happens.

      Stack Trace:

      Exception in thread "pool-1-thread-1" java.lang.NullPointerException
      at org.hibernate.jpa.internal.PersistenceUnitUtilImpl.getIdentifier(PersistenceUnitUtilImpl.java:74)
      at mypackage.ServerInitListener.serverInit(Unknown Source)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      at java.lang.Thread.run(Thread.java:745)

      I created a test case in this fork: https://github.com/edallagnol/hibernate-test-case-templates/tree/master/orm/hibernate-orm-5/

      Edit: I can't test in 5.2.5, because of this exception: https://hibernate.atlassian.net/browse/HHH-11322

        Attachments

          Issue links

            Activity

              People

              • Votes:
                1 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: