Closed vasyas closed 7 years ago
Spark's Jetty dependency should bring the Servlet API dependency with it. Can you check with mvn dependency:tree
what dependencies your project has? I suspect there are conflicting versions of Servlet API in your class path.
I'm using Spark 2.5.2 in embedded mode with a Maven dependency: com.sparkjava:spark-core:compile:2.5.2
But my app is not starting: java.lang.NoClassDefFoundError: javax/servlet/Filter
That's probably due to missing transitive dependency on Servlet API.
I was trying to add different different API jars, but didn't found one to be working with Spark. For example, org.apache.geronimo.specs:geronimo-servlet_3.0_spec:compile:1.0 says: java.lang.ClassNotFoundException: javax.servlet.http.HttpSessionIdListener
Which Servlet API jar should I use with Spark ?