[ 
https://issues.apache.org/jira/browse/JDO-681?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13062394#comment-13062394
 ] 

Craig L Russell commented on JDO-681:
-------------------------------------

What do you mean by "the root of the CLASSPATH"? There are two class loaders 
involved in these tests: the loader that loads the Enhancer, which we construct 
so that the executables are loadable; and the context class loader, which was 
set up by maven and not modified. [the third loader, which can load the classes 
to be enhanced, is not involved in this issue]

If log4j calls getResourceAsStream to find the log4j properties, which class 
loader does it use? It could be the context class loader or the loader that 
loaded log4j (log4j can get this by calling getClass().getClassLoader()). If it 
is the context class loader, we might have to set the context class loader 
before calling the enhancer.

> RI enhancer is not finding log4j properties file
> ------------------------------------------------
>
>                 Key: JDO-681
>                 URL: https://issues.apache.org/jira/browse/JDO-681
>             Project: JDO
>          Issue Type: Bug
>          Components: tck
>    Affects Versions: JDO 3 maintenance release 1
>            Reporter: Michelle Caisse
>            Assignee: Andy Jefferson
>
> While running the enhance goal of the TCK, on instantiation of the enhancer, 
> warnings are produced about log4j initialization and appenders. The 
> resources(log4j.properties) are on the classpath of the classloader used to 
> instantiate the enhancer. To find the resources, the enhancer need to use 
> that classloader, not the context classloader.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to