CDV ❯ got exception with tim-ehcache
-
Bug
-
Status: Closed
-
2 Major
-
Resolution: Duplicate
-
Forge
-
-
foshea
-
Reporter: fern
-
August 13, 2008
-
0
-
Watchers: 2
-
July 27, 2012
-
August 18, 2008
Attachments
Description
I am currently trying to upgrade from 2.5.2 to 2.6.2, with commons-collections, ehcache and jetty support. I’m moving along, but I hit this exception while starting up the server and it looks to be ehcache related. Attached is the full logs, but below is the pertinent exception.
I got the tim from here: http://forge.terracotta.org/releases/projects/tim-ehcache/downloads/tim-ehcache-1.1.2-bin.zip
And I configured the time like so:
The exception while trying to initialize: …. 2008-08-13 08:49:02,328 WARN - The root expression ‘net.sf.ehcache.store.MemoryStoreEvictionPolicy.DSO’ meant for the class ‘net.sf.ehcache.store.MemoryStoreEvictionPolicy’ has no effect, make sure that it i s a valid expression and that it is spelled correctly. 2008-08-13 08:49:02,559 [main] ERROR com.protrade.common.spring.RootFactoryBean - Trouble loading Root org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘tc-on-lockCache-ehcache’ defined in class path resource [terracotta-conf.xml]: Instantiation of bean failed; nested exc eption is org.springframework.beans.factory.BeanDefinitionStoreException: Factory method [public static java.util.Map com.protrade.common.util.LockCache.newLockMap(net.sf.ehcache.CacheManager,java.lang.Strin g)] threw exception; nested exception is java.lang.NoSuchFieldError: DSO Caused by: org.springframework.beans.factory.BeanDefinitionStoreException: Factory method [public static java.util.Map com.protrade.common.util.LockCache.newLockMap(net.sf.ehcache.CacheManager,java.lang.String)] threw exception; nested exception is java.lang.NoSuchFieldError: DSO Caused by: java.lang.NoSuchFieldError: DSO at net.sf.ehcache.store.MemoryStore.create(MemoryStore.java) at net.sf.ehcache.Cache.initialise(Cache.java:505) at net.sf.ehcache.CacheManager.__tc_wrapped_addCacheNoCheck(CacheManager.java:634) at net.sf.ehcache.CacheManager.addCacheNoCheck(CacheManager.java) at net.sf.ehcache.CacheManager.__tc_wrapped_addCache(CacheManager.java:624) at net.sf.ehcache.CacheManager.addCache(CacheManager.java) at com.protrade.common.cache.CacheFactory.attainEhcache(CacheFactory.java:63) at com.protrade.common.util.LockCache.newLockMap(LockCache.java:34) 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:585) at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:118) at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:344) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:783) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:710) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.aw$original$_AW_$createBean$_AW_$org_springframework_beans_factory_support_AbstractAutowireCapableBeanFactory(AbstractAutowireCapableBeanFactory.java:386) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory_1_674776996_662555251___AW_JoinPoint.proceed(Unknown Source) at com.tcspring.GetBeanProtocol.beanNameCflow(GetBeanProtocol.java:74) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory_1_674776996_662555251___AW_JoinPoint.proceed(Unknown Source) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory_1_674776996_662555251___AW_JoinPoint.invoke(Unknown Source) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:249) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:155) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:246) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164) at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:761) at com.protrade.common.spring.RootFactoryBean$1.newRoot(RootFactoryBean.java:155) at com.protrade.terracotta.MasterRoot.attainDeferred(MasterRoot.java:122) at com.protrade.common.spring.RootFactoryBean.createInstance(RootFactoryBean.java:153)
….
Comments
Hung Huynh 2008-08-13
Fernando Padilla 2008-08-13
Alex Miller just said this on the mailing list:
This is the same error as: http://jira.terracotta.org/jira/browse/CDV-795
We have fixed this in 2.7 and also moved the fix back to the 2.6
branch for 2.6.3 which it looks like will happen in the near future.
Or you can use a 2.6.3 nightly (although I cringe in that this will
likely affect your tim versions).
Fernando Padilla 2008-08-13
Yeah, I saw the secondary exception, but I was hoping that it would be fixed once the first exception was fixed.. ( or that I should focus on one at a time ) :)
So it looks like this bug is a duplicate bug.. (someone can mark this as such)
but now I have to either build 2.6.3 TC and TIMs myself, or wait until someone does that for me :) :)
Fernando Padilla 2008-08-13
I just tried this with 2.7.0-SNAPSHOT and still got the same errors.
I also noticed two other weird errors that might be related.
…. 2008-08-13 13:04:38,384 [main] INFO org.springframework.beans.factory.xml.XmlBeanDefinitionReader - Loading XML bean definitions from URL [jar:file:/export/home/fern/servers/jakarta-tomcat/webapps/ROOT/WEB-INF/lib/protrade-common-7.0-SNAPSHOT.jar!/beanRefContext.xml] AW::WARNING - could not load class [org/springframework/aop/config/AopNamespaceUtils] as a resource in loader [WebappClassLoader delegate: false repositories: /WEB-INF/classes/ ———-> Parent Classloader: org.apache.catalina.loader.StandardClassLoader@13e17fc ] AW::WARNING metadata structure could not be build for method [org.springframework.aop.config.AopNamespaceUtils.registerAutoProxyCreatorIfNecessary:(Lorg/springframework/beans/factory/xml/ParserContext;Ljava/lang/Object;)V] when parsing method [org.springframework.transaction.config.AnnotationDrivenBeanDefinitionParser.parseInternal(..)] ….
….
2008-08-13 13:04:41,778 [main] INFO org.springframework.beans.factory.support.DefaultListableBeanFactory - Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@18355aa: defining beans [commentAdmins,appAdmins]; parent: org.springframework.beans.factory.support.DefaultListableBeanFactory@1841d38
2008-08-13 13:04:41,779 [main] INFO org.springframework.web.context.ContextLoader - Root WebApplicationContext: initialization completed in 6120 ms
AW::WARNING - could not load class [com/tcclient/cache/CacheData] as a resource in loader [WebappClassLoader
delegate: false
repositories:
/WEB-INF/classes/
———-> Parent Classloader:
org.apache.catalina.loader.StandardClassLoader@13e17fc
]
AW::WARNING metadata structure could not be build for method [com.tcclient.cache.CacheData.
Fernando Padilla 2008-08-13
This is the log file when I ran against TC 2.7.0-SNAPSHOT
Fernando Padilla 2008-08-13
shoot. please ignore my last two comments, those were meant for another bug :(
Fiona OShea 2008-08-14
Fiona: Check in with Alex on the issue
Alex Miller 2008-08-14
Duplicate of CDV-795, already in 2.6 branch for 2.6.3 and in 2.7.
You might already have checked this but did you have ehcache-1.3.jar in your/lib?
There’s also another fatal error in the log regarding Spring, seems to me the class be come too big after being instrumented by Spring and TC.
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘pmf.fandom’ defined in class path resource [fandom-data-conf.xml]: Instantiation of bean failed; nested exception is java.lang.ClassFormatError: Invalid length 65471 in LocalVariableTable in class file kodo/runtime/PersistenceManagerImpl Caused by: java.lang.ClassFormatError: Invalid length 65471 in LocalVariableTable in class file kodo/runtime/PersistenceManagerImpl at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:620) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124) at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1847)