[jboss-user] [Persistence, JBoss/CMP, Hibernate, Database] - NoSuchMethodError: net.sf.ehcache.Cache.get(Ljava/lang/Objec

beyarecords do-not-reply at jboss.com
Wed Mar 14 06:54:52 EDT 2007


Hi,
I have just migrated from Jboss 4.0.3 to 4.0.5 and am experiencing the above mentioned error. The following structure works flawlessly in 4.0.3 and is as follows:


  | deploy/hibernate.har/jboss-service
  | 
  | deploy/ejb3.deployer/ehcache.xml
  | deploy/ejb3.deployer/ehcache-1.2beta4
  | deploy/ejb3.deployer/ehcache-constructs-0.6
  | 

My jboss-service reads as:


  | <server>
  |     <mbean code="org.jboss.hibernate.jmx.Hibernate" name="jboss.har:service=Hibernate">
  |         <attribute name="SessionFactoryName">java:/hibernate/SessionFactory</attribute>
  |         <attribute name="DatasourceName">java:/PostgresDS</attribute>
  |         <attribute name="Dialect">org.hibernate.dialect.PostgreSQLDialect</attribute>
  |         <attribute name="CacheProviderClass">org.hibernate.cache.EhCacheProvider</attribute>
  |         <attribute name="ShowSqlEnabled">true</attribute>
  |         <attribute name="JdbcBatchSize">25</attribute>
  |     </mbean>
  | </server>
  | 

My cache description is as:


  |  	 <cache name="test.Artist" 
  | 		maxElementsInMemory="500" 
  | 		eternal="false" 
  | 		overflowToDisk="true" 
  | 		timeToIdleSeconds="300" 
  | 		timeToLiveSeconds="600" 
  | 		diskPersistent="false"
  | 		diskExpiryThreadIntervalSeconds="1" />
  | 


The full error listing is as follows:


  | java.lang.NoSuchMethodError: net.sf.ehcache.Cache.get(Ljava/lang/Object;)Lnet/sf/ehcache/Element;
  | 	org.hibernate.cache.EhCache.get(EhCache.java:74)
  | 	org.hibernate.cache.ReadWriteCache.put(ReadWriteCache.java:153)
  | 	org.hibernate.engine.TwoPhaseLoad.initializeEntity(TwoPhaseLoad.java:156)
  | 	org.hibernate.loader.Loader.initializeEntitiesAndCollections(Loader.java:842)
  | 	org.hibernate.loader.Loader.doQuery(Loader.java:717)
  | 	org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:224)
  | 	org.hibernate.loader.Loader.doList(Loader.java:2144)
  | 	org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2028)
  | 	org.hibernate.loader.Loader.list(Loader.java:2023)
  | 	org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:393)
  | 	org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:338)
  | 	org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:172)
  | 	org.hibernate.impl.SessionImpl.list(SessionImpl.java:1121)
  | 	org.hibernate.impl.QueryImpl.list(QueryImpl.java:79)
  | 	org.hibernate.impl.AbstractQueryImpl.uniqueResult(AbstractQueryImpl.java:780)
  | 	test.User.getUser(User.java:328)
  | 	sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  | 	sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
  | 	sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  | 	java.lang.reflect.Method.invoke(Method.java:597)
  | 	org.mozilla.javascript.MemberBox.invoke(MemberBox.java:145)
  | 	org.mozilla.javascript.NativeJavaMethod.call(NativeJavaMethod.java:204)
  | 	org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:3085)
  | 	org.mozilla.javascript.Interpreter.interpret(Interpreter.java:2251)
  | 	org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:161)
  | 	org.apache.cocoon.forms.util.JavaScriptHelper.callFunction(JavaScriptHelper.java:241)
  | 	org.apache.cocoon.forms.validation.impl.JavaScriptValidator.validate(JavaScriptValidator.java:71)
  | 	org.apache.cocoon.forms.formmodel.AbstractWidgetDefinition.validate(AbstractWidgetDefinition.java:318)
  | 	org.apache.cocoon.forms.formmodel.AbstractWidget.validate(AbstractWidget.java:339)
  | 	org.apache.cocoon.forms.formmodel.AbstractContainerWidget.validate(AbstractContainerWidget.java:124)
  | 	org.apache.cocoon.forms.formmodel.Form.validate(Form.java:429)
  | 	org.apache.cocoon.forms.formmodel.Form.process(Form.java:374)
  | 	sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  | 	sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
  | 	sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  | 	java.lang.reflect.Method.invoke(Method.java:597)
  | 	org.mozilla.javascript.MemberBox.invoke(MemberBox.java:145)
  | 	org.mozilla.javascript.NativeJavaMethod.call(NativeJavaMethod.java:204)
  | 	org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:3085)
  | 	org.mozilla.javascript.Interpreter.interpret(Interpreter.java:2251)
  | 	org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:161)
  | 	org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:340)
  | 	org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:2758)
  | 	org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:159)
  | 	org.mozilla.javascript.Context.call(Context.java:489)
  | 	org.mozilla.javascript.ScriptableObject.callMethod(ScriptableObject.java:1556)
  | 	org.mozilla.javascript.ScriptableObject.callMethod(ScriptableObject.java:1526)
  | 	org.apache.cocoon.components.flow.javascript.fom.FOM_JavaScriptInterpreter.handleContinuation(FOM_JavaScriptInterpreter.java:839)
  | 	org.apache.cocoon.components.treeprocessor.sitemap.CallFunctionNode.invoke(CallFunctionNode.java:124)
  | 	org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:69)
  | 	org.apache.cocoon.components.treeprocessor.sitemap.SelectNode.invoke(SelectNode.java:98)
  | 	org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:47)
  | 	org.apache.cocoon.components.treeprocessor.sitemap.MatchNode.invoke(MatchNode.java:108)
  | 	org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:69)
  | 	org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:143)
  | 	org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:69)
  | 	org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:93)
  | 	org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.java:235)
  | 	org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.java:177)
  | 	org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:253)
  | 	org.apache.cocoon.components.treeprocessor.sitemap.MountNode.invoke(MountNode.java:118)
  | 	org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:47)
  | 	org.apache.cocoon.components.treeprocessor.sitemap.MatchNode.invoke(MatchNode.java:108)
  | 	org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:69)
  | 	org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:143)
  | 	org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:69)
  | 	org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:93)
  | 	org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.java:235)
  | 	org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(Conc
  | 

What is the issue here? Clashing classes maybe? Is ehcache loaded elsewhere in Jboss 4.0.5?

--
Regards

Andrew

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

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



More information about the jboss-user mailing list