SparkJava Exception java.lang.NoClassDefFoundError: org/eclipse/jetty/websocket/server/pathmap/PathSpec
<p>For Spark-java with code (to be used with Spring Boot)</p>

<pre><code>public static void main(String[] args) {
    Spark.port(8080);
    Spark.webSocket("/chat", ChatWebSocketHandler.class);
    Spark.init();
</code></pre>

<p>I get exception and stop</p>

<pre><code>Exception in thread "Thread-2" java.lang.NoClassDefFoundError: org/eclipse/jetty/websocket/server/pathmap/PathSpec
    at spark.embeddedserver.jetty.EmbeddedJettyServer.ignite(EmbeddedJettyServer.java:105)
    at spark.Service.lambda$init$0(Service.java:349)
    at spark.Service$$Lambda$7/1663488386.run(Unknown Source)
    at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.ClassNotFoundException: org.eclipse.jetty.websocket.server.pathmap.PathSpec
    at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    ... 4 more
</code></pre>

<p>With Maven I use</p>

<pre><code>&lt;parent&gt;
    &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
    &lt;artifactId&gt;spring-boot-starter-parent&lt;/artifactId&gt;
    &lt;version&gt;1.4.0.RELEASE&lt;/version&gt;
&lt;/parent&gt;

&lt;properties&gt;
    &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt;
    &lt;project.reporting.outputEncoding&gt;UTF-8&lt;/project.reporting.outputEncoding&gt;
    &lt;java.version&gt;1.8&lt;/java.version&gt;
&lt;/properties&gt;

&lt;dependencies&gt;
    &lt;dependency&gt;
        &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
        &lt;artifactId&gt;spring-boot-starter-data-mongodb&lt;/artifactId&gt;
    &lt;/dependency&gt;


    &lt;dependency&gt;
        &lt;groupId&gt;com.sparkjava&lt;/groupId&gt;
        &lt;artifactId&gt;spark-core&lt;/artifactId&gt;
        &lt;version&gt;2.5&lt;/version&gt;
    &lt;/dependency&gt;
</code></pre>

<p>and I see 
<code>jetty-server-9.3.11.v20160721.jar</code>,
<code>websocket-server-9.3.11.v20160721.jar</code> and many others as dependencies</p>

<p>the same works in demo <a href="https://github.com/tipsy/spark-websocket" rel="nofollow">https://github.com/tipsy/spark-websocket</a></p>