perwendel / spark

A simple expressive web framework for java. Spark has a kotlin DSL https://github.com/perwendel/spark-kotlin
Apache License 2.0
9.63k stars 1.56k forks source link

Can't run Spark 2.7.2 (eclipse / maven) #989

Closed valtterip closed 6 years ago

valtterip commented 6 years ago

Created new project on Eclipse, spark-core 2.7.2 dependency to pom.xml. Running main with a get route stops with an exception (below). So, the example app won't run. Everything works fine when changing the spark-core version to 2.7.1.

Exception in thread "Thread-0" java.lang.NoClassDefFoundError: org/eclipse/jetty/http/HttpField at spark.embeddedserver.jetty.JettyServer.create(JettyServer.java:46) at spark.embeddedserver.jetty.EmbeddedJettyServer.ignite(EmbeddedJettyServer.java:100) at spark.Service.lambda$init$2(Service.java:549) at java.lang.Thread.run(Thread.java:745) Caused by: java.lang.ClassNotFoundException: org.eclipse.jetty.http.HttpField 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

Same thing happens when updating the spark-core to 2.7.2 on my other spark projects.

valtterip commented 6 years ago

Hmh, can't reproduce this on my MacOS env, so it has to be something screwed within my Win/eclipse/jetty or so. Closing the issue..

valtterip commented 6 years ago

Anyone bumping into same issue, I had to delete the local jetty-http and jetty-io jars used by spark-core 2.7.2, and force update the maven project. This on Windows only. I suppose the jars were corrupted, wouldn't be the first time.

Worth noting everything looked fine on the maven dependency tree.

ABHICHILUKA commented 5 years ago

just update jetty to latest version. make sure no duplicate versions exists.