[hibernate-issues] [Hibernate-JIRA] Created: (HHH-7089) NPE during SessionFactoryImpl init when 2L caching is enabled and @NaturalIdCache is used with EHcache

Eric Dalquist (JIRA) noreply at atlassian.com
Mon Feb 20 14:36:13 EST 2012


NPE during SessionFactoryImpl init when 2L caching is enabled and @NaturalIdCache is used with EHcache
------------------------------------------------------------------------------------------------------

                 Key: HHH-7089
                 URL: https://hibernate.onjira.com/browse/HHH-7089
             Project: Hibernate ORM
          Issue Type: Bug
    Affects Versions: 4.1.0
            Reporter: Eric Dalquist


The org.hibernate.cache.ehcache.SingletonEhCacheRegionFactory always returns null for buildNaturalIdRegion due to an oversight during work on HHH-6974

The result is that if Second-Level caching is enabled and any entity is annotated with @NaturalIdCache session factory creation fails with a NPE

{noformat}
     [java] Caused by: java.lang.NullPointerException
     [java] 	at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:361)
     [java] 	at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1740)
     [java] 	at org.hibernate.ejb.EntityManagerFactoryImpl.<init>(EntityManagerFactoryImpl.java:88)
     [java] 	at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:904)
     [java] 	at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:889)
     [java] 	at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:73)
{noformat}

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the hibernate-issues mailing list