Git Product home page Git Product logo

ehcache-spring-annotations's People

Contributors

edalquist avatar nblair avatar

ehcache-spring-annotations's Issues

Split the project into a -core module and impl modules

Create a core module with all of the core logic for the annotations as well as 
the CacheManager/Cache SPI definitions.

Move all Ehcache specific code into an ehcache module allowing deployers to 
choose the implementation that best fits their needs.

Original issue reported on code.google.com by eric.dalquist on 26 Aug 2010 at 3:34

  • Blocked on: #43

Missing Dependency javax.transaction:transaction-api:jar:1.0.1B

Hi Eric,
I started with the ehcache-spring-annotations from code.google. After I added 
the maven 
dependency
com.googlecode.ehcache-spring-annotations
ehcache-spring-annotations
1.0.1
I got this error
[ERROR] BUILD ERROR
[INFO] ————————————————————————
[INFO] Failed to resolve artifact.
Missing:
———-
1) javax.transaction:transaction-api:jar:1.0.1B
Any ideas?

Original issue reported on code.google.com by [email protected] on 8 Apr 2010 at 11:23

Wrong CacheManager is looked up

What steps will reproduce the problem?
1. Define a spring bean with id "cacheManager". This bean should not be of type 
"net.sf.ehcache.CacheManager".
2. Define a spring bean of type "net.sf.ehcache.CacheManager" with another id 
e.g. "ehCacheManager".
3. Reference the "ehCacheManager" bean in the ehcache-spring-annotations 
configuration e.g. <ehcache:annotation-driven cache-manager = "ehCacheManager" 
/>

What is the expected output? What do you see instead?
You'd expect that the plugin would use the ehCacheManager bean and not the 
cacheManager bean, but instead the cacheManager is wrongfully used. It seems 
that although you referenced a specific CacheManger, if there's also a bean 
name "cacheManager" defined, it will use that bean anyhow.

Partial stacktrace:
org.springframework.beans.factory.BeanCreationException: Error creating bean 
with name 
'com.googlecode.ehcache.annotations.config.internalEhCacheEvictionTask': 
Initialization of bean failed; nested exception is 
org.springframework.beans.TypeMismatchException: Failed to convert property 
value of type [my.package.cache.CacheManagerImpl] to required type 
[net.sf.ehcache.CacheManager] for property 'cacheManager'; nested exception is 
java.lang.IllegalArgumentException: Cannot convert value of type 
[my.package.cache.CacheManagerImpl] to required type 
[net.sf.ehcache.CacheManager] for property 'cacheManager': no matching editors 
or conversion strategy found

What version of the product are you using? On what operating system?
1.1.2

Please provide any additional information below.
It seems to me that the strategy should be: if you implicitly reference a 
CacheManager as follows, <ehcache:annotation-driven cache-manager = 
"ehCacheManager" />, you should always search for and use that bean. A bean 
with id "cacheManager" should be ignored.

Original issue reported on code.google.com by [email protected] on 7 Jul 2010 at 8:13

Error dumped

