Hi,
I'm setting up the spring cache module in the following environment:
Spring Modules 0.9
Spring 2.5.5
Sun JDK 1.5_13
EHCache 1.5.0
When I declare a cache proxy using the the <map> for the cachingModels everything works fine:
But when I attempt to use the <props> syntax I get "java.lang.NoClassDefFoundError" but it does not specify what class it cannot find.Code:<bean id="myBean" class="org.springmodules.cache.interceptor.proxy.CacheProxyFactoryBean"> <property name="cacheProviderFacade" ref="cacheProviderFacade" /> <property name="cachingModels"> <map> <entry key="get*"> <bean class="org.springmodules.cache.provider.ehcache.EhCacheCachingModel"> <property name="cacheName" value="myCache" /> </bean> </entry> </map> </property> <property name="target" ref="myTarget" /> </bean>
Results in:Code:<bean id="myBean" class="org.springmodules.cache.interceptor.proxy.CacheProxyFactoryBean"> <property name="cacheProviderFacade" ref="cacheProviderFacade" /> <property name="cachingModels"> <props> <prop key="get*">cacheName=myCache</prop> </props> </property> <property name="target" ref="myTarget" /> </bean>
Code:Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'myBean' defined in class path resource [/application-context.xml]: Invocation of init method failed; nested exception is java.lang.NoClassDefFoundError at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1337) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:473) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409) at java.security.AccessController.doPrivileged(Native Method) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:221) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:423) at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:729) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:381) at org.springframework.test.context.support.AbstractGenericContextLoader.loadContext(AbstractGenericContextLoader.java:84) at org.springframework.test.context.support.AbstractGenericContextLoader.loadContext(AbstractGenericContextLoader.java:42) at org.springframework.test.context.TestContext.loadApplicationContext(TestContext.java:173) at org.springframework.test.context.TestContext.getApplicationContext(TestContext.java:199) ... 16 more Caused by: java.lang.NoClassDefFoundError at org.springmodules.cache.provider.ReflectionCacheModelEditor.setAsText(ReflectionCacheModelEditor.java:84) at org.springmodules.cache.interceptor.caching.AbstractCachingInterceptor.propertiesToModels(AbstractCachingInterceptor.java:177) at org.springmodules.cache.interceptor.caching.AbstractCachingInterceptor.afterPropertiesSet(AbstractCachingInterceptor.java:71) at org.springmodules.cache.interceptor.proxy.CacheProxyFactoryBean.afterPropertiesSet(CacheProxyFactoryBean.java:92) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1368) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1334) ... 32 more
I downloaded the source to debug it and it blows up on the same line as the stack trace with no extra information.
I'm stumped. Can anyone point me in the right direction?


