Bugs item #606359, was opened at 2002-09-08 18:12 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=376685&aid=606359&group_id=22866
Category: JBossServer Group: v3.0 Rabbit Hole Status: Open Resolution: None Priority: 5 Submitted By: Michael Lipp (mlipp) Assigned to: Nobody/Anonymous (nobody) Summary: jboss-3.0.2 classloader bug Initial Comment: We are using jdom. jdom includes a class org.jdom.outputXMLOutputter which has a nested class org.jdom.output.XMLOutputter.NamespaceStack that is derived from org.jdom.output.NamespaceStack. jdom is made available to the ejbs with an entry "Class-Path: lib/jdom-B8.jar" in the ejb's manifest. The application is deployed as ear with jdom-B8.jar in the lib/ subsection of the ear. This works. Now we use jdom in a webapp as well. jdom is made available as WEB-INF/lib/jdom-B8.jar (though this does not matter, we use the default Java2 delegation). We now use org.jdom.output.SAXOutputter in the web tier (which has a nested class SAXOutputter.NamespaceStack derived from org.jdom.outputNamespaceStack). Now using XMLOutputter in the EJB results in an "java.lang.IllegalAccessError: class org.jdom.output.XMLOutputter$NamespaceStack cannot access its superclass org.jdom.output.NamespaceStack". This is a strong indication that the two classes use different classloaders. So we have inserted three classloader dump statements (see appended file) and yes, if SAXOutputter is used in the web layer first, we have the following situation: EJBclass -> UnifiedClassLoader url=ejb.jar org.jdom.output.XMLOutputter -> UnifiedClassLoader url=ejb.jar org.jdom.output.NamespaceStack -> UnifiedClassLoader url=jdom-B8.jar I didn't track things further down (I stopped when I found that figure 2-3 - which should be part of the key - in the (bought) docu is missing). But obviously resolving NamespaceStack (as required by SAXOutputter) in the web layer loads it through the jdom-B8.jar loader and this association remains. Loading XMLOutputter later in the ejb layer loads XMLOutputter through the ejb's class loader but finds the already loaded NamespaceStack with the associated jdom-B8.jar loader. >From the user perspective, I don't think we have done anything wrong. Its a bug in the classloader implementation (or even architecture). ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=376685&aid=606359&group_id=22866 ------------------------------------------------------- This sf.net email is sponsored by: OSDN - Tired of that same old cell phone? Get a new here for FREE! https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390 _______________________________________________ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