ERROR [ContextLoader] Context initialization failed
org.springframework.beans.factory.access.BootstrapException: Unable to 
initialize group definition. Group resource name 
[classpath*:org/egov/infstr/beanfactory/erpApplicationContext.xml], factory key 
[erpApplicationContext]; nested exception is 
org.springframework.beans.factory.BeanCreationException: Error creating bean 
with name 'erpApplicationContext' defined in URL 
[file:/C:/Server/JbossTRUNK/server/default/deploy/egi.ear/egijava.jar/org/egov/i
nfstr/beanfactory/erpApplicationContext.xml]: Instantiation of bean failed; 
nested exception is org.springframework.beans.BeanInstantiationException: Could 
not instantiate bean class 
[org.springframework.context.support.ClassPathXmlApplicationContext]: 
Constructor threw exception; nested exception is 
org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected 
exception parsing XML document from class path resource 
[org/egov/infstr/beanfactory/applicationContext-cache.xml]; nested exception is 
java.lang.NoSuchMethodError: 
org.springframework.aop.config.AopNamespaceUtils.registerAutoProxyCreatorIfNeces
sary(Lorg/springframework/beans/factory/xml/ParserContext;Lorg/w3c/dom/Element;)
V
Caused by: 
org.springframework.beans.factory.BeanCreationException: Error creating bean 
with name 'erpApplicationContext' defined in URL 
[file:/C:/Server/JbossTRUNK/server/default/deploy/egi.ear/egijava.jar/org/egov/i
nfstr/beanfactory/erpApplicationContext.xml]: Instantiation of bean failed; 
nested exception is org.springframework.beans.BeanInstantiationException: Could 
not instantiate bean class 
[org.springframework.context.support.ClassPathXmlApplicationContext]: 
Constructor threw exception; nested exception is 
org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected 
exception parsing XML document from class path resource 
[org/egov/infstr/beanfactory/applicationContext-cache.xml]; nested exception is 
java.lang.NoSuchMethodError: 
org.springframework.aop.config.AopNamespaceUtils.registerAutoProxyCreatorIfNeces
sary(Lorg/springframework/beans/factory/xml/ParserContext;Lorg/w3c/dom/Element;)
V
Caused by: 
org.springframework.beans.BeanInstantiationException: Could not instantiate 
bean class 
[org.springframework.context.support.ClassPathXmlApplicationContext]: 
Constructor threw exception; nested exception is 
org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected 
exception parsing XML document from class path resource 
[org/egov/infstr/beanfactory/applicationContext-cache.xml]; nested exception is 
java.lang.NoSuchMethodError: 
org.springframework.aop.config.AopNamespaceUtils.registerAutoProxyCreatorIfNeces
sary(Lorg/springframework/beans/factory/xml/ParserContext;Lorg/w3c/dom/Element;)
V
Caused by: 
org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected 
exception parsing XML document from class path resource 
[org/egov/infstr/beanfactory/applicationContext-cache.xml]; nested exception is 
java.lang.NoSuchMethodError: 
org.springframework.aop.config.AopNamespaceUtils.registerAutoProxyCreatorIfNeces
sary(Lorg/springframework/beans/factory/xml/ParserContext;Lorg/w3c/dom/Element;)
V
Caused by: 
java.lang.NoSuchMethodError: 
org.springframework.aop.config.AopNamespaceUtils.registerAutoProxyCreatorIfNeces
sary(Lorg/springframework/beans/factory/xml/ParserContext;Lorg/w3c/dom/Element;)
V
    at com.googlecode.ehcache.annotations.config.AnnotationDrivenEhCacheBeanDefinitionParser.parse(AnnotationDrivenEhCacheBeanDefinitionParser.java:76)
    at org.springframework.beans.factory.xml.NamespaceHandlerSupport.parse(NamespaceHandlerSupport.java:69)
    at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1114)
    at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1104)
    at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:133)
    at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:90)
    at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:458)
    at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:353)
    at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:303)
    at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:280)
    at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:131)
    at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:147)
    at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:173)
    at org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:112)
    at org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:79)
    at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:101)
    at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:389)
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:324)
    at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:91)
    at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:75)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
    at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:85)
    at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:87)
    at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:186)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:799)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:717)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:384)
    at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:251)
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:156)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:248)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160)
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:287)
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:352)
    at org.springframework.context.access.ContextSingletonBeanFactoryLocator.initializeDefinition(ContextSingletonBeanFactoryLocator.java:141)
    at org.springframework.beans.factory.access.SingletonBeanFactoryLocator.useBeanFactory(SingletonBeanFactoryLocator.java:382)
    at org.springframework.web.context.ContextLoader.loadParentContext(ContextLoader.java:315)
    at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:183)
    at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:49)
    at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3856)
    at org.apache.catalina.core.StandardContext.start(StandardContext.java:4361)
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:790)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:770)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:553)
    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.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:296)
    at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:164)
    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
    at org.apache.catalina.core.StandardContext.init(StandardContext.java:5312)
    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.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:296)
    at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:164)
    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
    at org.jboss.web.tomcat.service.TomcatDeployer.performDeployInternal(TomcatDeployer.java:301)
    at org.jboss.web.tomcat.service.TomcatDeployer.performDeploy(TomcatDeployer.java:104)
    at org.jboss.web.AbstractWebDeployer.start(AbstractWebDeployer.java:375)
    at org.jboss.web.WebModule.startModule(WebModule.java:83)
    at org.jboss.web.WebModule.startService(WebModule.java:61)
    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.GeneratedMethodAccessor9.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 $Proxy44.start(Unknown Source)
    at org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:466)
    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.wsf.container.jboss42.DeployerInterceptor.start(DeployerInterceptor.java:87)
    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 $Proxy45.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.GeneratedMethodAccessor21.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 $Proxy9.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.GeneratedMethodAccessor9.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:304)
    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:508)
    at java.lang.Thread.run(Thread.java:619)

Original issue reported on code.google.com by [email protected] on 16 Jun 2010 at 10:38

Run time exception IlligalStateException

I am having problem injecting a bean that was made cacheable. During start-up I 
get IlligalState exception telling me this

Cannot convert value of type [$Proxy13 implementing 
org.springframework.beans.factory.InitializingBean,org.springframework.aop.Sprin
gProxy,org.springframework.aop.framework.Advised] to required type [x.y.x.Type] 
for property 'productDao': no matching editors or conversion strategy found

Please see attachments.

Original issue reported on code.google.com by [email protected] on 14 Jun 2010 at 7:43

Attachments:

HashCodeCacheKeyGenerator provides bad keys for float and double method parameters

What steps will reproduce the problem?
1. mark a method with float or double parameters as Cacheable using the default 
key generator
2. access the method twice with different parameters differing only in the 
non-integer part
3. see the cache get hit on the second time rather than passing through to the 
method

Noticed in ehcache-spring-annotations 1.0.3

Suggested fix: HashCodeCacheKeyGenerator#getHashCode(Number) should use 
hashCode() in 
rather than longValue() -- in fact, why not just remove the method and allow 
the 
getHashCode(Object) to work?

Original issue reported on code.google.com by [email protected] on 27 May 2010 at 10:33

ehcache-spring-1.1.xsd does not exist in usual location

http://ehcache-spring-annotations.googlecode.com/svn/schema/ehcache-spring/ehcac
he-spring-1.1.xsd does not exist in the location. I tried to setup the project 
by using the 1.1-RC1 version. But the XSD file does not exist in this location

I used the 
http://ehcache-spring-annotations.googlecode.com/svn/tags/ehcache-spring-annotat
ions-1.1.0-RC1/src/main/resources/com/googlecode/ehcache/annotations/ehcache-spr
ing-1.1.xsd

I think it would be better to have the file in usual location.

Original issue reported on code.google.com by [email protected] on 8 Jun 2010 at 7:46

Use Sonatype parent pom

Use the parent pom provided by Sonatype for artifacts hosted in their
repository:

https://docs.sonatype.com/display/NX/OSS+Repository+Hosting#OSSRepositoryHosting
-PutItTogether

Original issue reported on code.google.com by eric.dalquist on 28 May 2010 at 9:54

