[
https://jira.jboss.org/jira/browse/DNA-500?page=com.atlassian.jira.plugin...
]
Randall Hauch commented on DNA-500:
-----------------------------------
This issue has been an occasional source of frustration for some time. But I just noticed
that we're quite a few releases behind on the SLF4J library (the latest is 1.5.6, but
we're using 1.4.3). According to
http://www.slf4j.org/news.html this TRACE issue
appears when using Log4J versions older than 1.2.12 (as demonstrated above), and this was
reported and fixed as Bug 68 (
http://bugzilla.slf4j.org/show_bug.cgi?id=68) in SLF4J 1.5.1
by having the Log4J adapter class remap TRACE messages as DEBUG messages.
Simply upgrading the SLF4J API and adapter versions to 1.5.1 (or higher) should therefore
fix this problem (hopefully once and for all). Changing the SLF4J API and Log4J adapter
to 1.5.6 (the latest) appears to have worked with no regressions, and I was able to
successfully run the repositories example using run.sh from
target/dna-example-repositories-basic.dir/.
This was committed to SVN as r1143.
repositories example throws NoSuchMethodError due to conflicting
log4j versions
-------------------------------------------------------------------------------
Key: DNA-500
URL:
https://jira.jboss.org/jira/browse/DNA-500
Project: DNA
Issue Type: Bug
Components: Examples
Affects Versions: 0.6
Environment: JBoss DNA revision 1142
java version "1.6.0_0"
OpenJDK Runtime Environment (IcedTea6 1.5) (ArchLinux-1.5-5-i686)
OpenJDK Server VM (build 14.0-b15, mixed mode)
Reporter: torkjel hongve
When launching the repositories example (using run.sh from
target/dna-example-repositories-basic.dir/) I immediately get the following error:
Exception in thread "Thread-1" java.lang.NoSuchMethodError:
org.apache.log4j.Logger.isTraceEnabled()Z
at org.slf4j.impl.Log4jLoggerAdapter.isTraceEnabled(Log4jLoggerAdapter.java:81)
at org.jboss.dna.common.util.Logger.isTraceEnabled(Logger.java:411)
at
org.jboss.dna.graph.connector.map.MapRepositoryConnection.execute(MapRepositoryConnection.java
etc...
This is due to the lib direcotry containing both log4j-1.2.14.jar and log4j-1.2.8.jar.
1.2.14 is the correct one and contains the isTraceEnabled method, but version 1.2.8 is the
one being used at runtime.
"mvn dependency:tree" shows the following dependendy paths to log4j:
[INFO] +- log4j:log4j:jar:1.2.14:compile
[INFO] +- org.jboss.security:jbosssx-bare:jar:2.0.2.SP6:compile
[INFO] | +- org.jboss.security:jboss-security-acl-impl:jar:2.0.2.SP6:compile
[INFO] | | +- jboss:jboss-logging-log4j:jar:2.0.2.GA:runtime
[INFO] | | | \- apache-log4j:log4j:jar:1.2.8:runtime
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira