[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[equinox-dev] Commons logging madness
|
Title: Commons logging madness
Cross posting this on the equinox dev and Spring/OSGi lists.
I'm desperately trying to get logging to work in the Spring/OSGi testing environment as I simply have no hair left - having pulled it out from frustration. Those who know me will understand that this is a lot of hair.
So, in desperation, I finally turned on the commons logging diagnostic information so I can see something - anything - that will tell me what the heck is going on. Attached is the trace running under Equinox 3.2.1 and from running under Knopflerfish 2.0.1.
The same loaded bundle configuration is used for both runs. In the KF case, the log4J implementation is discovered and used as expected. In the Equinox case, the Log4J configuration fails because of which results in commons logging using the JDK logging implementation.
The problem appears to be multiple versions of org.apache.commons.logging.Log which causes – as one might expect – a class mismatch problem.
In both the KF and Equinox case, I have set the OSGi System property “org.osgi.framework.bootdelegation” to “javax.*,org.w3c.*,sun.*,org.xml.*,com.sun.*”. So, I’m not sure what’s happening. I’m stumped as to what’s going on.
Below are the relevant sections of trace output in the Equinox case (there’s a lot of output, sorry).
Any help would be appreciated in tracking this down...
[LogFactoryImpl@15479518 from org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader@4999881] [WARNING] the context classloader is not part of a parent-child relationship with the classloader that loaded LogFactoryImpl.
[LogFactoryImpl@15479518 from org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader@4999881] Trying to load 'org.apache.commons.logging.impl.Log4JLogger' from classloader org.eclipse.core.runtime.internal.adaptor.ContextFinder@667901
[LogFactoryImpl@15479518 from org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader@4999881] Class 'org.apache.commons.logging.impl.Log4JLogger' was found at 'jar:file:/Users/hhildebrand/.m2/repository/org/springframework/osgi/commons-logging.osgi/1.1-SNAPSHOT/commons-logging.osgi-1.1-SNAPSHOT.jar!/org/apache/commons/logging/impl/Log4JLogger.class'
[LogFactoryImpl@15479518 from org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader@4999881] The log adapter 'org.apache.commons.logging.impl.Log4JLogger' is missing dependencies when loaded via classloader org.eclipse.core.runtime.internal.adaptor.ContextFinder@667901: org/apache/log4j/Category
[LogFactoryImpl@15479518 from org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader@4999881] Attempting to instantiate 'org.apache.commons.logging.impl.Jdk14Logger'
[LogFactoryImpl@15479518 from org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader@4999881] [WARNING] the context classloader is not part of a parent-child relationship with the classloader that loaded LogFactoryImpl.
[LogFactoryImpl@15479518 from org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader@4999881] Trying to load 'org.apache.commons.logging.impl.Jdk14Logger' from classloader org.eclipse.core.runtime.internal.adaptor.ContextFinder@667901
[LogFactoryImpl@15479518 from org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader@4999881] Class 'org.apache.commons.logging.impl.Jdk14Logger' was found at 'jar:file:/Users/hhildebrand/.m2/repository/org/springframework/osgi/commons-logging.osgi/1.1-SNAPSHOT/commons-logging.osgi-1.1-SNAPSHOT.jar!/org/apache/commons/logging/impl/Jdk14Logger.class'
[LogFactoryImpl@15479518 from org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader@4999881] Class 'org.apache.commons.logging.impl.Jdk14Logger' was found in classloader org.eclipse.core.runtime.internal.adaptor.ContextFinder@667901. It is bound to a Log interface which is not the one loaded from classloader org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader@4999881
[LogFactoryImpl@15479518 from org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader@4999881] Warning: bad log hierarchy. You have more than one version of 'org.apache.commons.logging.Log' visible.
[LogFactoryImpl@15479518 from org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader@4999881] Trying to load 'org.apache.commons.logging.impl.Jdk14Logger' from classloader org.apache.maven.surefire.booter.IsolatedClassLoader@14994372
[LogFactoryImpl@15479518 from org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader@4999881] Class 'org.apache.commons.logging.impl.Jdk14Logger' was found at 'jar:file:/Users/hhildebrand/.m2/repository/org/springframework/osgi/commons-logging.osgi/1.1-SNAPSHOT/commons-logging.osgi-1.1-SNAPSHOT.jar!/org/apache/commons/logging/impl/Jdk14Logger.class'
[LogFactoryImpl@15479518 from org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader@4999881] Class 'org.apache.commons.logging.impl.Jdk14Logger' was found in classloader org.apache.maven.surefire.booter.IsolatedClassLoader@14994372. It is bound to a Log interface which is not the one loaded from classloader org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader@4999881
[LogFactoryImpl@15479518 from org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader@4999881] Warning: bad log hierarchy. You have more than one version of 'org.apache.commons.logging.Log' visible.
Attachment:
equinox.trace.txt
Description: Binary data
Attachment:
knopflerfish.trace.txt
Description: Binary data