Open NicMcPhee opened 5 years ago
I faced the same problem. Removing the dependency on spark-debug-tools
fixed the exception. The spark-debug-tools
package hasn't been updated for a few years now.
Thanks to @parambirs – that does fix the problem for us as well. Not thrilled that we have to drop the debugging tools, but it's nice that you were able to isolate the problem to spark-debug-tools
. (This is actually upgrading to v2.9.1 since that's the current latest version, but we had the same error on 2.9.1 as we did on 2.8.0.)
i ran into this problem when following the spark "Basic webapp structure" tutorial and building with gradle. after updating to spark-core
2.8 and above, my project was somehow using an outdated version of org.eclipse.jetty:jetty-server
. for example the newest release of jetty-server
, version 9.4.21.v20190926, contains the SessionHandler.getSessionCookieConfig()
method.
switching from gradle to maven worked for me -- this was easier than digging into why gradle wasn't keeping dependencies up-to-date.
One option if you're not into Spark too deeply is to switch to Javalin https://github.com/tipsy/javalin, which is arguably the spiritual successor to Spark. We switched over about a year ago, and have been happy with that decision.
On Thu, Apr 15, 2021 at 6:25 AM Gautam Chaurasia @.***> wrote:
Even I'm using
2.9.3</spark.version> but still getting below error. Not even using spark-debug-tools. Pls suggest !!
Exception in thread "Thread-0" java.lang.NoSuchMethodError: 'javax.servlet.SessionCookieConfig spark.embeddedserver.jetty.JettyHandler.getSessionCookieConfig()' at spark.embeddedserver.jetty.EmbeddedJettyFactory.create(EmbeddedJettyFactory.java:52) at spark.embeddedserver.EmbeddedServers.create(EmbeddedServers.java:80) at spark.Service.lambda$init$2(Service.java:624) at java.base/java.lang.Thread.run(Thread.java:829)
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/perwendel/spark/issues/1099#issuecomment-820348879, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACJZWO2PUIP2ASIXSL64CTTI3EK7ANCNFSM4G5DO7NA .
Our system runs fine on 2.7.2, but when I try to update to 2.8.0 Spark fails to start with:
It looks like
EmbeddedJettyFactory
is referring to a method (getSessionCookieConfig()
) inJettyHandleer
that doesn't exist.JettyHandler
hasn't been changed in 3 years, so I'm guessing maybe there's an update that didn't get merged in? Don't know why this fails for us and no one else, though.Our dependencies are:
Many thanks for your help.