commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Julio S. G." <juli...@gmail.com>
Subject Re: [chain] Can't load class resource.
Date Fri, 29 Jun 2007 15:35:05 GMT
Great. I did the changes and made a patch. As I read at the "How to Get
Involved" section, it seems to me that it's just to send a attched file. Is
it correct? Who will apply the patch at main trunk?

Thanks,

Julio


On 5/15/07, Niall Pemberton <niall.pemberton@gmail.com> wrote:
>
> 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
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message