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(Unknown
Source)
        at 
org.apache.xerces.impl.XMLDocumentScannerImpl$ContentDispatcher.scanRootElementHook(Unknown
Source)
        at 
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.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]

Reply via email to