jfinal启动报错

2019-06-25 10:04:42 INFO main org.eclipse.jetty.webapp.StandardDescriptorProcessor - NO JSP Support for /, did not find org.apache.jasper.servlet.JspServlet

2019-06-25 10:04:42 WARN main org.eclipse.jetty.webapp.WebAppContext - Failed startup of context o.e.j.w.WebAppContext{/,file:/F:/medicaltriagesystem/src/main/webapp/}

java.lang.reflect.InvocationTargetException

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.lang.reflect.Method.invoke(Unknown Source)

at org.eclipse.jetty.webapp.IterativeDescriptorProcessor.visit(IterativeDescriptorProcessor.java:85)

at org.eclipse.jetty.webapp.IterativeDescriptorProcessor.process(IterativeDescriptorProcessor.java:72)

at org.eclipse.jetty.webapp.MetaData.resolve(MetaData.java:367)

at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1248)

at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:706)

at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:492)

at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)

at org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:95)

at org.eclipse.jetty.server.Server.doStart(Server.java:277)

at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)

at com.jfinal.server.JettyServer.doStart(JettyServer.java:131)

at com.jfinal.server.JettyServer.start(JettyServer.java:70)

at com.jfinal.core.JFinal.start(JFinal.java:159)

at com.common.config.MainConfig.main(MainConfig.java:151)

Caused by: java.lang.NoClassDefFoundError: com/sun/xml/ws/transport/http/servlet/WSServletException

at java.lang.Class.getDeclaredConstructors0(Native Method)

at java.lang.Class.privateGetDeclaredConstructors(Unknown Source)

at java.lang.Class.getConstructor0(Unknown Source)

at java.lang.Class.newInstance(Unknown Source)

at org.eclipse.jetty.server.handler.ContextHandler$Context.createListener(ContextHandler.java:2324)

at org.eclipse.jetty.servlet.ServletContextHandler$Context.createListener(ServletContextHandler.java:1229)

at org.eclipse.jetty.webapp.StandardDescriptorProcessor.newListenerInstance(StandardDescriptorProcessor.java:1908)

at org.eclipse.jetty.webapp.StandardDescriptorProcessor.visitListener(StandardDescriptorProcessor.java:1865)

... 18 more

Caused by: java.lang.ClassNotFoundException: com.sun.xml.ws.transport.http.servlet.WSServletException

at com.jfinal.server.JFinalClassLoader.loadClass(JFinalClassLoader.java:56)

... 26 more


评论区

JFinal

2019-06-25 10:26

如果是在使用 JSP ,则要添加 JSP 依赖,在 jfinal 的 pom.xml 中可以找到一个说明 JSP 依赖需要的 dependency ,添加上,然后去除 provided 即可

如果不是这个问题,可能是你的 web.xml 头部的标签中的东东有问题,下载首页的 jfinal demo for maven,照抄里头的配置即可

二十九

2019-06-25 10:47

@JFinal jsp 那个错误已经解决了,但是其他的问题还是有

JFinal

2019-06-25 10:49

NoClassDefFoundError 是最基本的 java 基础,缺少依赖而已,加上即可

注意,你缺少的这个依赖不是 jfinal 需要的,与 jfinal 无关:
java.lang.NoClassDefFoundError: com/sun/xml/ws/transport/http/servlet/WSServletException

热门反馈

扫码入社