[MGNLWEBDAV-25] Expliclty disable slf4j-api conflict coming in from jackrabbit-jcr-server Created: 21/Nov/09  Updated: 27/Apr/12  Resolved: 26/Apr/12

Status: Closed
Project: WebDAV (closed)
Component/s: None
Affects Version/s: None
Fix Version/s: 1.1

Type: Bug Priority: Major
Reporter: Ryan Gardner Assignee: Daniel Lipp
Resolution: Fixed Votes: 0
Labels: webdav, webdav-client
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Apache Maven 2.2.1 (r801777; 2009-08-06 13:16:01-0600)
Java version: 1.6.0_15
Java home: /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home
Default locale: en_US, platform encoding: iso-8859-1
OS name: "mac os x" version: "10.5.8" arch: "x86_64" Family: "mac"


Attachments: Text File remove-slf4j-api.patch    
Template:
Patch included:
Yes
Acceptance criteria:
Empty

 Description   

In spite of the explicit dependency-management section in the pom, the slf4j-api 1.5.3 gets pulled in from the jackrabbit-jcr-server.

(the following notes are to help provide someone assistance in troubleshooting this issue if they have it in the future, so they will know to look for conflicting slf4j-api versions)

Having slf4j-api 1.5.3 and 1.5.6 in the classpath at the startup of the app causes this to happen when you start up the app:

INFO: Deploying web application archive magnoliaAuthor.war
Nov 21, 2009 2:55:01 PM org.apache.catalina.core.StandardContext start
SEVERE: Error listenerStart
Nov 21, 2009 2:55:01 PM org.apache.catalina.core.StandardContext start
SEVERE: Context [/magnoliaAuthor] startup failed due to previous errors

If you look at the localhost.log it is a bit more helpful and at least points out that it's an issue with slf4j-api

SEVERE: Error configuring application listener of class info.magnolia.cms.servlets.MgnlServletContextListener
java.lang.IllegalAccessError: tried to access field org.slf4j.impl.StaticLoggerBinder.SINGLETON from class org.slf4j.LoggerFactory

(with a stacktrace).

I can fix this in my app by including the webdav like this:

<dependency>
<groupId>info.magnolia</groupId>
<artifactId>magnolia-module-webdav</artifactId>
<version>1.0-m2</version>
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</exclusion>
</exclusions>
</dependency>


Generated at Mon Feb 12 11:11:02 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.