0 Replies Latest reply on Jul 25, 2011 5:36 PM by Richard Yang

    NPE in deploying persistence.xml: jboss AS7 final hibernate cache

    Richard Yang Apprentice

      I upgraded infinispan module in jboss 7 to CR8.

      I got NullpointerException in deploying a war which contains persistence.xml:

       

      16:31:29,578 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-2) MSC00001: Failed to start service jboss.persistenceunit."my-login.war#myUnit": org.jboss.msc.service.StartException in service jboss.persistenceunit."my-login.war#myUnit": Failed to start service

          at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1786)

          at org.jboss.msc.service.ServiceControllerImpl$ClearTCCLTask.run(ServiceControllerImpl.java:2291)

          at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_24]

          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_24]

          at java.lang.Thread.run(Thread.java:662) [:1.6.0_24]

      Caused by: java.lang.NullPointerException

          at org.hibernate.annotations.CacheConcurrencyStrategy.fromAccessType(CacheConcurrencyStrategy.java:47)

          at org.hibernate.cfg.AnnotationBinder.determineCacheConcurrencyStrategy(AnnotationBinder.java:1045)

          at org.hibernate.cfg.AnnotationBinder.buildCacheMock(AnnotationBinder.java:1012)

          at org.hibernate.cfg.AnnotationBinder.determineCacheSettings(AnnotationBinder.java:969)

          at org.hibernate.cfg.AnnotationBinder.bindClass(AnnotationBinder.java:567)

          at org.hibernate.cfg.Configuration$MetadataSourceQueue.processAnnotatedClassesQueue(Configuration.java:3381)

          at org.hibernate.cfg.Configuration$MetadataSourceQueue.processMetadata(Configuration.java:3335)

          at org.hibernate.cfg.Configuration.secondPassCompile(Configuration.java:1319)

          at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1709)

          at org.hibernate.ejb.EntityManagerFactoryImpl.<init>(EntityManagerFactoryImpl.java:77)

          at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:894)

          at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:879)

          at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:73)

          at org.jboss.as.jpa.service.PersistenceUnitService.createContainerEntityManagerFactory(PersistenceUnitService.java:170)

          at org.jboss.as.jpa.service.PersistenceUnitService.start(PersistenceUnitService.java:80)

          at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1765)

          ... 4 more