java.lang.NullPointerException: null

Spring JIRA | Lev Bornovalov | 8 months ago
  1. 0

    To reproduce: Call the following proxied method: {code} @Caching public void someMethod(final String argument) { .... } {code} This will cause the following exception: {code} java.lang.NullPointerException: null at java.util.ArrayList.addAll(ArrayList.java:577) ~[na:1.8.0_20] at org.springframework.cache.annotation.SpringCacheAnnotationParser.parseCacheAnnotations(SpringCacheAnnotationParser.java:89) ~[spring-context-4.2.3.RELEASE.jar:4.2.3.RELEASE] at org.springframework.cache.annotation.SpringCacheAnnotationParser.parseCacheAnnotations(SpringCacheAnnotationParser.java:58) ~[spring-context-4.2.3.RELEASE.jar:4.2.3.RELEASE] at org.springframework.cache.annotation.AnnotationCacheOperationSource$2.getCacheOperations(AnnotationCacheOperationSource.java:124) ~[spring-context-4.2.3.RELEASE.jar:4.2.3.RELEASE] at org.springframework.cache.annotation.AnnotationCacheOperationSource.determineCacheOperations(AnnotationCacheOperationSource.java:142) ~[spring-context-4.2.3.RELEASE.jar:4.2.3.RELEASE] at org.springframework.cache.annotation.AnnotationCacheOperationSource.findCacheOperations(AnnotationCacheOperationSource.java:121) ~[spring-context-4.2.3.RELEASE.jar:4.2.3.RELEASE] at org.springframework.cache.interceptor.AbstractFallbackCacheOperationSource.computeCacheOperations(AbstractFallbackCacheOperationSource.java:136) ~[spring-context-4.2.3.RELEASE.jar:4.2.3.RELEASE] at org.springframework.cache.interceptor.AbstractFallbackCacheOperationSource.getCacheOperations(AbstractFallbackCacheOperationSource.java:97) ~[spring-context-4.2.3.RELEASE.jar:4.2.3.RELEASE] at org.springframework.cache.interceptor.CacheOperationSourcePointcut.matches(CacheOperationSourcePointcut.java:39) ~[spring-context-4.2.3.RELEASE.jar:4.2.3.RELEASE] at org.springframework.aop.support.MethodMatchers.matches(MethodMatchers.java:94) ~[spring-aop-4.2.3.RELEASE.jar:4.2.3.RELEASE] {code} Although you may be thinking that including an empty @Caching annotation is a corner-case, in our particular use-case, it's required, as we're calling a custom implementation of org.springframework.cache.interceptor.CacheInterceptor. We are doing this because the @CacheEvict funtionality does not allow use to easily purge individual keys based on method args, etc...

    Spring JIRA | 8 months ago | Lev Bornovalov
    java.lang.NullPointerException: null
  2. 0

    To reproduce: Call the following proxied method: {code} @Caching public void someMethod(final String argument) { .... } {code} This will cause the following exception: {code} java.lang.NullPointerException: null at java.util.ArrayList.addAll(ArrayList.java:577) ~[na:1.8.0_20] at org.springframework.cache.annotation.SpringCacheAnnotationParser.parseCacheAnnotations(SpringCacheAnnotationParser.java:89) ~[spring-context-4.2.3.RELEASE.jar:4.2.3.RELEASE] at org.springframework.cache.annotation.SpringCacheAnnotationParser.parseCacheAnnotations(SpringCacheAnnotationParser.java:58) ~[spring-context-4.2.3.RELEASE.jar:4.2.3.RELEASE] at org.springframework.cache.annotation.AnnotationCacheOperationSource$2.getCacheOperations(AnnotationCacheOperationSource.java:124) ~[spring-context-4.2.3.RELEASE.jar:4.2.3.RELEASE] at org.springframework.cache.annotation.AnnotationCacheOperationSource.determineCacheOperations(AnnotationCacheOperationSource.java:142) ~[spring-context-4.2.3.RELEASE.jar:4.2.3.RELEASE] at org.springframework.cache.annotation.AnnotationCacheOperationSource.findCacheOperations(AnnotationCacheOperationSource.java:121) ~[spring-context-4.2.3.RELEASE.jar:4.2.3.RELEASE] at org.springframework.cache.interceptor.AbstractFallbackCacheOperationSource.computeCacheOperations(AbstractFallbackCacheOperationSource.java:136) ~[spring-context-4.2.3.RELEASE.jar:4.2.3.RELEASE] at org.springframework.cache.interceptor.AbstractFallbackCacheOperationSource.getCacheOperations(AbstractFallbackCacheOperationSource.java:97) ~[spring-context-4.2.3.RELEASE.jar:4.2.3.RELEASE] at org.springframework.cache.interceptor.CacheOperationSourcePointcut.matches(CacheOperationSourcePointcut.java:39) ~[spring-context-4.2.3.RELEASE.jar:4.2.3.RELEASE] at org.springframework.aop.support.MethodMatchers.matches(MethodMatchers.java:94) ~[spring-aop-4.2.3.RELEASE.jar:4.2.3.RELEASE] {code} Although you may be thinking that including an empty @Caching annotation is a corner-case, in our particular use-case, it's required, as we're calling a custom implementation of org.springframework.cache.interceptor.CacheInterceptor. We are doing this because the @CacheEvict funtionality does not allow use to easily purge individual keys based on method args, etc...

    Spring JIRA | 8 months ago | Lev Bornovalov
    java.lang.NullPointerException: null
  3. 0

    Apache syncope demo

    apache.org | 1 year ago
    java.lang.NullPointerException: null
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Apache syncope demo

    syncope-user | 4 years ago | Jesal Dosa
    java.lang.NullPointerException: null
  6. 0

    Confused on java.util.ArrayList implementation

    Stack Overflow | 6 months ago | Panadol Chong
    java.lang.NullPointerException: null

  1. ajinkya_w 2 times, last 2 months ago
  2. marcbouvierdav 1 times, last 2 months ago
  3. 0x60 133 times, last 2 months ago
  4. brunosatriani 1 times, last 5 months ago
  5. Agócs Tamás 4 times, last 6 months ago
