geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Jencks <david_jen...@yahoo.com>
Subject Re: Class.getResource does not find a resource in a JCA module
Date Mon, 16 Jun 2008 17:09:20 GMT
The only stuff that gets in a classloader in a rar is stuff in a jar.   
So, to make the log4j config file loadable from cl.getResource you  
will need to put it inside a jar in the rar.

Less than ideal, I know.

thanks
david jencks

On Jun 16, 2008, at 4:30 AM, florinbratu wrote:

>
> Hello!
>
> I am developping a JCA module, which has the following structure:
> <code>
> $ jar tf proactive.rar
> META-INF/
> META-INF/MANIFEST.MF
> META-INF/proactive-log4j
> META-INF/ra.xml
> META-INF/geronimo-ra.xml
> proactiveConnector.jar
> ProActive.jar
> bouncycastle.jar
> fractal.jar
> javassist.jar
> log4j.jar
> xercesImpl.jar
> xml-apis.jar
> </code>
> I use the following code to gain access to the proactive-log4j  
> configuration
> file:
> <code>
> public static final String LOG4J_CONFIG_FILE = "/META-INF/proactive- 
> log4j";
> URL log4jConfigFile =  
> caller.getClass().getResource(LOG4J_CONFIG_FILE);
> </code>
> This code is contained into a class placed in proactiveConnector.jar  
> - it is
> in fact a log4j RepositorySelector.
> The problem is that log4jConfigFile is null after the getResource  
> call. Can
> you tell me how to get this working, ie how to load the log4j  
> configuration
> file from the RAR archive?
>
> Thanks,
> Florin.
> -- 
> View this message in context: http://www.nabble.com/Class.getResource-does-not-find-a-resource-in-a-JCA-module-tp17862361s134p17862361.html
> Sent from the Apache Geronimo - Users mailing list archive at  
> Nabble.com.
>


Mime
View raw message