7 Replies Latest reply on Feb 28, 2012 11:01 PM by Scott Marlow

    Migrating from JBoss to 7.1.0.CR1b 7.1.0.Final - Domain Mode - Hibernate Infinispan - ClassNotFoundException - $ CacheHelper EvictAll

    Jose Inacio Junior Newbie

      We are conducting a migration between versions of JBoss 7.1.0.CR1b and the new version 7.1.0.Final. We are encountering a problem with the configuration of the cache between the two versions.

       

      The configuration we are using in both versions is this:

       

      In domain.xml

       

                  <subsystem xmlns="urn:jboss:domain:infinispan:1.1" default-cache-container="cluster">

                      <cache-container name="cluster" aliases="ha-partition" default-cache="default">

                          <transport lock-timeout="60000"/>

                          <replicated-cache name="default" mode="SYNC" batching="true">

                              <locking isolation="REPEATABLE_READ"/>

                          </replicated-cache>

                      </cache-container>

                      <cache-container name="web" aliases="standard-session-cache" default-cache="repl">

                          <transport lock-timeout="60000"/>

                          <replicated-cache name="repl" mode="ASYNC" batching="true">

                              <file-store/>

                          </replicated-cache>

                          <replicated-cache name="sso" mode="SYNC" batching="true"/>

                          <distributed-cache name="dist" mode="ASYNC" batching="true">

                              <file-store/>

                          </distributed-cache>

                      </cache-container>

                      <cache-container name="ejb" aliases="sfsb sfsb-cache" default-cache="repl">

                          <transport lock-timeout="60000"/>

                          <replicated-cache name="repl" mode="ASYNC" batching="true">

                              <eviction strategy="LRU"/>

                              <file-store/>

                          </replicated-cache>

                          <!-- Clustered cache used internally by EJB subsytem for managing the client-mapping(s) of

                          the socketbinding referenced by the EJB remoting connector -->

                          <replicated-cache name="remote-connector-client-mappings" mode="SYNC" batching="true"/>

                          <distributed-cache name="dist" mode="ASYNC" batching="true">

                              <eviction strategy="LRU"/>

                              <file-store/>

                          </distributed-cache>

                      </cache-container>

                      <cache-container name="hibernate" default-cache="local-query" jndi-name="java:jboss/infinispan/hibernate">

                          <transport lock-timeout="60000"/>

                          <local-cache name="local-query">

                              <transaction mode="NONE"/>

                              <eviction strategy="LRU" max-entries="10000"/>

                              <expiration max-idle="100000" lifespan="1800000"/>

                          </local-cache>

                          <invalidation-cache name="entity" mode="SYNC">

                              <transaction mode="NON_XA"/>

                              <eviction strategy="LRU" max-entries="10000"/>

                              <expiration max-idle="100000" lifespan="1800000"/>

                          </invalidation-cache>

                          <replicated-cache name="timestamps" mode="ASYNC">

                              <transaction mode="NONE"/>

                              <eviction strategy="NONE"/>

                          </replicated-cache>

                      </cache-container>

                  </subsystem>

       

      In both versions the server start normally without any problem. With version 7.1.0.CR1b this configuration works properly when we perform the deployment of our application. But in version 7.1.0.Final when we started the deployment is generated the following error:

       

      24 Feb 2012 18:30:07,542 ERROR [org.infinispan.interceptors.InvocationContextInterceptor] org.infinispan.interceptors.InvocationContextInterceptor (OOB-15,null) ISPN000136: Execution error: org.infinispan.CacheException: Caught exception [org.infinispan.CacheException] while invoking method [public void org.jboss.as.clustering.infinispan.DefaultEmbeddedCacheManager$ClassLoaderAwareListener.event(org.infinispan.notifications.cachelistener.event.Event) throws java.lang.Throwable] on listener instance: org.jboss.as.clustering.infinispan.DefaultEmbeddedCacheManager$ClassLoaderAwareListener@546fd7d9 ...

       

      ... Caused by: org.infinispan.CacheException: Unable to unmarshall value ...

       

      ... Caused by: java.lang.ClassNotFoundException: org.hibernate.cache.infinispan.util.CacheHelper$EvictAll from [Module "org.jboss.as.clustering.infinispan:main" from local module loader @15a62c31 (roots: /usr/local/jboss-as-7.1.0.Final/modules)] ...

       

      We find that the version of hibernate-infinispan migrated to the 4.0.0.Final to 4.0.1.Final, from JBoss old to new. And actually in the new version there is no inner class EvictAll, confirming the allegation of stacktrace. For the previous version 4.0.0 this class exists.

       

      Does anyone have any idea what we're doing wrong, or any suggestions to help us with this situation?

        • 1. Re: Migrating from JBoss to 7.1.0.CR1b 7.1.0.Final - Domain Mode - Hibernate Infinispan - ClassNotFoundException - $ CacheHelper EvictAll
          Paul Ferraro Master

          Unfortunately, we don't claim clustering compatibility with a non-final version.

          You could try disabling the 2nd level cache on the 7.1.0.Final nodes until you complete your migration, then do a second migration pass with 2nd level caching reenabled.

          • 2. Re: Migrating from JBoss to 7.1.0.CR1b 7.1.0.Final - Domain Mode - Hibernate Infinispan - ClassNotFoundException - $ CacheHelper EvictAll
            Diego Silveira Newbie

            Paul,

             

            We've shutdown all the nodes running JBoss 7.1.0.CR1b in our cluster and only nodes running JBoss 7.1.0.Final are started. Even in this situation we are facing the same problem. My question is: if JBoss 7.1.0.Final uses hibernate-infinispan-4.0.1.Final which does not have the class org.hibernate.cache.infinispan.util.CacheHelper$EvictAll, why is this class being requested by Hibernate / Infinispan? Is there some configuration problem? Jboss 7.1.0.Final was completely installed and configured from the scratch, we didn't reused any files from the previous version (7.1.0.CR1b).

             

            Thank you in advance!

            • 4. Re: Migrating from JBoss to 7.1.0.CR1b 7.1.0.Final - Domain Mode - Hibernate Infinispan - ClassNotFoundException - $ CacheHelper EvictAll
              Diego Silveira Newbie

              Scott,

               

              Here is the full stacktrace:

              22 Fev 2012 18:43:02,095 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/]] org.apache.catalina.core.StandardContext (MSC service thread 1-1) Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'campaignInputTypeDAO' defined in "/content/pd-ear-1.0.2-SNAPSHOT.ear/api-checkout.war/WEB-INF/lib/pd-core-gateway-1.0.2-SNAPSHOT.jar/br/com/buscape/pd/gateway/model/impl/CampaignInputTypeDAOImpl.class": Unsatisfied dependency expressed through constructor argument with index 0 of type [org.hibernate.SessionFactory]: : Error creating bean with name 'sessionFactory' defined in class path resource [br/com/buscape/pd/dbaccess/config/SessionFactoryContext.class]: Invocation of init method failed; nested exception is org.infinispan.CacheException: Unable to unmarshall value; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in class path resource [br/com/buscape/pd/dbaccess/config/SessionFactoryContext.class]: Invocation of init method failed; nested exception is org.infinispan.CacheException: Unable to unmarshall value

                      at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:730) [spring-beans-3.0.6.RELEASE.jar:3.0.6.RELEASE]

                      at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:196) [spring-beans-3.0.6.RELEASE.jar:3.0.6.RELEASE]

                      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1003) [spring-beans-3.0.6.RELEASE.jar:3.0.6.RELEASE]

                      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:907) [spring-beans-3.0.6.RELEASE.jar:3.0.6.RELEASE]

                      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:485) [spring-beans-3.0.6.RELEASE.jar:3.0.6.RELEASE]

                      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456) [spring-beans-3.0.6.RELEASE.jar:3.0.6.RELEASE]

                      at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:293) [spring-beans-3.0.6.RELEASE.jar:3.0.6.RELEASE]

                      at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) [spring-beans-3.0.6.RELEASE.jar:3.0.6.RELEASE]

                      at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:290) [spring-beans-3.0.6.RELEASE.jar:3.0.6.RELEASE]

                      at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:192) [spring-beans-3.0.6.RELEASE.jar:3.0.6.RELEASE]

                      at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:585) [spring-beans-3.0.6.RELEASE.jar:3.0.6.RELEASE]

                      at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895) [spring-context-3.0.6.RELEASE.jar:3.0.6.RELEASE]

                      at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425) [spring-context-3.0.6.RELEASE.jar:3.0.6.RELEASE]

                      at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:282) [spring-web-3.0.6.RELEASE.jar:3.0.6.RELEASE]

                      at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:204) [spring-web-3.0.6.RELEASE.jar:3.0.6.RELEASE]

                      at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47) [spring-web-3.0.6.RELEASE.jar:3.0.6.RELEASE]

                      at org.apache.catalina.core.StandardContext.contextListenerStart(StandardContext.java:3392) [jbossweb-7.0.10.Final.jar:]

                      at org.apache.catalina.core.StandardContext.start(StandardContext.java:3850) [jbossweb-7.0.10.Final.jar:]

                      at org.jboss.as.web.deployment.WebDeploymentService.start(WebDeploymentService.java:90) [jboss-as-web-7.1.0.Final.jar:7.1.0.Final]

                      at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811)

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

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

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

                      at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_29]

              Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in class path resource [br/com/buscape/pd/dbaccess/config/SessionFactoryContext.class]: Invocation of init method failed; nested exception is org.infinispan.CacheException: Unable to unmarshall value

                      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1420) [spring-beans-3.0.6.RELEASE.jar:3.0.6.RELEASE]

                      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519) [spring-beans-3.0.6.RELEASE.jar:3.0.6.RELEASE]

                      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456) [spring-beans-3.0.6.RELEASE.jar:3.0.6.RELEASE]

                      at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:293) [spring-beans-3.0.6.RELEASE.jar:3.0.6.RELEASE]

                      at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) [spring-beans-3.0.6.RELEASE.jar:3.0.6.RELEASE]

                      at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:290) [spring-beans-3.0.6.RELEASE.jar:3.0.6.RELEASE]

                      at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:192) [spring-beans-3.0.6.RELEASE.jar:3.0.6.RELEASE]

                      at org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:848) [spring-beans-3.0.6.RELEASE.jar:3.0.6.RELEASE]

                      at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:790) [spring-beans-3.0.6.RELEASE.jar:3.0.6.RELEASE]

                      at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:707) [spring-beans-3.0.6.RELEASE.jar:3.0.6.RELEASE]

                      at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:795) [spring-beans-3.0.6.RELEASE.jar:3.0.6.RELEASE]

                      at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:723) [spring-beans-3.0.6.RELEASE.jar:3.0.6.RELEASE]

                      ... 23 more

              Caused by: org.infinispan.CacheException: Unable to unmarshall value

                      at org.infinispan.marshall.MarshalledValue.deserialize0(MarshalledValue.java:159) [infinispan-core-5.1.1.FINAL.jar:5.1.1.FINAL]

                      at org.infinispan.marshall.MarshalledValue.deserialize(MarshalledValue.java:143) [infinispan-core-5.1.1.FINAL.jar:5.1.1.FINAL]

                      at org.infinispan.marshall.MarshalledValue.get(MarshalledValue.java:224) [infinispan-core-5.1.1.FINAL.jar:5.1.1.FINAL]

                      at org.infinispan.interceptors.MarshalledValueInterceptor.visitKeySetCommand(MarshalledValueInterceptor.java:216) [infinispan-core-5.1.1.FINAL.jar:5.1.1.FINAL]

                      at org.infinispan.commands.read.KeySetCommand.acceptVisitor(KeySetCommand.java:55) [infinispan-core-5.1.1.FINAL.jar:5.1.1.FINAL]

                      at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:116) [infinispan-core-5.1.1.FINAL.jar:5.1.1.FINAL]

                      at org.infinispan.interceptors.base.CommandInterceptor.handleDefault(CommandInterceptor.java:130) [infinispan-core-5.1.1.FINAL.jar:5.1.1.FINAL]

                      at org.infinispan.commands.AbstractVisitor.visitKeySetCommand(AbstractVisitor.java:99) [infinispan-core-5.1.1.FINAL.jar:5.1.1.FINAL]

                      at org.infinispan.commands.read.KeySetCommand.acceptVisitor(KeySetCommand.java:55) [infinispan-core-5.1.1.FINAL.jar:5.1.1.FINAL]

                      at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:116) [infinispan-core-5.1.1.FINAL.jar:5.1.1.FINAL]

                      at org.infinispan.interceptors.base.CommandInterceptor.handleDefault(CommandInterceptor.java:130) [infinispan-core-5.1.1.FINAL.jar:5.1.1.FINAL]

                      at org.infinispan.commands.AbstractVisitor.visitKeySetCommand(AbstractVisitor.java:99) [infinispan-core-5.1.1.FINAL.jar:5.1.1.FINAL]

                      at org.infinispan.commands.read.KeySetCommand.acceptVisitor(KeySetCommand.java:55) [infinispan-core-5.1.1.FINAL.jar:5.1.1.FINAL]

                      at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:116) [infinispan-core-5.1.1.FINAL.jar:5.1.1.FINAL]

                      at org.infinispan.interceptors.base.CommandInterceptor.handleDefault(CommandInterceptor.java:130) [infinispan-core-5.1.1.FINAL.jar:5.1.1.FINAL]

                      at org.infinispan.commands.AbstractVisitor.visitKeySetCommand(AbstractVisitor.java:99) [infinispan-core-5.1.1.FINAL.jar:5.1.1.FINAL]

                      at org.infinispan.commands.read.KeySetCommand.acceptVisitor(KeySetCommand.java:55) [infinispan-core-5.1.1.FINAL.jar:5.1.1.FINAL]

                      at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:116) [infinispan-core-5.1.1.FINAL.jar:5.1.1.FINAL]

                      at org.infinispan.interceptors.InvocationContextInterceptor.handleAll(InvocationContextInterceptor.java:130) [infinispan-core-5.1.1.FINAL.jar:5.1.1.FINAL]

                      at org.infinispan.interceptors.InvocationContextInterceptor.handleDefault(InvocationContextInterceptor.java:89) [infinispan-core-5.1.1.FINAL.jar:5.1.1.FINAL]

                      at org.infinispan.commands.AbstractVisitor.visitKeySetCommand(AbstractVisitor.java:99) [infinispan-core-5.1.1.FINAL.jar:5.1.1.FINAL]

                      at org.infinispan.commands.read.KeySetCommand.acceptVisitor(KeySetCommand.java:55) [infinispan-core-5.1.1.FINAL.jar:5.1.1.FINAL]

                      at org.infinispan.interceptors.InterceptorChain.invoke(InterceptorChain.java:345) [infinispan-core-5.1.1.FINAL.jar:5.1.1.FINAL]

                      at org.infinispan.CacheImpl.keySet(CacheImpl.java:305) [infinispan-core-5.1.1.FINAL.jar:5.1.1.FINAL]

                      at org.infinispan.CacheImpl.keySet(CacheImpl.java:298) [infinispan-core-5.1.1.FINAL.jar:5.1.1.FINAL]

                      at org.infinispan.AbstractDelegatingCache.keySet(AbstractDelegatingCache.java:275) [infinispan-core-5.1.1.FINAL.jar:5.1.1.FINAL]

                      at org.hibernate.cache.infinispan.util.CacheAdapterImpl.keySet(CacheAdapterImpl.java:70) [hibernate-infinispan-3.5.6-Final.jar:3.5.6-Final]

                      at org.hibernate.cache.infinispan.timestamp.TimestampsRegionImpl.populateLocalCache(TimestampsRegionImpl.java:134) [hibernate-infinispan-3.5.6-Final.jar:3.5.6-Final]

                      at org.hibernate.cache.infinispan.timestamp.TimestampsRegionImpl.<init>(TimestampsRegionImpl.java:39) [hibernate-infinispan-3.5.6-Final.jar:3.5.6-Final]

                      at org.hibernate.cache.infinispan.InfinispanRegionFactory.buildTimestampsRegion(InfinispanRegionFactory.java:206) [hibernate-infinispan-3.5.6-Final.jar:3.5.6-Final]

                      at org.hibernate.cache.UpdateTimestampsCache.<init>(UpdateTimestampsCache.java:58) [hibernate-core-3.5.6-Final.jar:3.5.6-Final]

                      at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:409) [hibernate-core-3.5.6-Final.jar:3.5.6-Final]

                      at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1385) [hibernate-core-3.5.6-Final.jar:3.5.6-Final]

                      at org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:954) [hibernate-annotations-3.5.6-Final.jar:3.5.6-Final]

                      at org.springframework.orm.hibernate3.LocalSessionFactoryBean.newSessionFactory(LocalSessionFactoryBean.java:860) [spring-orm-3.0.6.RELEASE.jar:3.0.6.RELEASE]

                      at org.springframework.orm.hibernate3.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:779) [spring-orm-3.0.6.RELEASE.jar:3.0.6.RELEASE]

                      at org.springframework.orm.hibernate3.AbstractSessionFactoryBean.afterPropertiesSet(AbstractSessionFactoryBean.java:211) [spring-orm-3.0.6.RELEASE.jar:3.0.6.RELEASE]

                      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1477) [spring-beans-3.0.6.RELEASE.jar:3.0.6.RELEASE]

                      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1417) [spring-beans-3.0.6.RELEASE.jar:3.0.6.RELEASE]

                      ... 34 more

              Caused by: java.lang.ClassNotFoundException: org.hibernate.cache.infinispan.util.CacheHelper$EvictAll from [Module "org.jboss.as.clustering.infinispan:main" from local module loader @6513cf0 (roots: /opt/jboss-as-7.1.0.Final/modules)]

                      at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190)

                      at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468)

                      at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456)

                      at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:423)

                      at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)

                      at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120)

                      at java.lang.Class.forName0(Native Method) [rt.jar:1.6.0_29]

                      at java.lang.Class.forName(Class.java:247) [rt.jar:1.6.0_29]

                      at org.jboss.marshalling.AbstractClassResolver.loadClass(AbstractClassResolver.java:135)

                      at org.jboss.marshalling.AbstractClassResolver.resolveClass(AbstractClassResolver.java:116)

                      at org.jboss.marshalling.river.RiverUnmarshaller.doReadClassDescriptor(RiverUnmarshaller.java:934)

                      at org.jboss.marshalling.river.RiverUnmarshaller.doReadNewObject(RiverUnmarshaller.java:1204)

                      at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:272)

                      at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:209)

                      at org.jboss.marshalling.AbstractObjectInput.readObject(AbstractObjectInput.java:37)

                      at org.infinispan.marshall.jboss.AbstractJBossMarshaller.objectFromObjectStream(AbstractJBossMarshaller.java:148) [infinispan-core-5.1.1.FINAL.jar:5.1.1.FINAL]

                      at org.infinispan.marshall.VersionAwareMarshaller.objectFromByteBuffer(VersionAwareMarshaller.java:110) [infinispan-core-5.1.1.FINAL.jar:5.1.1.FINAL]

                      at org.infinispan.marshall.AbstractMarshaller.objectFromByteBuffer(AbstractMarshaller.java:90) [infinispan-core-5.1.1.FINAL.jar:5.1.1.FINAL]

                      at org.infinispan.marshall.AbstractDelegatingMarshaller.objectFromByteBuffer(AbstractDelegatingMarshaller.java:79) [infinispan-core-5.1.1.FINAL.jar:5.1.1.FINAL]

                      at org.infinispan.marshall.MarshalledValue.deserialize0(MarshalledValue.java:154) [infinispan-core-5.1.1.FINAL.jar:5.1.1.FINAL]

                      ... 76 more

               

               

              I've noticed an important detail:

               

              Our application was built over Hibernate 3.5.6, and so, we have hibernate-inifnispan-3.5.6.Final.jar in the classpath. But JBoss As 7.1.0.Final ships with Hibernate 4.0.1.Final. Maybe it's related to jar conflict, don't you think? If that's true, is there another solution besides changing our application's version of Hibernate from 3.5.6.Final to 4.0.1.Final, declared as a dependency in MANIFEST (in order to use the modules from JBoss)? This changing wouldn't be easy at all (would require a change in Spring too) =/

               

              Thank you!

              • 5. Re: Migrating from JBoss to 7.1.0.CR1b 7.1.0.Final - Domain Mode - Hibernate Infinispan - ClassNotFoundException - $ CacheHelper EvictAll
                Scott Marlow Master

                I think that Spring is adding support for Hibernate 4, so that will come.  Some tips for deploying Spring applications on AS7 are here.

                 

                When Spring deploys the persistence.xml, how does it create the EntityManagerFactory?  Does it perhaps call javax.persistence.Persistence.createEntityManagerFactory

                 

                I would start with a standalone (non-clustered) version of the application and get that going first.  Getting the clustering going, may require some patching/hacking in the AS7 projects.

                 

                Scott

                • 6. Re: Migrating from JBoss to 7.1.0.CR1b 7.1.0.Final - Domain Mode - Hibernate Infinispan - ClassNotFoundException - $ CacheHelper EvictAll
                  Jose Inacio Junior Newbie

                  Hello everyone,

                  Disabling cache replication / timestamp infinispan-hibernate (clustered) configuration leaving only as a local configuration, worked fine.

                   

                  We changed that:

                   

                                  <cache-container name="hibernate" default-cache="local-query">

                                      <local-cache name="local-query">

                                          <eviction strategy="LRU" max-entries="10000"/>

                                          <expiration max-idle="100000"/>

                                      </local-cache>

                                      <invalidation-cache mode="SYNC" name="entity">

                                          <eviction strategy="LRU" max-entries="10000"/>

                                          <expiration max-idle="100000"/>

                                      </invalidation-cache>

                                      <replicated-cache mode="ASYNC" name="timestamps">

                                          <eviction strategy="NONE"/>

                                      </replicated-cache>

                                  </cache-container>

                   

                  To this:

                   

                                  <cache-container name="hibernate" default-cache="local-query">

                                      <local-cache name="local-query">

                                          <eviction strategy="LRU" max-entries="10000"/>

                                          <expiration max-idle="100000"/>

                                      </local-cache>

                                      <invalidation-cache mode="SYNC" name="entity">

                                          <eviction strategy="LRU" max-entries="10000"/>

                                          <expiration max-idle="100000"/>

                                      </invalidation-cache>

                                      <local-cache name="timestamps">

                                          <transaction mode="NONE"/>

                                          <eviction strategy="NONE"/>

                                      </local-cache>

                                  </cache-container>

                   

                   

                  Making this change our application started to work on version 7.1.0.Final.

                  Does this situation really is not an incompatibility between the frameworks used, or a bug?

                   

                  • 7. Re: Migrating from JBoss to 7.1.0.CR1b 7.1.0.Final - Domain Mode - Hibernate Infinispan - ClassNotFoundException - $ CacheHelper EvictAll
                    Scott Marlow Master

                    The AS7 night builds should soon have the AS7-3423 fix (perhaps sometime tomorrow as the build machine is pretty busy tonight). 

                     

                    Once you have the AS7-3423 fix, you will want to set the persistence unit property jboss.as.jpa.managed=false (doc link is here) which should help ensure that the Hibernate 3.5.6 jars (that you packaged with your Spring application) are used (rather than the Hibernate 4.0.1 jars which I think Spring would otherwise use when it calls javax.persistence.Persistence.createEntityManagerFactory()).

                     

                    Maybe you could disable the second level cache while making this change (and try to turn it back on after verifying that the app is working with Hibernate 3.6.5). 

                     

                    <properties>

                       <property name="jboss.as.jpa.managed" value="false"/>

                    </properties>