Allow self populating cache scope to be set

On the ehcache:config schema element allow for the scope of self-populating
caches to be set. The two scope options should be "method" and "shared"

Original issue reported on code.google.com by eric.dalquist on 26 Mar 2010 at 12:17

Support concept of cache resolve

I have a usecase where I want to "partition" the cache.
E.g. The name of the cache in @Cachable is fine, but I want the interceptor to 
call a CacheResolver class which resolves the end-cache name based on some 
other contectual metadata I provide through my application.

The usecase for this is that I want several cache instances which cache the 
same info, but several different instances to have an isolated instance for 
each of my customers (we have a multicustomer environement). This way I can 
size them suitable for each customer - but still keep my code/metainfo quite so 
clean.

Original issue reported on code.google.com by [email protected] on 1 Oct 2010 at 9:07

Documentation - mistake in the Default example code sample - @TriggersRemove

What steps will reproduce the problem?
1.Visit 
http://code.google.com/p/ehcache-spring-annotations/wiki/UsingTriggersRemove
2.Look at the "second" code sample of "Default Example" -> DefaultWeatherDao 
class, it has a method named called "deleteWeather"
3.Now, look at the "third" code sample of "Default Example" -> 
DefaultWeatherDao class, it has "updateWeather" method instead of 
"deleteWeather"

What is the expected output? What do you see instead?
It has to be "deleteWeather" method, instead it is "updateWeather" method

Original issue reported on code.google.com by [email protected] on 30 Sep 2010 at 3:24

New version of Ehcace 2.0.0 to 2.1.0

While using ehcache-spring-annotations, Ehcache logs this message:

1000 [net.sf.ehcache.CacheManager@3e97df] INFO
net.sf.ehcache.util.UpdateChecker - New update(s) found: 2.1.0
[http://ehcache.org/news.html]. Please check http://ehcache.org for the
latest version.

Would it be possible to migrate to the newest version of Ehcache?

Original issue reported on code.google.com by [email protected] on 20 May 2010 at 8:50

spring-tool-3.0.xsd not found when using spring 2.x

What steps will reproduce the problem?
1. Create a Spring 2.x and ehcache-spring-annotations 1.1 project
2. Exclude ehcache-spring-annotations Spring 3 dependencies (because you're 
using Spring 2.x)

What is the expected output? What do you see instead?
At deployment time, a warning is shown.  It appears that your xsd points to 
spring-tools-3.0.xsd which of course is not available.
org.xml.sax.SAXParseException: schema_reference.4: Failed to read schema 
document 'http://www.springframework.org/schema/tool/spring-tool-3.0.xsd', 
because 1) could not find the document; 2) the document could not be read; 3) 
the root element of the document is not <xsd:schema>.

What version of the product are you using? On what operating system?
Spring 2.x and ehcache-spring-annotations 1.1, Windows XP Prof

Please provide any additional information below.
So, I realize that this is not a true bug. Is there a work around available for 
Spring 2.x users?

Original issue reported on code.google.com by [email protected] on 6 Jul 2010 at 1:02

Break up AnnotationDrivenEhCacheBeanDefinitionParser

Break up the code in AnnotationDrivenEhCacheBeanDefinitionParser into
logical methods instead of just one big block. This should help with
readability and functional extensions.

Original issue reported on code.google.com by eric.dalquist on 31 Mar 2010 at 3:42

Enhancement: OSGi headers in the MANIFEST

This is an enhancement request. 

Can you please add the OSGi headers in the packaged MANIFEST, so that the 
ehcache-spring-annotations package can be used in an OSGi environment without 
needing to repackage it.

