java.lang.NoClassDefFoundError

org/eclipse/jetty/websocket/api/Session

Samebug tips8

You might've forgot to add a dependency or it's written wrong. Also, you might be using incompatible versions of Java and Hibernate. More on this here: https://goo.gl/SjSlRA

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

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

Solutions on the web19882

  • org/eclipse/jetty/websocket/api/Session
  • org/eclipse/jetty/websocket/api/io/WebSocketBlockingConnection
  • org/eclipse/jetty/websocket/ WebSocketServlet
  • Stack trace

    • java.lang.NoClassDefFoundError: org/eclipse/jetty/websocket/api/Session at java.lang.Class.getDeclaredMethods0(Native Method) at java.lang.Class.privateGetDeclaredMethods(Class.java:2625) at java.lang.Class.getDeclaredMethods(Class.java:1868) at com.gargoylesoftware.htmlunit.javascript.configuration.AbstractJavaScriptConfiguration.process(AbstractJavaScriptConfiguration.java:197) at com.gargoylesoftware.htmlunit.javascript.configuration.AbstractJavaScriptConfiguration.getClassConfiguration(AbstractJavaScriptConfiguration.java:172) at com.gargoylesoftware.htmlunit.javascript.configuration.AbstractJavaScriptConfiguration.buildUsageMap(AbstractJavaScriptConfiguration.java:79) at com.gargoylesoftware.htmlunit.javascript.configuration.AbstractJavaScriptConfiguration.<init>(AbstractJavaScriptConfiguration.java:59) at com.gargoylesoftware.htmlunit.javascript.configuration.JavaScriptConfiguration.<init>(JavaScriptConfiguration.java:597) at com.gargoylesoftware.htmlunit.javascript.configuration.JavaScriptConfiguration.getInstance(JavaScriptConfiguration.java:613) at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.<init>(JavaScriptEngine.java:133) at com.gargoylesoftware.htmlunit.WebClient.init(WebClient.java:239) at com.gargoylesoftware.htmlunit.WebClient.<init>(WebClient.java:213) at com.gargoylesoftware.htmlunit.WebClient.<init>(WebClient.java:204) at HtmlUnitDriverTest.main(HtmlUnitDriverTest.java:11) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at com.intellij.rt.execution.application.AppMain.main(AppMain.java:144) Caused by: java.lang.ClassNotFoundException: org.eclipse.jetty.websocket.api.Session 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) ... 19 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

    2 times, 3 months ago
    Unknown user
    Once, 1 year ago
    Unknown user
    Once, 1 year ago
    364 times, 3 weeks ago
    Unknown user
    Once, 1 month ago
    1234 more bugmates