Skip to content
This repository has been archived by the owner on Oct 3, 2022. It is now read-only.

cache-annotations-cdi: java.lang.IllegalArgumentException: cacheValueParameter cannot be null #22

Closed
doubble opened this issue May 7, 2014 · 1 comment

Comments

@doubble
Copy link

doubble commented May 7, 2014

Hi,

using following artefacts

    <dependency>
        <groupId>org.ehcache</groupId>
        <artifactId>jcache</artifactId>
        <version>1.0.0-SNAPSHOT</version>
    </dependency>

    <dependency>
        <groupId>org.jsr107.ri</groupId>
        <artifactId>cache-annotations-ri-cdi</artifactId>
        <version>1.0.0</version>
    </dependency>

I get the following Exception when returning null from an
@CachePut(cacheName = CacheNames.USER_DAO_CACHE)

java.lang.IllegalArgumentException: cacheValueParameter cannot be null
2014-05-07 15:24:11.669231+00:00 app web.1 - - at org.jsr107.ri.annotations.CachePutMethodDetails.(CachePutMethodDetails.java:49)
2014-05-07 15:24:11.669233+00:00 app web.1 - - at org.jsr107.ri.annotations.AbstractCacheLookupUtil.createCachePutMethodDetails(AbstractCacheLookupUtil.java:332)
2014-05-07 15:24:11.669235+00:00 app web.1 - - at org.jsr107.ri.annotations.AbstractCacheLookupUtil.getMethodDetails(AbstractCacheLookupUtil.java:193)
2014-05-07 15:24:11.669236+00:00 app web.1 - - at org.jsr107.ri.annotations.AbstractCacheLookupUtil.getCacheKeyInvocationContext(AbstractCacheLookupUtil.java:72)
2014-05-07 15:24:11.669238+00:00 app web.1 - - at org.jsr107.ri.annotations.AbstractCachePutInterceptor.cachePut(AbstractCachePutInterceptor.java:48)
2014-05-07 15:24:11.669239+00:00 app web.1 - - at org.jsr107.ri.annotations.cdi.CachePutInterceptor.cachePut(CachePutInterceptor.java:51)
2014-05-07 15:24:11.669241+00:00 app web.1 - - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
2014-05-07 15:24:11.669243+00:00 app web.1 - - at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
2014-05-07 15:24:11.669244+00:00 app web.1 - - at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
2014-05-07 15:24:11.669246+00:00 app web.1 - - at java.lang.reflect.Method.invoke(Method.java:606)
2014-05-07 15:24:11.669247+00:00 app web.1 - - at org.jboss.weld.interceptor.proxy.SimpleMethodInvocation.invoke(SimpleMethodInvocation.java:30)
2014-05-07 15:24:11.669249+00:00 app web.1 - - at org.jboss.weld.interceptor.proxy.SimpleInterceptionChain.invokeNextInterceptor(SimpleInterceptionChain.java:69)
2014-05-07 15:24:11.669250+00:00 app web.1 - - at org.jboss.weld.interceptor.proxy.InterceptorMethodHandler.executeInterception(InterceptorMethodHandler.java:112)
2014-05-07 15:24:11.669252+00:00 app web.1 - - at org.jboss.weld.interceptor.proxy.InterceptorMethodHandler.invoke(InterceptorMethodHandler.java:88)
2014-05-07 15:24:11.669254+00:00 app web.1 - - at org.jboss.weld.bean.proxy.CombinedInterceptorAndDecoratorStackMethodHandler.invoke(CombinedInterceptorAndDecoratorStackMethodHandler.java:55)
2014-05-07 15:24:11.669255+00:00 app web.1 - - at org.remedia.foxydeal.clickserver.persistence.domain.UserDAO$Proxy$_$$WeldSubclass.get(UserDAO$Proxy$$$_WeldSubclass.java)

@doubble
Copy link
Author

doubble commented May 7, 2014

Sorry, mistakenly used CachePut instead of CacheResult annotation.

@doubble doubble closed this as completed May 7, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant