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

Eric Dalquist (JIRA) noreply at atlassian.com
Tue Feb 21 11:39:09 EST 2012


    [ https://hibernate.onjira.com/browse/HHH-7089?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=45569#comment-45569 ] 

Eric Dalquist commented on HHH-7089:
------------------------------------

Pull Request: https://github.com/hibernate/hibernate-orm/pull/278

> 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