Doing this is fairly straight-forward with a tool such as Bundlor 
(http://www.springsource.org/bundlor) or the Felix Maven Bundle Plugin 
(http://felix.apache.org/site/apache-felix-maven-bundle-plugin-bnd.html)

Thanks.

Original issue reported on code.google.com by [email protected] on 16 Jun 2010 at 2:44

Update wiki maven information

Wiki says ehcache-spring-annotations can be downloaded on java.net repository.

It seems ehcache-spring-annotations is no longer deployed there, and I
couldn't find 1.0.5 on central either. I could only find it in Sonatype OSS.

Do you intend to not longer deploy on central? As I use Nexus, I need to
know if I need to declare Sonatype OSS in the proxified repos.

Could you please update the wiki page?

Thanks!
Sincerelery,

Stéphane Landelle

Original issue reported on code.google.com by [email protected] on 2 Jun 2010 at 8:22

Let interval config property be configured with a PPH

The interval property of the new config namespace element is resolved by
EhCacheConfigBeanDefinitionParser as an int, so it cannot be configured
with a PropertyPlaceHolder.

interval should be directly expressed in msec and be resolved as a String.


Original issue reported on code.google.com by [email protected] on 7 Jun 2010 at 2:21

Enter one-line summary

i have two spring applicationContext.xml file, One is in my product jar and 
another one is in my product war. i have defined cache config inside 
applicationContext.xml which resides in jar. Caching is not working for the 
bean i have defined in the applicationContext.xml which resides in the war. 

Original issue reported on code.google.com by [email protected] on 21 Jun 2010 at 9:42

Create KeyGenerator annotation

Setup a KeyGenerator annotation that can be used to specify and configure a
key generator without having to rely on an external Spring bean.

Original issue reported on code.google.com by eric.dalquist on 29 Apr 2010 at 4:36

java.lang.NoSuchMethodError: org.springframework.beans.MutablePropertyValues.add(Ljava/lang/String;Ljava/lang/Object;)

Hi,

Thanks for your great work. I want to use your API but got an error at
deployment. The spring-beans-3.0.1.RELEASE.jar is in the classpath but no
"add(String; Object;)" method exists in the
org.springframework.beans.MutablePropertyValues class !

I'm using ehcache-spring-annotations-1.0.3.

Please come back to me, it's pretty urgent.

StackTrace :
Caused by: java.lang.NoSuchMethodError:
org.springframework.beans.MutablePropertyValues.add(Ljava/lang/String;Ljava/lang
/Object;)Lorg/springframework/beans/MutablePropertyValues;
    at
com.googlecode.ehcache.annotations.config.AnnotationDrivenEhCacheBeanDefinitionP
arser.setupCacheAttributeSource(AnnotationDrivenEhCacheBeanDefinitionParser.java
:156)
    at
com.googlecode.ehcache.annotations.config.AnnotationDrivenEhCacheBeanDefinitionP
arser.parse(AnnotationDrivenEhCacheBeanDefinitionParser.java:83)
    at
org.springframework.beans.factory.xml.NamespaceHandlerSupport.parse(NamespaceHan
dlerSupport.java:69)
    at
org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomEl
ement(BeanDefinitionParserDelegate.java:1297)
    at
org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomEl
ement(BeanDefinitionParserDelegate.java:1287)
    at
org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseB
eanDefinitions(DefaultBeanDefinitionDocumentReader.java:135)
    at
org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.regist
erBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:92)
    at
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefini
tions(XmlBeanDefinitionReader.java:507)
    at
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefiniti
ons(XmlBeanDefinitionReader.java:398)


Original issue reported on code.google.com by [email protected] on 29 Apr 2010 at 10:00

Cannt find XSD for 1.1

Hi,

i cann't find the xsd for the 1.1 version in my spring configuration.

I am using the maven deb:

<groupId>com.googlecode.ehcache-spring-annotations</groupId>
artifactId>ehcache-spring-annotations</artifactId>
<version>1.1.0-RC1</version>

the version 1.0 is found. what did i have to do to make it working?

this is a realy nice project thanks a lot.

best regards

meleagros

Original issue reported on code.google.com by [email protected] on 2 Jun 2010 at 5:17

Fix package name

Package name includes ecache instead of ehcache 

Original issue reported on code.google.com by eric.dalquist on 31 Mar 2010 at 9:49

Enum hashCode handling

Special handling for Enums should be added since hashCode on an Enum always
returns the Object hashCode. This will work within a single JVM but fail
cross-JVM instances during replication or using a disk store between restarts.

Original issue reported on code.google.com by eric.dalquist on 16 Apr 2010 at 1:56

Support Interceptor usage without annotations

This is an enhancement request to allow for usage of the cache interceptors via 
spring config without having to add the annotations to the cached 
classes/objects.  This would be more consistent with most other offerings in 
spring that are annotation driven and I would like to be able to cache the 
results of a method on a class in a third party jar that I am unable to 
annotate.

Please provide any additional information below.

See 
http://groups.google.com/group/ehcache-spring-annotations/browse_thread/thread/a
4daab95d2676d69/e859f9e5ddcc10da#e859f9e5ddcc10da

Original issue reported on code.google.com by [email protected] on 15 Sep 2010 at 5:50

mailinglist

Would it be possible to setup a mailinglist for this project?

First of all I want to tell you guys that I am really happy with this
project. But I am facing a problem and would like to know whether I am
doing something wrong. 

Original issue reported on code.google.com by [email protected] on 12 Apr 2010 at 6:54

Add 'when' parameter for @TriggersRemove

Recent forum discussion highlighted need to specify when the Ehcache remove
function should be called for a @TriggersRemove annotated method. Allow
choice of "before method invocation" and "after method invocation".


Original issue reported on code.google.com by nicholas.blair on 28 May 2010 at 3:54

Create CacheManager and Cache abstractions

To allow for the use of a different caching implementation create an 
abstraction for the CacheManager and Ehcache APIs. It would be good where 
possible to use matching APIs from the JSR-107 specification. Optional 
extensions for features such as expired element eviction and blocking 
population will be needed as well.

Original issue reported on code.google.com by eric.dalquist on 26 Aug 2010 at 3:32

  • Blocking: #44

Use cacheManager.getEhcache instead of getCache

Using getEhcache in CacheAttributeSourceImpl would allow us to use
decorated ehcache implementations. There is no need to use getCache. The
cache is acessed via the EHCache-Interface anyway.

Original issue reported on code.google.com by [email protected] on 9 May 2010 at 12:50

Logging is not working

What steps will reproduce the problem?

1. Logging is not working for cache. Whether is it useful to read log to 
troubleshoot issues or not that I do not know. Please advise on that too.

This is the log4j caching configuration.

log4j.logger.com.googlecode.ehcache=INFO,cache

log4j.appender.cache=org.apache.log4j.RollingFileAppender
log4j.appender.cache.File=${returnpath.logging.path}/PmsCache.log
log4j.appender.cache.MaxFileSize=10000KB
log4j.appender.cache.MaxBackupIndex=5
log4j.appender.cache.layout=org.apache.log4j.PatternLayout
log4j.appender.cache.layout.ConversionPattern=%d{DATE} %5p [%X] %c{1} - %m%n



What is the expected output? What do you see instead?

   Log should be written in file.

What version of the product are you using? On what operating system?

   1.1.1 and unix.

Please provide any additional information below.

   All the info are in #1



Original issue reported on code.google.com by [email protected] on 2 Jul 2010 at 6:18

Documentation

Would be nice to see some related code examples on this wiki  :)

Cheers,

Stephan

