tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject DO NOT REPLY [Bug 45963] New: WebappClassLoader.loadClass() throws NoClassDefFoundError from system.loadClass()
Date Tue, 07 Oct 2008 21:41:15 GMT

           Summary: WebappClassLoader.loadClass() throws
                    NoClassDefFoundError from system.loadClass()
           Product: Tomcat 6
           Version: 6.0.18
          Platform: PC
        OS/Version: SunOS
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Catalina
        ReportedBy: line 1302 performs a system.loadClass(name) and catches
the corresponding ClassNotFoundException. 

If system is able to find a class but not all necessary dependents, the code
breaks past the catch with a NoClassDefFoundError during the defineClass() call
and fails while my class loader would have resolved everything had it been
given the chance.

Ignoring NoClassDefFoundError's would be nice - although cleaning up my
layering will help avoid the issue as well. 

        // (0.2) Try loading the class with the system class loader, to prevent
        //       the webapp from overriding J2SE classes
        try {
            clazz = system.loadClass(name);
            if (clazz != null) {
                if (resolve)
                return (clazz);
        } catch (ClassNotFoundException e) {
            // Ignore

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