XUGGLE ERROR: Exception in thread "main" java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory

I am trying to execute the following code:

import com.xuggle.mediatool.IMediaReader;
import com.xuggle.mediatool.IMediaWriter;
import com.xuggle.mediatool.ToolFactory;
public class vidcon {

    /**
     * @param args
     */
    public static void main(String[] args) {
        // TODO Auto-generated method stub
        IMediaReader reader = ToolFactory.makeReader("test.m4v");
        IMediaWriter writer = ToolFactory.makeWriter("out.flv");

        reader.addListener(writer);
        while(reader.readPacket() == null)
            ;
    }
}

But it is is giving me this error:

Exception in thread "main" java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory
    at com.xuggle.ferry.JNILibrary.<clinit>(JNILibrary.java:42)
    at com.xuggle.ferry.FerryJNI.<clinit>(FerryJNI.java:14)
    at com.xuggle.ferry.Ferry.<clinit>(Ferry.java:25)
    at com.xuggle.xuggler.XugglerJNI.<clinit>(XugglerJNI.java:19)
    at com.xuggle.xuggler.IContainer.<clinit>(IContainer.java:1622)
    at com.xuggle.mediatool.MediaReader.<init>(MediaReader.java:137)
    at com.xuggle.mediatool.ToolFactory.makeReader(ToolFactory.java:77)
    at vidcon.main(vidcon.java:11)
Caused by: java.lang.ClassNotFoundException: org.slf4j.LoggerFactory
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    ... 8 more

I have added SLF4J to my referenced libraries, but have no idea why this is not working.

Running on WIN 7, tried in eclipse and netbeans

Any idea?

Download SLF4J and put the slf4j-api-1.7.2.jar file onto your class path.

‍ XUGGLE ERROR: Exception in thread "main" java.lang , Download SLF4J and put the slf4j-api-1.7.2.jar file in your class path. Return to the "No Video Engine" and "Xuggle error: java.lang.UnsatisfiedLinkError: no xuggle-xuggler in java.library.path" thread Login to post to this thread Solved: Xuggle error: java.lang.UnsatisfiedLinkError: no xuggle-xuggler in java.library.path - February 8, 2019 at 3:46

The following combination of jars is working for me:

log4j-1.2.16.jar slf4j-api-1.7.6.jar slf4j-simple-1.7.6.jar xuggle-xuggler-5.4.jar

"No Video Engine" and "Xuggle error: java.lang.UnsatisfiedLinkError , Video Engine error - a thread in the Tracker forum. I will post screen shots of Tracker$4 run CONFIG: QuickTime exception: java.lang.reflect. A fatal error has been detected by the Java Runtime Environment: EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x18ca97c6, pid=908, tid=13044 JRE version: Java(TM) SE

Cause Could be un-availability of dependency jars or version conflicts.

The following jars combination worked fine for me:

xuggle-xuggler-5.4.jar slf4j-api-1.6.4.jar logback-core-1.0.0.jar logback-classic-1.0.0.jar

ERROR com.xuggle.ferry.JNILibraryLoader, Exception in thread "main" java.lang.UnsatisfiedLinkError: no xuggle-xuggler in java.library.path. at java.lang.ClassLoader.loadLibrary(Unknown Source). com.xuggle.ferry.FerryJNI.class is already in the library com.xuggle.ferry but I can&#39;t solve this problem: Exception in thread &quot;Thread-5&quot; java.lang

you might be added the apache-log4j-2.7-bin jars. Just Remove all those Jars and keep only

log4j-1.2.16.jar
slf4j-api-1.7.6.jar
slf4j-simple-1.7.6.jar
xuggle-xuggler-5.4.jar

Problem when making .mp4 from screenshot, ImageIO; import com.xuggle.mediatool. writer.close(); <= exception happens here. } Exception in thread "main" 10:25:11.462 [ 3164] ERROR  When I Run My Code, I Get this Error: Exception in thread "main" java.lang.NullPointerException at Main.drawBlock(Main.java:48) at Main.<init>(Main.java:43) at Main.main(Main.java:58) I Think this is Because of The Graphics that I Drew, Bu

Download SLF4J and put the slf4j-api-1.7.25.jar, slf4j-simple-1.7.25.jar files into application class path.

This will help to resolve this exception along with following exception SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".

XUGGLE ERROR: Exception in thread "main" java , Laden Sie SLF4J herunter und legen Sie die Datei slf4j-api-1.7.2.jar in Ihren Klassenpfad. Thanks for contributing an answer to Stack Overflow! Please be sure to answer the question.Provide details and share your research! But avoid …. Asking for help, clarification, or responding to other answers.

OutOfMemory error · Issue #24 · artclarke/xuggle-xuggler · GitHub, Exception in thread "main" java.lang.RuntimeException: could not open stream com.xuggle.xuggler.IStream@76547664 [index:0;id:0  The Exception in thread "main" suggests that this error has occurred in the main thread, the thread which is responsible for running Java application. This error can occur to any thread but if it happens in main thread then your program will crash. As per Javadoc, NoClassDefFoundError can be thrown during linking or loading of the class file.

[JDK-8187531] Crash in Xuggler library com , Event: 0.117 Thread 0x0000000002d00800 Exception <a 'java/security/​PrivilegedActionException'> (0x00000000eb1f9ed8) thrown at  Xuggle eats extra memory behind the scenes for it's native objects, and ~1.8gb is the maximum for a 32 bit JVM for some reason. More than this and we start hitting that ceiling. -XX:+UseConcMarkSweepGC : This garbage collector minimises the 'pause the world' cleanups, which wreak havoc to the screen grabbing.

[SOLVED] Xuggler video preview error - Forums, So far in our Xuggler tutorials series we have performed an Introduction to Xuggler for. We only care about handling video events, thus we only implement the IMediaListener. Thread.sleep(( long ) ( 1000 / FRAME_RATE)); yes also get same error can u give me download link to these jars. Hi Flatron, Given that Netty is using buffers, you may want to consider writing your own com.xuggle.xuggler.io.IURLProtocolHandler for it; that way Xuggler and FFmpeg can get bytes directly from your code without going through the InputStream mess.

Comments
  • Possible duplicate of Caused by: java.lang.ClassNotFoundException: org.slf4j.LoggerFactory
  • I too have the same problem. I downloaded the SLF4J but I can't understand what you mean by the class path. I placed the slf4j-api-1.7.2.jar file in the directory where I have my class file of the java file, but it is still having the same problem.