[JBoss JIRA] Created: (DNA-500) repositories example throws NoSuchMethodError due to conflicting log4j versions
by torkjel hongve (JIRA)
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
14 years, 9 months
[JBoss JIRA] Created: (DNA-501) dna-web-jcr-rest should depend on servlet-api using the provided scope instead of compile
by torkjel hongve (JIRA)
dna-web-jcr-rest should depend on servlet-api using the provided scope instead of compile
-----------------------------------------------------------------------------------------
Key: DNA-501
URL: https://jira.jboss.org/jira/browse/DNA-501
Project: DNA
Issue Type: Bug
Components: Server
Affects Versions: 0.6
Environment: JBoss DNA revision 1143
JBoss AS 5.1.0.GA
Reporter: torkjel hongve
JBoss throws the following exception when resources.war (produced by dna-web-jcr-rest-war) is deployed:
14:01:48,969 ERROR [[Resteasy]] Servlet.service() for servlet Resteasy threw exception
javax.servlet.ServletException: non-HTTP request or response
at javax.servlet.http.HttpServlet.service(HttpServlet.java:818)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
etc...
The error message is fairly cryptic, but the problem seems to be that the war file and JBoss itself provides different versions of servlet-api.jar. Using the provided scope for dna-web-jcr-rest's dependency on servlet-api fixes the problem by removing servlet-api.jar from the war file.
--
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
14 years, 9 months