简体   繁体   中英

Exception in thread “Thread-2” java.lang.NoClassDefFoundError: org/eclipse/jetty/server/Handler

Exception in thread "Thread-2" java.lang.NoClassDefFoundError: org/eclipse/jetty/server/Handler
at spark.Spark$1.run(Spark.java:196)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException: org.eclipse.jetty.server.Handler
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 2 more

Please let me know if i missed any jar files . I am not sure what is the problem

Note : My class path

<classpathentry kind="lib" path="C:/Project Jar files/mongo-java-driver-2.11.4.jar"/>
<classpathentry kind="var" path="M2_REPO"/>
<classpathentry kind="lib" path="C:/Users/Administrator/.m2/repository/spark/spark/0.9.9.4-SNAPSHOT/spark-0.9.9.4-20121122.205451-1.jar"/>
<classpathentry kind="lib" path="C:/Users/Administrator/.m2/repository/spark/spark/0.9.9.4-SNAPSHOT/spark-0.9.9.4-SNAPSHOT.jar"/>
<classpathentry kind="lib" path="C:/Users/Administrator/.m2/repository/org/freemarker/freemarker/2.3.19/freemarker-2.3.19.jar"/>
<classpathentry kind="lib" path="C:/Users/Administrator/.m2/repository/org/apache/commons/commons-lang3/3.1/commons-lang3-3.1.jar"/>
<classpathentry kind="lib" path="C:/Users/Administrator/.m2/repository/javax/servlet/servlet-api/2.5/servlet-api-2.5.jar"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="lib" path="C:/Users/Administrator/.m2/repository/org/slf4j/slf4j-jdk14/1.5.6/slf4j-jdk14-1.5.6.jar"/>
<classpathentry kind="lib" path="C:/Users/Administrator/.m2/repository/org/slf4j/jcl-over-slf4j/1.5.6/jcl-over-slf4j-1.5.6.jar"/>
<classpathentry kind="lib" path="C:/Users/Administrator/.m2/repository/org/slf4j/slf4j-api/1.5.6/slf4j-api-1.5.6.jar"/>
<classpathentry kind="lib" path="C:/Users/Administrator/.m2/repository/org/mortbay/jetty/jetty-util/6.1.25/jetty-util-6.1.25.jar"/>

You do not have jetty-server in your class path, only jetty-util. Add jetty-server and your problem should be fixed.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM