Detected both log4j-over-slf4j.jar AND slf4j-log4j12.jar on the class path, preempting StackOverflowError.

后端 未结 7 2018
南方客
南方客 2020-12-04 23:31

I have used xuggle library in my project to trans code the video from mp4 to flv. I have used slf4j libraries also to support logging

相关标签:
7条回答
  • 2020-12-04 23:50

    For gradle

    compile('org.xxx:xxx:1.0-SNAPSHOT'){
        exclude module: 'log4j'
        exclude module: 'slf4j-log4j12'
    }
    
    0 讨论(0)
  • 2020-12-04 23:56

    I got the solution

    download Xuggler 5.4 here

    and some more jar to make it work...

    commons-cli-1.1.jar

    commons-lang-2.1.jar

    logback-classic-1.0.0.jar

    logback-core-1.0.0.jar

    slf4j-api-1.6.4.jar

    Reference Libraries

    You can check which dependencies xuggler needs from here:

    Add this jars and xuggle-xuggler-5.4.jar to your project's build path and it s ready.

    **version numbers may change

    0 讨论(0)
  • 2020-12-04 23:56

    SBT solution stated above did not work for me. What worked for me is excluding slf4j-log4j12

    //dependencies with exclusions
    libraryDependencies ++= Seq(
        //depencies
    ).map(_.exclude("org.slf4j","slf4j-log4j12"))

    0 讨论(0)
  • 2020-12-05 00:00

    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.

    0 讨论(0)
  • 2020-12-05 00:07

    Encountered a similar error, this how I resolved it:

    1. 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.

    2. Right click an import jar file and select Exclude Dependency

    3. 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!

    0 讨论(0)
  • 2020-12-05 00:08

    And for SBT : excludeDependencies += "log4j" % "log4j"

    0 讨论(0)
提交回复
热议问题