java.lang.NoClassDefFoundError

org/graphstream/graph/Graph

Samebug tips9

This error means there's a class missing in your classpath during runtime. You need to create a jar with all your dependencies and have it in your classpath. Check Maven Assembly Plugin and how to add your dependencies to a jar: https://goo.gl/U2zr8k


rafaelrafael

I had to build one fat jar that will include all dependencies from the other jars that i wanted to use.


ThZoisThZois

Don't give up yet. Our experts can help. Paste your full stack trace to get a solution.

Solutions on the web14118

  • via Stack Overflow by Ankita Mehta
    ,
  • via Stack Overflow by ordinary
    ,
  • Stack trace

    • java.lang.NoClassDefFoundError: org/graphstream/graph/Graph at java.lang.Class.getDeclaredMethods0(Native Method) at java.lang.Class.privateGetDeclaredMethods(Class.java:2531) at java.lang.Class.getMethod0(Class.java:2774) at java.lang.Class.getMethod(Class.java:1663) at sun.launcher.LauncherHelper.getMainMethod(LauncherHelper.java:494) at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:486) Caused by: java.lang.ClassNotFoundException: org.graphstream.graph.Graph at java.net.URLClassLoader$1.run(URLClassLoader.java:366) at java.net.URLClassLoader$1.run(URLClassLoader.java:355) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:354) at java.lang.ClassLoader.loadClass(ClassLoader.java:425) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308) at java.lang.ClassLoader.loadClass(ClassLoader.java:358) ... 6 more

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    Unknown visitor
    Unknown visitorOnce,
    Unknown visitor
    Unknown visitorOnce,
    Unknown visitor
    Unknown visitor3 times, last one
    Unknown visitor
    Unknown visitorOnce,
    ThZoisThZois
    3 times, last one
    1231 more bugmates