tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject DO NOT REPLY [Bug 52042] New: Possible NullPointerException in DefaultInstanceManager#processAnnotations
Date Mon, 17 Oct 2011 14:39:00 GMT

             Bug #: 52042
           Summary: Possible NullPointerException in
           Product: Tomcat 7
           Version: 7.0.22
          Platform: PC
            Status: NEW
          Severity: critical
          Priority: P2
         Component: Catalina
    Classification: Unclassified

NullPointerException exception is thrown randomly from
"DefaultInstanceManager#processAnnotations" method on the following lines,

 List<AnnotationCacheEntry> annotations;
            synchronized (annotationCache) {
                annotations = annotationCache.get(clazz).get();

            //Null Pointer Exception is thrown, because annotations is NULL
            for (AnnotationCacheEntry entry : annotations) {

For example, I have a JSF Managed Bean 

public class X extends Y{

Open JSF page that contains managed bean X. Randomly opening the same page
throws NullPointerException because for superclass Y "annotations =
annotationCache.get(clazz).get();" returns null.

Using WeakHashMap on "annotationCache" field may be the reason of exception.

Configure bugmail:
------- You are receiving this mail because: -------
You are the assignee for the bug.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message