0

I was working on creating my first Xuggler media application. I was coding by watching their video on how to create the first media application.

Code

package demo;

import com.xuggle.xuggler.IContainer;

public class GetContainerInfo {
    public static void main(String[] args) {
        if(args.length!=1){
            throw new IllegalArgumentException("no file");
        }
        IContainer container = IContainer.make();
        if(container.open(args[0],IContainer.Type.READ,null)<0){
            throw new IllegalArgumentException("could not open");
        }
    }
}

Error

SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.  

Do I have the dependencies?

Yes, I do! I have all the dependencies. I imported them while creating the project.
Image:
enter image description here

What is causing that error and how do I solve it?

An SO User
  • 24,612
  • 35
  • 133
  • 221

2 Answers2

2

From SLF4J manual:

> SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
> SLF4J: Defaulting to no-operation (NOP) logger implementation SLF4J:
> See http://www.slf4j.org/codes.html#StaticLoggerBinder for further
> details.

This warning is printed because no slf4j binding could be found on your class path. The warning will disappear as soon as you add a binding to your class path. Assuming you add slf4j-simple-1.7.2.jar so that your class path contains: slf4j-api-1.7.2.jar slf4j-simple-1.7.2.jar ...

mazaneicha
  • 8,794
  • 4
  • 33
  • 52
  • all these dependencies are stored in **E:\xuggler-and-dependencies** so that will be the classpath? – An SO User Dec 23 '12 at 17:39
  • The name SLF4J stands for Simple Logging **Facade** for Java. I.e. it assumes that there is already a logging implementation in your application. You should have slf4j-simple-1.7.2.jar, slf4j-log4j12-1.7.2.jar or other in your classpath to enable logging. Please check the link that I provided in the answer. – mazaneicha Dec 23 '12 at 17:45
  • Well, Xuggler does not ask for `simple` file. I will still add that to class path – An SO User Dec 23 '12 at 18:32
0

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

Adding the following jars in the class path 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

AVA
  • 2,474
  • 2
  • 26
  • 41