5 more registered users
5 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.lang.NullPointerException

    null

    at java.util.ArrayList.addAll()
  2. Java RT
    ArrayList.addAll
    1. java.util.ArrayList.addAll(ArrayList.java:577)[na:1.8.0_20]
    1 frame
  3. Spring Context
    CacheOperationSourcePointcut.matches
    1. org.springframework.cache.annotation.SpringCacheAnnotationParser.parseCacheAnnotations(SpringCacheAnnotationParser.java:89)[spring-context-4.2.3.RELEASE.jar:4.2.3.RELEASE]
    2. org.springframework.cache.annotation.SpringCacheAnnotationParser.parseCacheAnnotations(SpringCacheAnnotationParser.java:58)[spring-context-4.2.3.RELEASE.jar:4.2.3.RELEASE]
    3. org.springframework.cache.annotation.AnnotationCacheOperationSource$2.getCacheOperations(AnnotationCacheOperationSource.java:124)[spring-context-4.2.3.RELEASE.jar:4.2.3.RELEASE]
    4. org.springframework.cache.annotation.AnnotationCacheOperationSource.determineCacheOperations(AnnotationCacheOperationSource.java:142)[spring-context-4.2.3.RELEASE.jar:4.2.3.RELEASE]
    5. org.springframework.cache.annotation.AnnotationCacheOperationSource.findCacheOperations(AnnotationCacheOperationSource.java:121)[spring-context-4.2.3.RELEASE.jar:4.2.3.RELEASE]
    6. org.springframework.cache.interceptor.AbstractFallbackCacheOperationSource.computeCacheOperations(AbstractFallbackCacheOperationSource.java:136)[spring-context-4.2.3.RELEASE.jar:4.2.3.RELEASE]
    7. org.springframework.cache.interceptor.AbstractFallbackCacheOperationSource.getCacheOperations(AbstractFallbackCacheOperationSource.java:97)[spring-context-4.2.3.RELEASE.jar:4.2.3.RELEASE]
    8. org.springframework.cache.interceptor.CacheOperationSourcePointcut.matches(CacheOperationSourcePointcut.java:39)[spring-context-4.2.3.RELEASE.jar:4.2.3.RELEASE]
    8 frames
  4. Spring AOP
    MethodMatchers.matches
    1. org.springframework.aop.support.MethodMatchers.matches(MethodMatchers.java:94)[spring-aop-4.2.3.RELEASE.jar:4.2.3.RELEASE]
    1 frame