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 2006/03/07 11:59:56 UTC
DO NOT REPLY [Bug 38877] New: - Loader tag in server.xml induces a wrong class loading scheme
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=38877>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=38877
Summary: Loader tag in server.xml induces a wrong class loading
scheme
Product: Tomcat 5
Version: 5.5.16
Platform: Other
OS/Version: other
Status: NEW
Severity: major
Priority: P2
Component: Catalina
AssignedTo: tomcat-dev@jakarta.apache.org
ReportedBy: mabuffo@gva.eri.ch
When you have a "Loader" tag for your "context" in the "server.xml" file, the
class loading scheme of tomcat is broken.
In this case, your custom Loader receieves, as a parent ClassLoader, an instance
of the System ClassLoader, instead of an instance of the Shared ClassLoader (see
http://tomcat.apache.org/tomcat-5.5-doc/class-loader-howto.html).
This is because, when the "Loader" tag is present, the custom loader (typically
a subclass of "WebappLoader") is created while reading the XML file, BEFORE
knowing the parent container (and therefore, defore knowing the parent
ClassLoader = Shared ClassLoader) [class ContextRuleSet, method begin(),line 253].
In this case, the default class loader is set to the SystemClassLoader [class
ContainerBase, method getParentClassLoader(), line 580].
On the other hand, if you DON'T have the tag, the loader is created later [class
StandardContext, method start, line 4022].
I consider this bug a a major one, as the class loading scheme is broken (I
consider class loading as a fundamental element of J2EE). This bug prevents an
easy professionnal development of web applications, as it imposes the manual
copy of classes and jars into the apposite WEB-INF locations, instead of using a
suited class loader allowing an easy share of classes between projets.
Related bugs: ASF Bugzilla Bug 37054, ASF Bugzilla Bug 37302.
Mathieu
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
DO NOT REPLY [Bug 38877] - Loader tag in server.xml induces a wrong class loading scheme
Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=38877>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=38877
remm@apache.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |DUPLICATE
------- Additional Comments From remm@apache.org 2006-04-24 13:53 -------
*** This bug has been marked as a duplicate of 37054 ***
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
DO NOT REPLY [Bug 38877] - Loader tag in server.xml induces a wrong class loading scheme
Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=38877>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=38877
------- Additional Comments From yoavs@computer.org 2006-04-14 18:57 -------
There are plenty of ways to easily share classes and their object instances
between webapps without using a custom loader ;) But I'll leave this bug open,
we'll see if anyone cares to submit a patch.
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org