MeltwaterArchive / dropwizard-extra

A set of miscellaneous and common Dropwizard utilities
109 stars 45 forks source link

Transitive logging dependency from zookeeper clashes with dropwizard-logging #21

Open mjwillson opened 10 years ago

mjwillson commented 10 years ago

Maybe you guys could add an exclusion for this into the dropwizard-extra-zookeeper project?

SLF4J: Detected both log4j-over-slf4j.jar AND slf4j-log4j12.jar on the class path, preempting StackOverflowError. 
SLF4J: See also http://www.slf4j.org/codes.html#log4jDelegationLoop for more details.

Due to:

     +--- com.datasift.dropwizard:dropwizard-extra-zookeeper:0.7.1-1-SNAPSHOT
     |    \--- org.apache.zookeeper:zookeeper:3.4.6
     |         +--- org.slf4j:slf4j-log4j12:1.6.1
     |         |    \--- org.slf4j:slf4j-api:1.6.1 -> 1.7.6
     |    +--- io.dropwizard:dropwizard-logging:0.7.1
     |    |    +--- org.slf4j:log4j-over-slf4j:1.7.6
nicktelford commented 10 years ago

This is strange, as the necessary exclusion is already present at: https://github.com/datasift/dropwizard-extra/blob/develop/dropwizard-extra-zookeeper/pom.xml#L50

When I look at the dependency tree on my build, slf4j-log4j12 is nowhere to be found.

Can you confirm that the version you're building has this exclusion present?

mjwillson commented 10 years ago

Huh, OK that is odd.

I was getting this error when depending on dropwizard-extra-zookeeper only indirectly via dropwizard-extra-kafka, don't know if that makes a difference. Maybe the exclusion has to be present in the top-level project for it to take effect. I guess there's not much more you can do given that you already have that exclusion there anyway...