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 end.
import com.xuggle.mediatool.IMediaReader; import com.xuggle.mediatool.IMediaViewer; import com.xuggle.mediatool.IMediaWriter; import com.xuggle.mediatool.ToolFactory; public class TranscodingExample { private static final String inputFilename = "E:\\VIDEO\\Facebook.mp4"; private static final String outputFilename = "E:\\VIDEO\\Facebook.flv"; public static void main(String[] args) { // create a media reader IMediaReader mediaReader = ToolFactory.makeReader(inputFilename); // create a media writer IMediaWriter mediaWriter = ToolFactory.makeWriter(outputFilename, mediaReader); // add a writer to the reader, to create the output file mediaReader.addListener(mediaWriter); // create a media viewer with stats enabled IMediaViewer mediaViewer = ToolFactory.makeViewer(true); // add a viewer to the reader, to see the decoded media mediaReader.addListener(mediaViewer); // read and decode packets from the source file and // and dispatch decoded audio and video to the writer while (mediaReader.readPacket() == null) ; } }
Here I am getting an error
"Detected both log4j-over-slf4j.jar AND slf4j-log4j12.jar on the class path, preempting StackOverflowError.".
I have used both jar files as libraries in order to solve logging problems. Does any one faced the same problem.If so kindly write suggestion or solution to come out of this mess. Thanks in advance.
As such, using log4j 2. x, even via SLF4J does not mitigate the vulnerability. However, as mentioned already, log4j 1. x is safe with respect to CVE-2021-44228.
log4j-over-slf4j. SLF4J ship with a module called log4j-over-slf4j. It allows log4j users to migrate existing applications to SLF4J without changing a single line of code but simply by replacing the log4j. jar file with log4j-over-slf4j.
impl. StaticLoggerBinder". This is a warning which is caused when there are no SLF4J bindings provided in the classpath.
slf4j is Simple Logging Facade for Java .
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
4. Initiate maven clean install and run your project. Good luck!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With