[jboss-user] [JBoss Cache: Core Edition] - Re: OPTIMISTIC Node Locking Scheme Configuration for EJB3 En

mihai.ratiu do-not-reply at jboss.com
Tue Feb 17 05:50:29 EST 2009


Hi, 

I configured the cache with OPTIMISTIC Locking schema under 'all' configuration of a 4.0.5 GA instance. First I got the following error:

  | INFO  [OptimisticNodeInterceptor] Cannot Handle Method _put(GlobalTransaction:
  | 

I understood that I'm using an older version(SP1 or what is the default version in a clean server configuration) of Jboss Cache 1.4.1 so I copied the new jars from Jboss Cache 1.4.1 SP10 to lib folder. The jars that I copied are jboss-cache.jar and jgroups.jar-> Are there any other jars from dist that I need to add in jboss lib folder to configure cache correctly? 

I also used OptimisticTreeCacheProviderHook as suggested.

Now I get the following exception:


  | 
  | javax.ejb.EJBException: java.lang.RuntimeException: java.lang.NoSuchMethodError: org.hibernate.cache.CacheException.<init>(Ljava/lang/Exception;)V
  | 	at org.jboss.ejb3.tx.Ejb3TxPolicy.handleExceptionInOurTx(Ejb3TxPolicy.java:69)
  | 	at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:83)
  | 	at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:191)
  | 	at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
  | 	at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76)
  | 	at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
  | 	at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:62)
  | 	at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
  | 	at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:77)
  | 	at org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.invoke(Ejb3AuthenticationInterceptor.java:102)
  | 	at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
  | 	at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:47)
  | 	at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
  | 	at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
  | 	at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
  | 	at org.jboss.ejb3.stateless.StatelessContainer.localInvoke(StatelessContainer.java:211)
  | 	at org.jboss.ejb3.stateless.StatelessLocalProxy.invoke(StatelessLocalProxy.java:79)
  | 	at $Proxy168.getSupportedSyncTypesAndCommands(Unknown Source)
  | 	at com.snapon.nemo.server.ds.statemachine.eventproviders.Events.loadSupportedCommadsAndSyncTypes(Events.java:132)
  | 	at com.snapon.nemo.server.ds.statemachine.eventproviders.Events.loadDataOnAplicationContext(Events.java:89)
  | 	at com.snapon.nemo.server.ds.statemachine.service.SyncMLStartUpService.startService(SyncMLStartUpService.java:51)
  | 	at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
  | 	at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
  | 	at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
  | 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  | 	at java.lang.reflect.Method.invoke(Method.java:597)
  | 	at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
  | 	at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
  | 	at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
  | 	at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
  | 	at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
  | 	at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
  | 	at $Proxy0.start(Unknown Source)
  | 	at org.jboss.system.ServiceController.start(ServiceController.java:417)
  | 	at org.jboss.system.ServiceController.start(ServiceController.java:435)
  | 	at sun.reflect.GeneratedMethodAccessor13.invoke(Unknown Source)
  | 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  | 	at java.lang.reflect.Method.invoke(Method.java:597)
  | 	at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
  | 	at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
  | 	at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
  | 	at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
  | 	at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
  | 	at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
  | 	at $Proxy29.start(Unknown Source)
  | 	at org.jboss.ejb3.EJB3Deployer.start(EJB3Deployer.java:449)
  | 	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.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
  | 	at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
  | 	at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
  | 	at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
  | 	at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
  | 	at org.jboss.mx.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:97)
  | 	at org.jboss.system.InterceptorServiceMBeanSupport.invokeNext(InterceptorServiceMBeanSupport.java:238)
  | 	at org.jboss.ws.integration.jboss.DeployerInterceptor.start(DeployerInterceptor.java:92)
  | 	at org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.start(SubDeployerInterceptorSupport.java:188)
  | 	at org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterceptor.java:95)
  | 	at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
  | 	at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
  | 	at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
  | 	at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
  | 	at $Proxy30.start(Unknown Source)
  | 	at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
  | 	at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1015)
  | 	at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
  | 	at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
  | 	at sun.reflect.GeneratedMethodAccessor24.invoke(Unknown Source)
  | 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  | 	at java.lang.reflect.Method.invoke(Method.java:597)
  | 	at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
  | 	at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
  | 	at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
  | 	at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
  | 	at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
  | 	at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
  | 	at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
  | 	at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
  | 	at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
  | 	at $Proxy82.deploy(Unknown Source)
  | 	at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
  | 	at org.jboss.ha.framework.server.FarmMemberService.deploy(FarmMemberService.java:412)
  | 	at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:634)
  | 	at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
  | 	at org.jboss.ha.framework.server.FarmMemberService.startService(FarmMemberService.java:212)
  | 	at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
  | 	at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
  | 	at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
  | 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  | 	at java.lang.reflect.Method.invoke(Method.java:597)
  | 	at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
  | 	at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
  | 	at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
  | 	at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
  | 	at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
  | 	at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
  | 	at $Proxy0.start(Unknown Source)
  | 	at org.jboss.system.ServiceController.start(ServiceController.java:417)
  | 	at sun.reflect.GeneratedMethodAccessor13.invoke(Unknown Source)
  | 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  | 	at java.lang.reflect.Method.invoke(Method.java:597)
  | 	at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
  | 	at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
  | 	at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
  | 	at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
  | 	at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
  | 	at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
  | 	at $Proxy4.start(Unknown Source)
  | 	at org.jboss.deployment.SARDeployer.start(SARDeployer.java:302)
  | 	at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
  | 	at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1015)
  | 	at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
  | 	at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
  | 	at sun.reflect.GeneratedMethodAccessor24.invoke(Unknown Source)
  | 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  | 	at java.lang.reflect.Method.invoke(Method.java:597)
  | 	at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
  | 	at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
  | 	at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
  | 	at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
  | 	at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
  | 	at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
  | 	at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
  | 	at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
  | 	at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
  | 	at $Proxy8.deploy(Unknown Source)
  | 	at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
  | 	at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:634)
  | 	at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
  | 	at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:336)
  | 	at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
  | 	at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
  | 	at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
  | 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  | 	at java.lang.reflect.Method.invoke(Method.java:597)
  | 	at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
  | 	at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
  | 	at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
  | 	at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
  | 	at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
  | 	at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
  | 	at $Proxy0.start(Unknown Source)
  | 	at org.jboss.system.ServiceController.start(ServiceController.java:417)
  | 	at sun.reflect.GeneratedMethodAccessor13.invoke(Unknown Source)
  | 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  | 	at java.lang.reflect.Method.invoke(Method.java:597)
  | 	at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
  | 	at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
  | 	at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
  | 	at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
  | 	at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
  | 	at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
  | 	at $Proxy4.start(Unknown Source)
  | 	at org.jboss.deployment.SARDeployer.start(SARDeployer.java:302)
  | 	at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
  | 	at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
  | 	at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
  | 	at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:766)
  | 	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.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
  | 	at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
  | 	at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
  | 	at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
  | 	at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
  | 	at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
  | 	at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
  | 	at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
  | 	at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
  | 	at $Proxy5.deploy(Unknown Source)
  | 	at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:482)
  | 	at org.jboss.system.server.ServerImpl.start(ServerImpl.java:362)
  | 	at org.jboss.Main.boot(Main.java:200)
  | 	at org.jboss.Main$1.run(Main.java:490)
  | 	at java.lang.Thread.run(Thread.java:619)
  | Caused by: java.lang.RuntimeException: java.lang.NoSuchMethodError: org.hibernate.cache.CacheException.<init>(Ljava/lang/Exception;)V
  | 	at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:174)
  | 	at org.jboss.ejb3.interceptor.EJB3InterceptorsInterceptor.invoke(EJB3InterceptorsInterceptor.java:63)
  | 	at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
  | 	at org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedEntityManagerInterceptor.java:54)
  | 	at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
  | 	at org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:46)
  | 	at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
  | 	at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:79)
  | 	... 177 more
  | Caused by: java.lang.NoSuchMethodError: org.hibernate.cache.CacheException.<init>(Ljava/lang/Exception;)V
  | 	at org.jboss.ejb3.entity.JBCCache.put(JBCCache.java:133)
  | 	at org.hibernate.cache.TransactionalCache.put(TransactionalCache.java:58)
  | 	at org.hibernate.engine.TwoPhaseLoad.initializeEntity(TwoPhaseLoad.java:159)
  | 	at org.hibernate.loader.Loader.initializeEntitiesAndCollections(Loader.java:854)
  | 	at org.hibernate.loader.Loader.doQuery(Loader.java:729)
  | 	at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:236)
  | 	at org.hibernate.loader.Loader.doList(Loader.java:2213)
  | 	at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2104)
  | 	at org.hibernate.loader.Loader.list(Loader.java:2099)
  | 	at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:378)
  | 	at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:338)
  | 	at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:172)
  | 	at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1121)
  | 	at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79)
  | 	at org.hibernate.ejb.QueryImpl.getResultList(QueryImpl.java:65)
  | 	at com.snapon.nemo.server.ds.datastore.DataStore.getSupportedSyncTypesAndCommands(DataStore.java:80)
  | 	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.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:112)
  | 	at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:166)
  | 	... 184 more
  | 

>From what I understand the root cause is the cache put 

org.jboss.ejb3.entity.JBCCache.put(JBCCache.java:133)

The NoSuchMethodError seems to be from an older version of Hibernate that jboss 4.0.5 is using by default, but my concern is why the cache doesn't support put operations? 

Is this because of hibernate or something?

Regards,
Mihai 

View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4210631#4210631

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4210631



More information about the jboss-user mailing list