1 Reply Latest reply on Aug 4, 2012 6:04 AM by Mayank Gupta

    EntityPersister.getCacheAccessStrategy() throws NoSuchMethodError with Hibernate 4.1.0 and infinispan5.1.2

    Mayank Gupta Newbie

      EntityPersister.getCacheAccessStartegy() method is throwing the follwowing error at RUNTIME.

      We we see te return type we are getting at runtime for this API then it is referring to org/hibernate/cache/access/EntityRegionAccessStrategy.

      On opening the hibernate core jar of 4.1.0 it can be seen that this class has been moved to org.hibernate.cache.spi.access package.

      It looks that hibernate classes or JBOSS interceptors at some place is calling wrong method signature.

      Please help me how to resolve the issue.

       

       

      Caused by: java.lang.NoSuchMethodError: org.hibernate.persister.entity.EntityPersister.getCacheAccessStrategy()Lorg/hibernate/cache/access/EntityRegionAccessStrategy;

                at com.productcommissiongroup.ProductCommissionGroupProductManager.clearCache(ProductCommissionGroupProductManager.java:290)

                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

                at java.lang.reflect.Method.invoke(Method.java:597)

                at org.jboss.as.ee.component.ManagedReferenceMethodInterceptorFactory$ManagedReferenceMethodInterceptor.processInvocation(ManagedReferenceMethodInterceptorFactory.java:72)

                at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

                at org.jboss.invocation.WeavedInterceptor.processInvocation(WeavedInterceptor.java:53)

                at org.jboss.as.ee.component.interceptors.UserInterceptorFactory$1.processInvocation(UserInterceptorFactory.java:36)

                at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

                at org.jboss.as.jpa.interceptor.SBInvocationInterceptor.processInvocation(SBInvocationInterceptor.java:47)

                at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

                at org.jboss.invocation.InitialInterceptor.processInvocation(InitialInterceptor.java:21)

                at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

                at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61)

                at org.jboss.as.ee.component.interceptors.ComponentDispatcherInterceptor.processInvocation(ComponentDispatcherInterceptor.java:53)

                at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

                at org.jboss.as.ejb3.component.pool.PooledInstanceInterceptor.processInvocation(PooledInstanceInterceptor.java:51)

                at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

                at org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInCallerTx(CMTTxInterceptor.java:202)

                ... 114 more