commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ayyagari, Madhav" <Madhav.Ayyag...@sabre.com>
Subject RE: Where is the fix for "org.apache.commons.logging.impl.Log4JCategoryLog does not implement Log" ?
Date Wed, 05 Nov 2003 14:59:05 GMT
There was no commons-logging.jar in the classpath being used by ant other than the one we set
in CLASSPATH env variable.
Setting system's CLASSPATH to be empty makes this problem go away but others builds will fail.
Considering the effort involved in changing these other builds, the easier way is to fix this
problem.

Im using log4j 1.2.6 and commons-logging.jar 1.0.2/1.0.3

Thanks,
Madhav:~

-----Original Message-----
From: Todd V. Jonker [mailto:Todd@ConsciousCode.com]
Sent: Tuesday, November 04, 2003 3:26 PM
To: Jakarta Commons Users List
Subject: Re: Where is the fix for
"org.apache.commons.logging.impl.Log4JCategoryLog does not implement
Log" ?


Madhav,

You have another copy of commons-logging.jar in the classpath being used
by the ant task.  Probably in your ant/lib directory.  In that case you
probably shouldn't have it in the system CLASSPATH.

I suggest setting up your build environment so that your system CLASSPATH
can be empty.  This helps one avoid these kinds of problems.

Hope this helps,

.T.

On Tue, 4 Nov 2003 14:54:29 -0600, "Ayyagari, Madhav"
<Madhav.Ayyagari@sabre.com> said:
> Hi All,
> 
> I tried using both commons-logging.jar 1.0.2 and 1.0.3 versions without
> any success for the following problem:
> 
> [jdoc] java.lang.ExceptionInInitializerError
> [jdoc]     at java.lang.Class.forName0(Native Method)
> [jdoc]     at java.lang.Class.forName(Class.java:217)
> [jdoc]     at
> com.solarmetric.kodo.util.MultiLoaderClassResolver.resolveClass(MultiLoaderClassResolver.java:84)
> [jdoc]     at
> com.solarmetric.modules.tools.compiler.ClassArgParser.parseClasses(ClassArgParser.java:67)
> [jdoc]     at
> com.solarmetric.kodo.enhance.JDOEnhancer.enhance(JDOEnhancer.java:175)
> [jdoc]     at
> com.solarmetric.kodo.enhance.JDOEnhancer.enhance(JDOEnhancer.java:135)
> [jdoc]     at
> com.solarmetric.modules.integration.ant.JDOEnhancerTask.executeOn(JDOEnhancerTask.java:43)
> [jdoc]     at
> com.solarmetric.modules.integration.ant.TaskBase.execute(TaskBase.java:118)
> [jdoc]     at
> org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:166)
> [jdoc]     at org.apache.tools.ant.Task.perform(Task.java:319)
> [jdoc]     at org.apache.tools.ant.Target.execute(Target.java:309)
> [jdoc]     at org.apache.tools.ant.Target.performTasks(Target.java:336)
> [jdoc]     at
> org.apache.tools.ant.Project.executeTarget(Project.java:1306)
> [jdoc]     at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:371)
> [jdoc]     at
> org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:143)
> [jdoc]     at org.apache.tools.ant.Task.perform(Task.java:319)
> [jdoc]     at org.apache.tools.ant.Target.execute(Target.java:309)
> [jdoc]     at org.apache.tools.ant.Target.performTasks(Target.java:336)
> [jdoc]     at
> org.apache.tools.ant.Project.executeTarget(Project.java:1306)
> [jdoc]     at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:371)
> [jdoc]     at org.apache.tools.ant.Task.perform(Task.java:319)
> [jdoc]     at org.apache.tools.ant.Target.execute(Target.java:309)
> [jdoc]     at org.apache.tools.ant.Target.performTasks(Target.java:336)
> [jdoc]     at
> org.apache.tools.ant.Project.executeTarget(Project.java:1306)
> [jdoc]     at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:371)
> [jdoc]     at org.apache.tools.ant.Task.perform(Task.java:319)
> [jdoc]     at org.apache.tools.ant.Target.execute(Target.java:309)
> [jdoc]     at org.apache.tools.ant.Target.performTasks(Target.java:336)
> [jdoc]     at
> org.apache.tools.ant.Project.executeTarget(Project.java:1306)
> [jdoc]     at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:371)
> [jdoc]     at org.apache.tools.ant.Task.perform(Task.java:319)
> [jdoc]     at org.apache.tools.ant.Target.execute(Target.java:309)
> [jdoc]     at org.apache.tools.ant.Target.performTasks(Target.java:336)
> [jdoc]     at
> org.apache.tools.ant.Project.executeTarget(Project.java:1306)
> [jdoc]     at
> org.apache.tools.ant.Project.executeTargets(Project.java:1250)
> [jdoc]     at org.apache.tools.ant.Main.runBuild(Main.java:610)
> [jdoc]     at org.apache.tools.ant.Main.start(Main.java:196)
> [jdoc]     at org.apache.tools.ant.Main.main(Main.java:235)
> [jdoc]     org.apache.commons.logging.LogConfigurationException:
> org.apache.commons.logging.LogConfigurationException:
> org.apache.commons.logging.LogConfigurationException: Class
> org.apache.commons.logging.impl.Log4JCategoryLog does not implement Log
> [jdoc]     at
> org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:555)
> [jdoc]     at
> org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:289)
> [jdoc]     at
> org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:259)
> [jdoc]     at
> org.apache.commons.logging.LogFactory.getLog(LogFactory.java:390)
> 
> The class on which the failure happening has code something like this:
> 
> import org.apache.commons.logging.Log;
> import org.apache.commons.logging.LogFactory;
> 
> public class MyClass
> {
>    private final static Log log = LogFactory.getLog(MyClass.class);
> }
> 
> Ofcourse the CLASSPATH environmental variable on solaris unix has both
> log4j.jar and commons-logging.jar in it.
> 
> I searched internet but couldnt find any conclusive fix for this. As
> suggested online it looks like a class loader problem. 
> 
> Any help is greatly appreciated.
> 
> Madhav:~
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
> 

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


---------------------------------------------------------------------
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