maven 库的 jetty-server-8.1.8.jar 只有100多k 明显是文件损坏了
Exception in thread "main" java.lang.NoClassDefFoundError: org/eclipse/jetty/server/Connectorat com.jfinal.server.ServerFactory.getServer(ServerFactory.java:44)at com.jfinal.core.JFinal.start(JFinal.java:158)at com.forever.jfinal.Server.main(Server.java:22)Caused by: java.lang.ClassNotFoundException: org.eclipse.jetty.server.Connectorat java.net.URLClassLoader$1.run(URLClassLoader.java:372)at java.net.URLClassLoader$1.run(URLClassLoader.java:361)at java.security.AccessController.doPrivileged(Native Method)at java.net.URLClassLoader.findClass(URLClassLoader.java:360)at java.lang.ClassLoader.loadClass(ClassLoader.java:424)at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 3 more
@Jfinal
加进去还是一样报错.估计是我哪里弄错了。能给一个纯净maven helloworld 的jfinal项目我?
Exception in thread "main" java.lang.NoClassDefFoundError: org/eclipse/jetty/server/nio/SelectChannelConnectorat com.jfinal.server.JettyServer.doStart(JettyServer.java:84)at com.jfinal.server.JettyServer.start(JettyServer.java:64)at com.jfinal.core.JFinal.start(JFinal.java:159)at com.forever.jfinal.Server.main(Server.java:22)at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)at java.lang.reflect.Method.invoke(Method.java:483)at com.intellij.rt.execution.application.AppMain.main(AppMain.java:134)Caused by: java.lang.ClassNotFoundException: org.eclipse.jetty.server.nio.SelectChannelConnectorat java.net.URLClassLoader$1.run(URLClassLoader.java:372)at java.net.URLClassLoader$1.run(URLClassLoader.java:361)at java.security.AccessController.doPrivileged(Native Method)at java.net.URLClassLoader.findClass(URLClassLoader.java:360)at java.lang.ClassLoader.loadClass(ClassLoader.java:424)at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)at java.lang.ClassLoader.loadClass(ClassLoader.java:357)... 9 more
还没有想好呢, 估计是没有引入jetty-server
具体报什么错误? 贴下图
设置成这个就可以了~
<dependency> <groupId>com.jfinal</groupId> <artifactId>jetty-server</artifactId> <version>8.1.8</version> <scope>compile</scope> </dependency> 把scope该为compile
</dependency>
把scope该为compile
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
暂无简介
文章 0 评论 0
接受
发布评论
评论(11)
maven 库的 jetty-server-8.1.8.jar 只有100多k 明显是文件损坏了
引用来自“彪悍的人纸糊的心”的评论
Exception in thread "main" java.lang.NoClassDefFoundError: org/eclipse/jetty/server/Connector
at com.jfinal.server.ServerFactory.getServer(ServerFactory.java:44)
at com.jfinal.core.JFinal.start(JFinal.java:158)
at com.forever.jfinal.Server.main(Server.java:22)
Caused by: java.lang.ClassNotFoundException: org.eclipse.jetty.server.Connector
at java.net.URLClassLoader$1.run(URLClassLoader.java:372)
at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:360)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 3 more
@Jfinal
加进去还是一样报错.估计是我哪里弄错了。能给一个纯净maven helloworld 的jfinal项目我?
引用来自“彪悍的人纸糊的心”的评论
Exception in thread "main" java.lang.NoClassDefFoundError: org/eclipse/jetty/server/Connector
at com.jfinal.server.ServerFactory.getServer(ServerFactory.java:44)
at com.jfinal.core.JFinal.start(JFinal.java:158)
at com.forever.jfinal.Server.main(Server.java:22)
Caused by: java.lang.ClassNotFoundException: org.eclipse.jetty.server.Connector
at java.net.URLClassLoader$1.run(URLClassLoader.java:372)
at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:360)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 3 more
@Jfinal
引用来自“彪悍的人纸糊的心”的评论
Exception in thread "main" java.lang.NoClassDefFoundError: org/eclipse/jetty/server/Connector
at com.jfinal.server.ServerFactory.getServer(ServerFactory.java:44)
at com.jfinal.core.JFinal.start(JFinal.java:158)
at com.forever.jfinal.Server.main(Server.java:22)
Caused by: java.lang.ClassNotFoundException: org.eclipse.jetty.server.Connector
at java.net.URLClassLoader$1.run(URLClassLoader.java:372)
at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:360)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 3 more
@Jfinal
Exception in thread "main" java.lang.NoClassDefFoundError: org/eclipse/jetty/server/nio/SelectChannelConnector
at com.jfinal.server.JettyServer.doStart(JettyServer.java:84)
at com.jfinal.server.JettyServer.start(JettyServer.java:64)
at com.jfinal.core.JFinal.start(JFinal.java:159)
at com.forever.jfinal.Server.main(Server.java:22)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:134)
Caused by: java.lang.ClassNotFoundException: org.eclipse.jetty.server.nio.SelectChannelConnector
at java.net.URLClassLoader$1.run(URLClassLoader.java:372)
at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:360)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 9 more
Exception in thread "main" java.lang.NoClassDefFoundError: org/eclipse/jetty/server/Connector
at com.jfinal.server.ServerFactory.getServer(ServerFactory.java:44)
at com.jfinal.core.JFinal.start(JFinal.java:158)
at com.forever.jfinal.Server.main(Server.java:22)
Caused by: java.lang.ClassNotFoundException: org.eclipse.jetty.server.Connector
at java.net.URLClassLoader$1.run(URLClassLoader.java:372)
at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:360)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 3 more
@Jfinal
还没有想好呢, 估计是没有引入jetty-server
具体报什么错误? 贴下图
设置成这个就可以了~