Original issue reported on code.google.com by [email protected] on 30 Mar 2010 at 12:10

Eliminate package cycles

The config and impl packages have circular package dependencies as described by 
jDepend. Re-arrange code to eliminate cycles between packages.

Original issue reported on code.google.com by eric.dalquist on 6 Jul 2010 at 3:12

construct a sensible mechanism to invoke Ehcache#evictExpiredElements()

May or may not be in scope for this project, but:

I find myself repeatedly writing a class that takes a reference to the
CacheManager and exposes one method. This method iterates through the
Ehcache instances in the CacheManager, invoking evictExpiredElements() on
each one.
Periodic invocation of this method is configured in the application's
Spring configuration.

It would be very useful to construct a component that would execute this
same logic and could be optionally enabled/disabled.

Original issue reported on code.google.com by nicholas.blair on 14 Apr 2010 at 7:59

Does not work with Spring 2.5

It appears that some minor changes are all that is needed to get the
library working on Spring 2.5

Original issue reported on code.google.com by eric.dalquist on 28 Apr 2010 at 7:48

Not deployable to OSGi environment

What steps will reproduce the problem?
1.Create an osgi project using the maven bundle plugin
2.Attempt to deploy the project to servicemix 4.3
3.when starting the bundle get a NoClassDefFoundError

What is the expected output? What do you see instead?
I expect the bundle to start. Instead initially you get an Unresolved 
constraint error saying it depends on net.sf.ehcache version 2.0.0 to 3.0.0. if 
I wrap the ehcache-core dependency as an OSGi bundle using the pax wrap 
protocol and give the packages a version of 2.1 that error is removed. When 
trying to start the project when we have an OSGi wrapped ehcache-core I get 
this error:

org.springframework.beans.factory.BeanCreationException: Error creating bean 
with name 'com.googlecode.ehcache.annotations.key.CachingReflectionHelper': 
Initialization of bean failed; nested exception is 
org.springframework.beans.factory.BeanCreationException: Error creating bean 
with name 
'com.googlecode.ehcache.annotations.config.internalEhCacheCachingAdvisor': 
Cannot resolve reference to bean 
'com.googlecode.ehcache.annotations.impl.CacheStaticMethodMatcherPointcut#0' 
while setting bean property 'pointcut'; nested exception is 
org.springframework.beans.factory.BeanCreationException: Error creating bean 
with name 
'com.googlecode.ehcache.annotations.impl.CacheStaticMethodMatcherPointcut#0': 
Cannot resolve reference to bean 
'com.googlecode.ehcache.annotations.impl.CacheAttributeSourceImpl#0' while 
setting bean property 'cacheAttributeSource'; nested exception is 
org.springframework.beans.factory.BeanCreationException: Error creating bean 
with name 'com.googlecode.ehcache.annotations.impl.CacheAttributeSourceImpl#0': 
Initialization of bean failed; nested exception is 
java.lang.NoClassDefFoundError: Lnet/sf/ehcache/CacheManager; 
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:527)[61:org.springframework.beans:3.0.3.RELEASE] 
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)[61:org.springframework.beans:3.0.3.RELEASE] 
        at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)[61:org.springframework.beans:3.0.3.RELEASE] 
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)[61:org.springframework.beans:3.0.3.RELEASE] 
        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)[61:org.springframework.beans:3.0.3.RELEASE] 
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)[61:org.springframework.beans:3.0.3.RELEASE] 
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:574)[61:org.springframework.beans:3.0.3.RELEASE] 
        at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895)[62:org.springframework.context:3.0.3.RELEASE] 
        at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.access$1600(AbstractDelegatedExecutionApplicationContext.java:69)[73:org.springframework.osgi.core:1.2.0] 
        at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext$4.run(AbstractDelegatedExecutionApplicationContext.java:355)[73:org.springframework.osgi.core:1.2.0] 
        at org.springframework.osgi.util.internal.PrivilegedUtils.executeWithCustomTCCL(PrivilegedUtils.java:85)[73:org.springframework.osgi.core:1.2.0] 
        at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.completeRefresh(AbstractDelegatedExecutionApplicationContext.java:320)[73:org.springframework.osgi.core:1.2.0] 
        at org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor$CompleteRefreshTask.run(DependencyWaiterApplicationContextExecutor.java:136)[74:org.springframework.osgi.extender:1.2.0] 
        at java.lang.Thread.run(Thread.java:619)[:1.6.0_21] 
