cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael McKibben <>
Subject Re: ClassUtil
Date Wed, 12 Sep 2001 17:22:33 GMT

Hello, check you path and make sure it is relative to the jar file's root
path and *not* relative to the path of your class package name. The reason
for this is that ClassUtils uses java.lang.ClassLoader.getResource(...)
*not* java.lang.Class.getResource(...).  With Class.getResource(...)
relative paths get the current Class's package name prepended to the
resource path before delgating to ClassLoader.getResource(...).
ClassLoader.getResource(...) on the otherhand does not do this kind of
name resolving.



On Wed, 12 Sep 2001, Torsten Curdt wrote:

> I have a component that has it's own ExcaliburComponentManager
> with the CocoonComponentManager as parent.
> I'm trying now to set it up with it's own config file. For the
> roles I was trying:
>  URL resource = ClassUtils.getResource("st/dff/desire/desire.roles");
> but the resource is just null. (it's definitly in the jar and in the
> classpath) This is strange because I use the same ClassLoader (from the context)
> as Cocoon does.
>  manager = new ExcaliburComponentManager(cocoonManager,(ClassLoader)context.get(org.apache.cocoon.Constans.CONTEXT_CLASS_LOADER));
> Any hints?
> Thanks
> --
> Torsten
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, email:

To unsubscribe, e-mail:
For additional commands, email:

View raw message