0

When i run command ./runExamples.sh on terminal it throws an exception. I have checked that Java is installed and class path is already set. How to resolve this?

Starting examples app with java from environment variable PATH...
Exception in thread "main" java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory
    at org.optaplanner.examples.common.app.CommonApp.<clinit>(CommonApp.java:36)
    at org.optaplanner.examples.app.OptaPlannerExamplesApp.main(OptaPlannerExamplesApp.java:72)
Caused by: java.lang.ClassNotFoundException: org.slf4j.LoggerFactory
    at java.net.URLClassLoader$1.run(URLClassLoader.java:372)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:360)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    ... 2 more
Mike Laren
  • 8,028
  • 17
  • 51
  • 70
Nitika
  • 31
  • 2
  • That's weird, as the `runExamples.sh` script calls `java ... -jar optaplanner-examples.jar` which contains a MANIFEST.MF that includes `../binaries/log4j.jar`. Did you by any change move the directory `examples` or delete something from the parent directory `optaplanner-distribution-*`? – Geoffrey De Smet Apr 23 '15 at 08:56

1 Answers1

0

You miss the slf4j.jar in your classpath. download and add it.

Jens
  • 67,715
  • 15
  • 98
  • 113