Caused by: org.springframework.beans.factory.BeanCreationException: Error 
creating bean with name 
'com.googlecode.ehcache.annotations.config.internalEhCacheCachingAdvisor': 
Cannot resolve reference to bean 
'com.googlecode.ehcache.annotations.impl.CacheStaticMethodMatcherPointcut#0' 
while setting bean property 'pointcut'; nested exception is 
org.springframework.beans.factory.BeanCreationException: Error creating bean 
with name 
'com.googlecode.ehcache.annotations.impl.CacheStaticMethodMatcherPointcut#0': 
Cannot resolve reference to bean 
'com.googlecode.ehcache.annotations.impl.CacheAttributeSourceImpl#0' while 
setting bean property 'cacheAttributeSource'; nested exception is 
org.springframework.beans.factory.BeanCreationException: Error creating bean 
with name 'com.googlecode.ehcache.annotations.impl.CacheAttributeSourceImpl#0': 
Initialization of bean failed; nested exception is 
java.lang.NoClassDefFoundError: Lnet/sf/ehcache/CacheManager; 
        at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:328)[61:org.springframework.beans:3.0.3.RELEASE] 
        at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:106)[61:org.springframework.beans:3.0.3.RELEASE] 
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1317)[61:org.springframework.beans:3.0.3.RELEASE] 
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1076)[61:org.springframework.beans:3.0.3.RELEASE] 
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:517)[61:org.springframework.beans:3.0.3.RELEASE] 
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)[61:org.springframework.beans:3.0.3.RELEASE] 
        at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)[61:org.springframework.beans:3.0.3.RELEASE] 
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)[61:org.springframework.beans:3.0.3.RELEASE] 
        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)[61:org.springframework.beans:3.0.3.RELEASE] 
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)[61:org.springframework.beans:3.0.3.RELEASE] 
        at org.springframework.aop.framework.autoproxy.BeanFactoryAdvisorRetrievalHelper.findAdvisorBeans(BeanFactoryAdvisorRetrievalHelper.java:86)[58:org.springframework.aop:3.0.3.RELEASE] 
        at org.springframework.aop.framework.autoproxy.AbstractAdvisorAutoProxyCreator.findCandidateAdvisors(AbstractAdvisorAutoProxyCreator.java:100)[58:org.springframework.aop:3.0.3.RELEASE] 
        at org.springframework.aop.framework.autoproxy.AbstractAdvisorAutoProxyCreator.findEligibleAdvisors(AbstractAdvisorAutoProxyCreator.java:86)[58:org.springframework.aop:3.0.3.RELEASE] 
        at org.springframework.aop.framework.autoproxy.AbstractAdvisorAutoProxyCreator.getAdvicesAndAdvisorsForBean(AbstractAdvisorAutoProxyCreator.java:68)[58:org.springframework.aop:3.0.3.RELEASE] 
        at org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator.wrapIfNecessary(AbstractAutoProxyCreator.java:359)[58:org.springframework.aop:3.0.3.RELEASE] 
        at org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator.postProcessAfterInitialization(AbstractAutoProxyCreator.java:322)[58:org.springframework.aop:3.0.3.RELEASE] 
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsAfterInitialization(AbstractAutowireCapableBeanFactory.java:407)[61:org.springframework.beans:3.0.3.RELEASE] 
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1418)[61:org.springframework.beans:3.0.3.RELEASE] 
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)[61:org.springframework.beans:3.0.3.RELEASE] 
        ... 13 more 
Caused by: org.springframework.beans.factory.BeanCreationException: Error 
creating bean with name 
'com.googlecode.ehcache.annotations.impl.CacheStaticMethodMatcherPointcut#0': 
Cannot resolve reference to bean 
'com.googlecode.ehcache.annotations.impl.CacheAttributeSourceImpl#0' while 
setting bean property 'cacheAttributeSource'; nested exception is 
org.springframework.beans.factory.BeanCreationException: Error creating bean 
with name 'com.googlecode.ehcache.annotations.impl.CacheAttributeSourceImpl#0': 
Initialization of bean failed; nested exception is 
java.lang.NoClassDefFoundError: Lnet/sf/ehcache/CacheManager; 
        at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:328)[61:org.springframework.beans:3.0.3.RELEASE] 
        at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:106)[61:org.springframework.beans:3.0.3.RELEASE] 
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1317)[61:org.springframework.beans:3.0.3.RELEASE] 
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1076)[61:org.springframework.beans:3.0.3.RELEASE] 
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:517)[61:org.springframework.beans:3.0.3.RELEASE] 
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)[61:org.springframework.beans:3.0.3.RELEASE] 
        at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)[61:org.springframework.beans:3.0.3.RELEASE] 
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)[61:org.springframework.beans:3.0.3.RELEASE] 
        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)[61:org.springframework.beans:3.0.3.RELEASE] 
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)[61:org.springframework.beans:3.0.3.RELEASE] 
        at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:322)[61:org.springframework.beans:3.0.3.RELEASE] 
        ... 31 more 
Caused by: org.springframework.beans.factory.BeanCreationException: Error 
creating bean with name 
'com.googlecode.ehcache.annotations.impl.CacheAttributeSourceImpl#0': 
Initialization of bean failed; nested exception is 
java.lang.NoClassDefFoundError: Lnet/sf/ehcache/CacheManager; 
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:527)[61:org.springframework.beans:3.0.3.RELEASE] 
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)[61:org.springframework.beans:3.0.3.RELEASE] 
        at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)[61:org.springframework.beans:3.0.3.RELEASE] 
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)[61:org.springframework.beans:3.0.3.RELEASE] 
        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)[61:org.springframework.beans:3.0.3.RELEASE] 
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)[61:org.springframework.beans:3.0.3.RELEASE] 
        at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:322)[61:org.springframework.beans:3.0.3.RELEASE] 
        ... 41 more 
Caused by: java.lang.NoClassDefFoundError: Lnet/sf/ehcache/CacheManager; 
        at java.lang.Class.getDeclaredFields0(Native Method)[:1.6.0_21] 
        at java.lang.Class.privateGetDeclaredFields(Class.java:2291)[:1.6.0_21] 
        at java.lang.Class.getDeclaredFields(Class.java:1743)[:1.6.0_21] 
        at org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor.findPersistenceMetadata(PersistenceAnnotationBeanPostProcessor.java:372) 
        at org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor.postProcessMergedBeanDefinition(PersistenceAnnotationBeanPostProcessor.java:320) 
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyMergedBeanDefinitionPostProcessors(AbstractAutowireCapableBeanFactory.java:798)[61:org.springframework.beans:3.0.3.RELEASE] 
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:493)[61:org.springframework.beans:3.0.3.RELEASE] 
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)[61:org.springframework.beans:3.0.3.RELEASE] 
        at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)[61:org.springframework.beans:3.0.3.RELEASE] 
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)[61:org.springframework.beans:3.0.3.RELEASE] 
        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)[61:org.springframework.beans:3.0.3.RELEASE] 
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)[61:org.springframework.beans:3.0.3.RELEASE] 
        at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:322) 
        at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:106) 
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1317)[61:org.springframework.beans:3.0.3.RELEASE] 
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1076)[61:org.springframework.beans:3.0.3.RELEASE] 
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:517)[61:org.springframework.beans:3.0.3.RELEASE] 
        ... 47 more 
