You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2012/05/20 16:32:34 UTC

[Bug 53266] New: ServletContainerInitializer will crash catalina if dependcy is not present.

https://issues.apache.org/bugzilla/show_bug.cgi?id=53266

          Priority: P2
            Bug ID: 53266
          Assignee: dev@tomcat.apache.org
           Summary: ServletContainerInitializer will crash catalina if
                    dependcy is not present.
          Severity: minor
    Classification: Unclassified
          Reporter: kevinrrose27@gmail.com
          Hardware: PC
            Status: NEW
           Version: 7.0.27
         Component: Catalina
           Product: Tomcat 7

When using a ServletContainerInitializer with a HandlesTypes annotation if any
of the classes specified in the HandlesTypes annotation are not available due
to a missing jar file catalina will crash with a
"java.lang.ArrayStoreException:
sun.reflect.annotation.TypeNotPresentExceptionProxy".

Caused by: java.lang.ArrayStoreException:
sun.reflect.annotation.TypeNotPresentExceptionProxy
    at
sun.reflect.annotation.AnnotationParser.parseClassArray(AnnotationParser.java:653)
    at
sun.reflect.annotation.AnnotationParser.parseArray(AnnotationParser.java:460)
    at
sun.reflect.annotation.AnnotationParser.parseMemberValue(AnnotationParser.java:286)
    at
sun.reflect.annotation.AnnotationParser.parseAnnotation(AnnotationParser.java:222)
    at
sun.reflect.annotation.AnnotationParser.parseAnnotations2(AnnotationParser.java:69)
    at
sun.reflect.annotation.AnnotationParser.parseAnnotations(AnnotationParser.java:52)
    at java.lang.Class.initAnnotationsIfNecessary(Class.java:3070)
    at java.lang.Class.getAnnotation(Class.java:3029)
    at
org.apache.catalina.startup.ContextConfig.processServletContainerInitializers(ContextConfig.java:1546)
    at
org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1222)
    at
org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:855)
    at
org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:345)
    at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
    at
org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
    at
org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5161)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    ... 7 more

Line where exception is thrown: "HandlesTypes ht =
sci.getClass().getAnnotation(HandlesTypes.class);"

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

[Bug 53266] ServletContainerInitializer will crash catalina if dependcy is not present.

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=53266

Kevin Rose <ke...@roseassociation.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|minor                       |enhancement

--- Comment #2 from Kevin Rose <ke...@roseassociation.com> ---
I would like to see tomcat gracefully shutdown with an error message prudent to
the reason instead of an ArrayStoreException.

As it is possible for any library to contain a ServlerContainerInitializer if
for any reason a need dependency in any library is missing this is possible to
occur.

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

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 53266] ServletContainerInitializer will crash catalina if dependcy is not present.

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=53266

Christopher Schultz <ch...@christopherschultz.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 OS|                            |All

--- Comment #1 from Christopher Schultz <ch...@christopherschultz.net> ---
Would you expect anything else to happen?

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

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 53266] ServletContainerInitializer will crash catalina if dependcy is not present.

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=53266

Mark Thomas <ma...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #3 from Mark Thomas <ma...@apache.org> ---
Note the spec requires that the web application is permitted to start in this
case.

This has been fixed in trunk and 7.0.x and will be included in 7.0.28 onwards.

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

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org