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 2010/05/01 13:46:28 UTC

DO NOT REPLY [Bug 49240] New: Error thrown during detection of ServletContainerInitializer's

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

           Summary: Error thrown during detection of
                    ServletContainerInitializer's
           Product: Tomcat 7
           Version: unspecified
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Catalina
        AssignedTo: dev@tomcat.apache.org
        ReportedBy: bugzilla@pidster.com


ContextConfig.checkHandlesTypes() throws a NoClassDefFoundError, which isn't
caught, when the class being analysed is initialised if the class, or a class
that it references(?), is not present in the classpath.

E.g. When a mysql connector/j jar (v5.x) is scanned, an attempt to load the
following class occurs: com.mchange.v2.c3p0.QueryConnectionTester

java.lang.NoClassDefFoundError: com/mchange/v2/c3p0/QueryConnectionTester
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:698)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
    at java.net.URLClassLoader.access$000(URLClassLoader.java:56)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:315)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:250)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:398)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:247)

Also Class.forName is used here, referencing the WebappClassLoader, instead of
calling WebappClassLoader.loadClass() directly.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- 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


DO NOT REPLY [Bug 49240] Error thrown during detection of ServletContainerInitializer's

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

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

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

--- Comment #3 from Mark Thomas <ma...@apache.org> 2010-05-11 05:48:34 EDT ---
Patch applied to trunk and will be included in 7.0.0 onwards.

Many thanks.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- 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


DO NOT REPLY [Bug 49240] Error thrown during detection of ServletContainerInitializer's

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

--- Comment #1 from Pid <bu...@pidster.com> 2010-05-01 08:02:44 EDT ---
Created an attachment (id=25387)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=25387)
Fixes thrown Error during ServletContainerInitializer's

return if an exception is thrown, use the webapp classloader directly

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- 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


DO NOT REPLY [Bug 49240] Error thrown during detection of ServletContainerInitializer's

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

Pid <bu...@pidster.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #25387|0                           |1
        is obsolete|                            |

--- Comment #2 from Pid <bu...@pidster.com> 2010-05-01 11:08:22 EDT ---
Created an attachment (id=25388)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=25388)
Fixes thrown Error during SCI detection

Patch doesn't need to warn for every NoClassDefFoundError, debug is a better
logging level.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- 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