Bug 32577 - ClassNotFoundException when using inner class in web.xml
Summary: ClassNotFoundException when using inner class in web.xml
Status: RESOLVED DUPLICATE of bug 32719
Alias: None
Product: Tomcat 5
Classification: Unclassified
Component: Catalina (show other bugs)
Version: 5.5.4
Hardware: PC Windows 2000
: P2 normal (vote)
Target Milestone: ---
Assignee: Tomcat Developers Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-12-08 00:38 UTC by Venkat Dokiparthi
Modified: 2004-12-15 18:26 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Venkat Dokiparthi 2004-12-08 00:38:31 UTC
When an inner class is ued in web.xml of a web application, it gives the 
following error when starting up Tomcat:
SEVERE: Error configuring application listener of class com.remedy.arsys.stubs.S
essionDataReleaseSessionData

Corresponding line in web.xml:
    <listener>
        <listener-
class>com.remedy.arsys.stubs.SessionData$ReleaseSessionData</listener-class>
    </listener>

Notice the $ in the class name.  ReleaseSessionData is an inner class defined 
in SessionData class.

It works fine with Tomcat 4.  Only problem in Tomcat 5.5 Alpha.
Comment 1 Ben Souther 2004-12-08 02:17:19 UTC
Your listeners are inner classes?
Is there a valid use case for this?
Does the inner class have a public interface and a public constructor?

Could you provide a war file for this?
Comment 2 Remy Maucherat 2004-12-08 09:55:07 UTC
As you can see in the error, the '$' is gone. Does it need to be encoded in your
XML ? Please look more thoroughly into this before reopening the issue, and
submit a test war if you cannot solve the issue.

The Tomcat classloader can correctly load inner classes.

BTW, the exception is logged as well, please submit stack traces.
Comment 3 Ben Souther 2004-12-15 21:19:43 UTC
Related to:
http://issues.apache.org/bugzilla/show_bug.cgi?id=32719
?
Comment 4 Richard Clark 2004-12-16 01:43:37 UTC
Yes they are related, it's an XML processing issue rather than a class loading
issue. The patch in #32719 fixes the problem mentioned here.
Comment 5 Ben Souther 2004-12-16 03:26:55 UTC

*** This bug has been marked as a duplicate of 32719 ***