Detected both log4j-over-slf4j.jar AND slf4j-log4j12.jar on the class path, preempting StackOverflowError.
So you have to exclude conflict dependencies. Try this:
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
</exclusion>
<exclusion>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
</exclusion>
</exclusions>
This solved same problem with slf4j and Dozer.
Encountered a similar error, this how I resolved it:
Access Project explorer view on Netbeans IDE 8.2. Proceed to your project under Dependencies hover the cursor over the log4j-over-slf4j.jar to view the which which dependencies have indirectly imported as shown below.
Right click an import jar file and select Exclude Dependency
- To confirm, open your pom.xml file you will notice the exclusion element as below.
4. Initiate maven clean install and run your project. Good luck!
And for SBT : excludeDependencies += "log4j" % "log4j"