I am trying to perform some basic unit tests of some models. However, I get the following error. Now it looks like I have two bindings for SLF4J. This is because I use Mahout, which has one version of SLF4J, and Play has its own version.
Can someone tell me how can I solve this problem?
SLF4J: see http://www.slf4j.org/codes.html#multiple_bindings for an explanation. SLF4J: Found both jcl-over-slf4j.jar and slf4j-jcl.jar in the classpath, preempting StackOverflowError. SLF4J: For more information see http://www.slf4j.org/codes.html#jclDelegationLoop .
java.lang.ExceptionInInitializerError at org.slf4j.impl.StaticLoggerBinder.<init>(StaticLoggerBinder.java:82) at org.slf4j.impl.StaticLoggerBinder.<clinit>(StaticLoggerBinder.java:51) at org.slf4j.LoggerFactory.bind(LoggerFactory.java:121) at org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:111) at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:268) at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:241) at play.api.Logger$.<init>(Logger.scala:178) at play.api.Logger$.<clinit>(Logger.scala) at play.api.Application.<init>(Application.scala:106) at play.api.test.FakeApplication.<init>(Fakes.scala:141) at play.test.FakeApplication.<init>(FakeApplication.java:24) at play.test.Helpers.fakeApplication(Helpers.java:86) at databaseTest.startApp(databaseTest.java:31) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:27) at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31) at org.junit.runners.ParentRunner.run(ParentRunner.java:292) at org.junit.runner.JUnitCore.run(JUnitCore.java:157) at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:71) at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:199) at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:62) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120) Caused by: java.lang.IllegalStateException: Detected both jcl-over-slf4j.jar AND slf4j-jcl.jar on the class path, preempting StackOverflowError. See also http://www.slf4j.org/codes.html#jclDelegationLoop for more details. at org.slf4j.impl.JCLLoggerFactory.<clinit>(JCLLoggerFactory.java:64) ... 32 more
source share