Joao, (I don't see where the Xerces jar is--it's not in your AAR. Can't be the Sun JDK 1.5 version, because all of those are prefaced with com.sun.)
You might try: 1) Run the JRE with -verbose:class option. See if your class is actually getting loaded. 2) Get a reference to a classloader the is in your code and compare this with the classloader for org.apache.commons.digester.Digester. See if they are the same (using identity ==). This might help: http://tomcat.apache.org/tomcat-6.0-doc/class-loader-howto.html. Note that the web application classloaders are child-first classloaders, so classes loaded by these won't be visible to parent classloaders in the tree. Not sure if the Axis 2.0 classloaders are the same way. Hope this helps, Brennan Spies Sr. Programmer Analyst Shared Application Services (209) 341-6457 -----Original Message----- From: João Luís Pinto [mailto:[EMAIL PROTECTED] Sent: Thursday, October 25, 2007 1:41 AM To: [email protected] Subject: Possible classloader issue - help needed Hello, I'm trying to load a commons-chain catalog (from a file inside the service folder) and invoke a chain inside the invokeBusinessLogic method of the MessageReceiver (AbstractInOutMessageReceiver subclass). I'm using the latest release of Axis2 and of Commons-Chain. The service is deployed in Tomcat 6.0.14 in exploded form, and includes the jar dependencies in the service's /lib folder. No jars were added to the axis WEB-INF/lib folder nor to the Tomcat setup. Here is the relevant code snippet: <code> ConfigParser configParser = new ConfigParser(); Parameter parameter = msgContext.getParameter(Constants.CATALOG_FILE_URL_PARAM); if (parameter == null) { log.error("Parameter " + Constants.CATALOG_FILE_URL_PARAM //$NON-NLS-1$ + " not found!"); //$NON-NLS-1$ } else { URL url = msgContext.getAxisService() .getClassLoader() .getResource(parameter.getValue().toString().trim()); log1.debug("Loading " + url); //$NON-NLS-1$ configParser.parse(url); } catalog = CatalogFactory.getInstance().getCatalog(); </code> The following exception is thrown in the last line of the "else" block: java.lang.ClassNotFoundException: org.apache.commons.chain.impl.CatalogBase at org.apache.commons.digester.Digester.createSAXException(Digester.java:3181) at org.apache.commons.digester.Digester.createSAXException(Digester.java:3207) at org.apache.commons.digester.Digester.startElement(Digester.java:1456) at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source) at org.apache.xerces.impl.dtd.XMLDTDValidator.startElement(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknow n Source) at org.apache.xerces.impl.XMLDocumentScannerImpl$ContentDispatcher.scanRootEleme ntHook(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatch er.dispatch(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source) at org.apache.commons.digester.Digester.parse(Digester.java:1745) at org.apache.commons.chain.config.ConfigParser.parse(ConfigParser.java:198) The CatalogBase class is of course part of the commons-chain jar included like previously mentioned in the service /lib folder. Does anyone have any idea on what could be going wrong? I can provide any additional information required to make a better judgement if needed. Thank you, João --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
