commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Niall Pemberton" <niall.pember...@gmail.com>
Subject Re: [chain] Can't load class resource.
Date Tue, 15 May 2007 23:02:26 GMT
On 5/15/07, Julio S. G. <juliosg@gmail.com> wrote:
>    Hi,
>
>    I have a web application running in jetty server and I'm trying to
> load the chain configuration just like all the docs available, but it
> isn't working.
>    My web.xml contains:
>
>   <context-param>
>     <param-name>org.apache.commons.chain.CONFIG_CLASS_RESOURCE</param-name>
>     <param-value>file:/C:/chain-config.xml</param-value>
>   </context-param>
>
>   <listener>
>     <listener-class>org.apache.commons.chain.web.ChainListener</listener-class>
>   </listener>
>
>    Debugging the source code I could see that the class loader is :
>
>    ClassLoader loader = Thread.currentThread().getContextClassLoader();
>
>    This loader is got from my web container thread
> (org.mortbay.jetty.webapp.WebAppClassLoader) and this seems to be the
> problem because the root directory of this loader is my web
> application root directory, and unfortunately the syntax "file:/"
> isn't working.
>
>    Do you have any clue to solve it?

Either you package up the chain config as part of your webapp or write
your own listener implementation to load them from an external file.
If you want Chain to provide that facilitliy then you could create a
Jira request - providing patches and tests would make it more likely
to be applied.

Niall

>    Thanks.
>
> Julio

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message