Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] AspectJ NPE in Java15AnnotationFinder

A customer of our Java/J2EE monitoring product is also using the Spring
Framework with AOP, and is getting
the following exception when our product is installed:

Caused by: java.lang.NullPointerException                                 
 at
org.aspectj.weaver.reflect.Java15AnnotationFinder.getAnnotations(Java15AnnotationFinder.java:109)                                                 
 at
org.aspectj.weaver.reflect.ReflectionBasedResolvedMemberImpl.unpackAnnotations(ReflectionBasedResolvedMemberImpl.java:174)                        
 at
org.aspectj.weaver.reflect.ReflectionBasedResolvedMemberImpl.hasAnnotation(ReflectionBasedResolvedMemberImpl.java:158)                            
 at
org.aspectj.weaver.patterns.ExactAnnotationTypePattern.matches(ExactAnnotationTypePattern.java:82)                                                
 at
org.aspectj.weaver.patterns.AnnotationPointcut.matchInternal(AnnotationPointcut.java:151)                                                         
 at org.aspectj.weaver.patterns.Pointcut.match(Pointcut.java:146)         
 at
org.aspectj.weaver.internal.tools.PointcutExpressionImpl.getShadowMatch(PointcutExpressionImpl.java:235)                                          
 at
org.aspectj.weaver.internal.tools.PointcutExpressionImpl.matchesExecution(PointcutExpressionImpl.java:101)                                        
 at
org.aspectj.weaver.internal.tools.PointcutExpressionImpl.matchesMethodExecution(PointcutExpressionImpl.java:92)                                   
 at
org.springframework.aop.aspectj.AspectJExpressionPointcut.getShadowMatch(AspectJExpressionPointcut.java:370)                                      
 at
org.springframework.aop.aspectj.AspectJExpressionPointcut.matches(AspectJExpressionPointcut.java:247)                                             
 at org.springframework.aop.support.AopUtils.canApply(AopUtils.java:214)  

Looks like the customer is running AspectJ 1.5, so the fix for this NPE is
not installed.  Customer is
running in a Java 1.5 environment.

Our monitoring product no longer uses AspectJ.

Have a couple of questions relating to this exception:

1)  What are the exact circumstances that cause this problem to occur?  I am
trying to determine why the 
application has no problem when running without the monitoring product, but
experiences the failure
when the monitor is installed.  There must be some subtle change to the
environment that is exposing
this problem, but I can't put my finger on what it is.

2) One possible solution is to have the customer upgrade to AspectJ 1.6,
where it looks like this problem
is fixed.  However, I am concerned about compatibility with Spring (not sure
what release the customer is running).  Are there any known issues with
attempting this upgrade?

Thanks
-- 
View this message in context: http://aspectj.2085585.n4.nabble.com/AspectJ-NPE-in-Java15AnnotationFinder-tp2257835p2257835.html
Sent from the AspectJ - users mailing list archive at Nabble.com.


Back to the top