2 Replies Latest reply on Jun 15, 2013 1:37 AM by Farid Adhami

    persistence unit is failed deploying on eap 6.1.0

    Farid Adhami Newbie

      I have an application that used to work on eap 6.0.0 adn then I tried to deploy it on eap 6.1.0, but I get the following error.

       

      09:24:04,785 ERROR [org.jboss.msc.service.fail] (ServerService Thread Pool -- 55) MSC000001: Failed to start service jboss.persistenceunit."Nightly.ear/common-1.0.jar#common": org.jboss.msc.service.StartException in service jboss.persistenceunit."Nightly.ear/common-1.0.jar#common": javax.persistence

      .PersistenceException: [PersistenceUnit: common] Unable to build EntityManagerFactory

              at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1.run(PersistenceUnitServiceImpl.java:103)

              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_17]

              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_17]

              at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_17]

              at org.jboss.threads.JBossThread.run(JBossThread.java:122) [jboss-threads-2.1.0.Final-redhat-1.jar:2.1.0.Final-redhat-1]

      Caused by: javax.persistence.PersistenceException: [PersistenceUnit: common] Unable to build EntityManagerFactory

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

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

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

              at org.jboss.as.jpa.service.PersistenceUnitServiceImpl.createContainerEntityManagerFactory(PersistenceUnitServiceImpl.java:200)

              at org.jboss.as.jpa.service.PersistenceUnitServiceImpl.access$600(PersistenceUnitServiceImpl.java:57)

              at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1.run(PersistenceUnitServiceImpl.java:99)

              ... 4 more

      Caused by: org.hibernate.service.spi.ServiceException: Unable to create requested service [org.hibernate.engine.spi.CacheImplementor]

              at org.hibernate.service.internal.AbstractServiceRegistryImpl.createService(AbstractServiceRegistryImpl.java:186)

              at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:150)

              at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:131)

              at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:264)

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

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

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

              ... 9 more

      Caused by: org.hibernate.cache.CacheException: Unable to start region factory

              at org.hibernate.cache.infinispan.InfinispanRegionFactory.start(InfinispanRegionFactory.java:323)

              at org.hibernate.internal.CacheImpl.<init>(CacheImpl.java:70)

              at org.hibernate.engine.spi.CacheInitiator.initiateService(CacheInitiator.java:40)

              at org.hibernate.engine.spi.CacheInitiator.initiateService(CacheInitiator.java:35)

              at org.hibernate.service.internal.SessionFactoryServiceRegistryImpl.initiateService(SessionFactoryServiceRegistryImpl.java:91)

              at org.hibernate.service.internal.AbstractServiceRegistryImpl.createService(AbstractServiceRegistryImpl.java:176)

              ... 15 more

      Caused by: java.lang.ClassCastException: org.infinispan.remoting.ReplicationQueueImpl cannot be cast to org.infinispan.remoting.ReplicationQueue

              at org.infinispan.configuration.cache.LegacyConfigurationAdaptor.adapt(LegacyConfigurationAdaptor.java:306)

              at org.infinispan.manager.DefaultCacheManager.defineConfiguration(DefaultCacheManager.java:468)

              at org.infinispan.manager.DefaultCacheManager.defineConfiguration(DefaultCacheManager.java:443)

              at org.jboss.as.clustering.infinispan.DefaultEmbeddedCacheManager.defineConfiguration(DefaultEmbeddedCacheManager.java:77)

              at org.hibernate.cache.infinispan.InfinispanRegionFactory.defineGenericDataTypeCacheConfigurations(InfinispanRegionFactory.java:492)

              at org.hibernate.cache.infinispan.InfinispanRegionFactory.start(InfinispanRegionFactory.java:318)

              ... 20 more

       

       

      my persistence unit looks like this:

       

      <?xml version="1.0" encoding="UTF-8"?>

      <persistence version="2.0" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd">

                <persistence-unit name="common" transaction-type="JTA">

                          <provider>org.hibernate.ejb.HibernatePersistence</provider>

                      <jta-data-source>java:jboss/datasources/OracleDSNonXA</jta-data-source>

        <class>***</class>

                          <shared-cache-mode>ENABLE_SELECTIVE</shared-cache-mode>

                      <validation-mode>CALLBACK</validation-mode>

                      <properties>

                                <property name="hibernate.jdbc.batch_size" value="50" />

                         <property name="hibernate.cache.use_second_level_cache" value="true"/>

                         <property name="hibernate.show_sql" value="false"/>

            </properties>

                </persistence-unit>

      </persistence>

       

       

      Does anyone know what causes the issue and how this issue could be fixed?

       

      Thanks

       

      Farid