Caused by: java.lang.ClassNotFoundException: net.sf.ehcache.CacheManager 
        at org.apache.felix.framework.ModuleImpl.findClassOrResourceByDelegation(ModuleImpl.java:772)[org.apache.felix.framework-3.0.1.jar:] 
        at org.apache.felix.framework.ModuleImpl.access$200(ModuleImpl.java:73)[org.apache.felix.framework-3.0.1.jar:] 
        at org.apache.felix.framework.ModuleImpl$ModuleClassLoader.loadClass(ModuleImpl.java:1685)[org.apache.felix.framework-3.0.1.jar:] 
        at java.lang.ClassLoader.loadClass(ClassLoader.java:248)[:1.6.0_21] 
        ... 64 more


What version of the product are you using? On what operating system?

ehcache-spring-annotations 1.1.2, Ubuntu 10.04 and Windows XP


Please provide any additional information below.
Let me know is anythign needs clarifying

Original issue reported on code.google.com by [email protected] on 14 Sep 2010 at 11:12

@TriggersRemove should allow for the expiry of multiple caches

What steps will reproduce the problem?
1. Annotate two different methods on a class with @Cacheable with different 
cache names
2. Add two @TriggersRemove annotation to a third "remove" method, with each 
annotation referencing one of the two @Cacheable cacheNames.

What is the expected output? What do you see instead?
Ideally, the "remove" method would, upon invocation, clear the associated entry 
in both associated caches.
Instead - it is a compile error for having a duplicate @TriggersRemove 
annotation on the "remove" method.

What version of the product are you using? On what operating system?
1.0.5

Please provide any additional information below.

My (currently non-compiling) use case is similar to the following:

public class SocialNetwork {

  @Cacheable(cacheName="friends")
  public Friend getFriend(int userId)

  @Cacheable(cacheName="enemies")
  public Enemy getEnemy(int userId)

  @TriggersRemove(cacheName="friends")
  @TriggersRemove(cacheName="enemies")
  public void befriendEnemy(int userId, int userIdOfBefriendedEnemy)

}

I have a custom key generator that only looks at the first method argument that 
I would apply to all three methods above.

It would be great if something like the following would be supported:

  @TriggersRemove(cacheNames={"friends", "enemies"})
  public void befriendEnemy(int userId, int userIdOfBefriendedEnemy)

Original issue reported on code.google.com by [email protected] on 28 Jun 2010 at 9:20

Add support for proxy-target-class mode

Similar to what is supported by the <tx:annotation-driven> code in spring
<ehcache:config> should support a proxy-target-class attribute which uses
CGLIB instead of JDK Proxies for applying the interceptors.

Original issue reported on code.google.com by eric.dalquist on 1 Apr 2010 at 9:51

Add more CacheKeyGenerator impls

Explore some alternative cache key generation options

Original issue reported on code.google.com by eric.dalquist on 31 Mar 2010 at 9:47

@TriggersRemove does not work when calling from another that marked as @TriggersRemove as well


What steps will reproduce the problem?
1. Define two functions and mark both of them with @TriggersRemove,
2. Call the second function from the first.
3. Calls the first function.

What is the expected output? What do you see instead?
Both @TriggersRemove should be executed, however, only the first 
@TriggersRemove gets executed.

What version of the product are you using? On what operating system?
1.1.0, MAC and Linux

Please provide any additional information below.
I hope I am making sense... since Issue #34 hasn't been implemented yet. Here 
is my work around. I am trying to remove two cached object with different 
keys...

@TriggersRemove(cacheName="triggersRemoveCountingCache", 
            keyGeneratorName = "keyGenerator1"
    )
function methodOne()[
   // other codes...
 methodTwo(); //calling methodTwo, expect to see the @TriggersRemove on methodTwo gets executed...
}

@TriggersRemove(cacheName="triggersRemoveCountingCache", 
              keyGeneratorName = "keyGenerator2")
function methodTwo(){
   //whatever it is...
}

I have the test case attached.

Original issue reported on code.google.com by [email protected] on 29 Jun 2010 at 7:53

Attachments:

Usage of Spring EL for a new CacheKeyGenerator

Hi,

Nice project! 
I did not find another way of contacting anyone and cannot set the issue type 
to suggestion or something alike so here goes:

I somewhat coded a simular project for caching using Spring and EHCache. I am 
using a specific property in the annotation for retrieval of the cacheKeys in 
the arguments of the method.
E.g.:
@Cacheable(argSpELToCacheId = { "id", "id2" })

The arguments are traversed using Spring EL and thus a way of getting the 
cacheKey.

Any tips on integrating this into your code? I have a working version and here 
is my logic:
1.alterring @Cacheable, CacheableAttribute(and Impl), CacheAttributeSourceImpl 
with the new property
2. The EHCacheInterceptor to pass the actual values to the CacheKeyGenerators 
and call new method see 3.
3. adding new method in CacheKeyGenerator T generateKey(MethodInvocation 
methodInvocation, MethodAttribute methodAttribute); Of course this is just a 
hack to get it to work.
4.Modify AbstractCacheKeyGenerator to implement this method Actually now 
replacing the one without the extra parameter but to not break everything I 
opted to do this for now. Forcing myself to use 
includeMethod,includeParameterTypes so I only need to alter 1 method
5. Creating SpELCacheKeyGenerator and is working.
Maybe a good idea to put the concept of identifying your own cache-key like 
this (see JPA/Hibernate @Id) into  next version.
Maybe put these EL values in the @KeyGenerator annotation and then passing it 
to the Generators when generating the key, instead of now using the @Cacheable 
for this? 
What do you think?
Anyway thanks and keep up the good wok!

Kind regards,
Timothy

Original issue reported on code.google.com by [email protected] on 13 Aug 2010 at 2:57

Spring schema broken in 1.0.2

Hi,

Your last release is broken because you have renamed your embedded XSD from
spring-ehcache to ehcache-spring but haven’t updated your spring.schema file.

Sincerely,

Stéphane Landelle


Original issue reported on code.google.com by [email protected] on 20 Apr 2010 at 1:56

Add attribute to @Cacheable to prevent caching of null values

EhCacheInterceptor.invokeCacheable() will cache a null return value from the 
methodInvocation.proceed() call.  This is causing a problem for our application 
in that we're using a null return when a DB object is not found, so caching the 
null prevents the DB from being queried again.  I realize that our issue should 
be solvable by putting a @TriggersRemove where the new object is written, but I 
don't really expect to need to flush the cache when creating new objects.  Can 
the @Cacheable annotation be enhanced with an attribute that will prevent nulls 
from being cached?

What steps will reproduce the problem?
1.
2.
3.

What is the expected output? What do you see instead?


What version of the product are you using? On what operating system?


Please provide any additional information below.


Original issue reported on code.google.com by [email protected] on 7 Oct 2010 at 10:06

Update cached object in a cache without retrieve the whole list

This is just what I have been thinking and want to put out for discussion.

Let's assume I am caching a method result and the method gets a list of cars 
from the database...

@Cacheable(cacheName="carsCache")
List<Car> getCars();

I know that when I have a new Car created, I can do TriggerRemove to make sure 
the cache gets refreshed.

@TriggersRemove(cacheName="carsCache", removeAll=true)
Car addCar();

But by doing so, all my cars in that List need to be retrieved from the 
database again to update the cache (unless my understanding is wrong...)

But would it be nice that I can only add the newly generated Car into the List 
instead of do a total refresh? Especially, when I have a 10,000 cars already in 
my list, retrieving all cars from database and initializing each one of them 
will be much more expense...

In terms of the annotation, it could be something like a 
@UpdateCachedObjects({cacheName="carsCache"})
Car addCar();

and it will take the return object of the method, and add it to the cached 
object list.

Still will need a way to make the update work. Maybe,
@UpdateCachedObjects({cacheName="carsCache", objectIdField="id"})
Car updateCar();

Then it will update the car in the list if the id of the car matches. Since the 
car gets updated, the hashcode of Car object won't be the same...

Will this be useful? Up for discussion...

Thanks,

Jiang


Original issue reported on code.google.com by [email protected] on 30 Jul 2010 at 4:18

StringCacheKeyGeneratorTest.verifyTestComplexHashCode fails in other parts of the world

The test fails because the function java.util.Date.toString() takes the
locale into account (time zone and language).

The following modified test works for me:

protected void verifyTestComplexHashCode(MethodInvocation invocation,
String key) {
Assert.assertEquals("[class
com.googlecode.ehcache.annotations.key.MethodInvocationHelper, testMethod2,
class java.lang.Object, [[1, 2, 3, 4], foo, [false, true], [null, "+new
Date(0)+"]]]", key);
}

Original issue reported on code.google.com by [email protected] on 9 May 2010 at 1:07

Problem with @Cacheable and @Autowired

What steps will reproduce the problem?
1. Create a @Controller class with @Autowired fields and @Cacheable methods
2. Start a Spring app using that class
3. Check the @Autowired fields

What is the expected output? What do you see instead?
Expect that the @Autowired fields have been initialized.
However, the @Autowired fields are null.

What version of the product are you using? On what operating system?
ehcache-spring-annotations 1.0.5
spring 3.0.2
WinXP

Please provide any additional information below.
I suspect there's a collision between Spring's internal annotation handling and 
what ehcache-spring-annotations is doing. Our app has 
<context:annotation-config/>
<context:component-scan base-package="..."/>
<ehcache:annotation-driven create-missing-caches="true"/>
as well as 
DefaultAnnotationHandlerMapping and AnnotationMethodHandlerAdapter beans

Original issue reported on code.google.com by [email protected] on 8 Jun 2010 at 3:50

The ability to generate a key based on only partial method arguments

New feature request.

The way all the current built in key generator works is to take all method 
arguments into account. However, often, it's not the case.

For example, I have a function following takes that many parameters, however, 
my cache key is really only relied on the first two parameters.

public ProtocolFile addProtocolFileVersion(
            long protocolId,
            long parentProtocolFileId,
            long userId,
            long uploadedFileId,
            String category,
            String title);

It would be great, if I can mark each method parameter to say whether it's 
gonna participate in the key generator or not. Something like this,

public ProtocolFile addProtocolFileVersion(
            @PartialCacheKey long protocolId,
            @PartialCacheKey long parentProtocolFileId,
            long userId,
            long uploadedFileId,
            String category,
            String title);

Otherwise, the way I am doing is to have a specific key generator for each 
different possible combinations...

Thanks!

Jiang

Original issue reported on code.google.com by [email protected] on 29 Jun 2010 at 12:20

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.