nutzboot版本:2.3
==部署脚本所在服务器==
系统:ubuntu16.10
java版本:1.8
Maven版本:3.3.9
==远程主机环境==
系统:ubuntu18.04
java版本:1.8
问题描述:
用脚本部署到远程主机上。
第一次运行报这个错误:java.lang.ClassNotFoundException: javax.xml.ws.http.HTTPException,且项目不能访问。
然后需要登陆远程主机,再次启动项目。就不报这个错。项目能正常访问。
日志片段:
[WARN ] 14:54:30.393 org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:554) - Failed startup of context o.e.j.w.WebAppContext@317e9c3c{/tzd/backend,[jar:file:/usr/local/tzd-all/tzd-backend/tzd-backend-0.0.1-SNAPSHOT.jar!/static/, file:///root/webapp/],UNAVAILABLE}
java.lang.NoClassDefFoundError: javax/xml/ws/http/HTTPException
at java.base/java.lang.Class.getDeclaredMethods0(Native Method)
at java.base/java.lang.Class.privateGetDeclaredMethods(Class.java:3119)
at java.base/java.lang.Class.privateGetPublicMethods(Class.java:3144)
at java.base/java.lang.Class.getMethods(Class.java:1863)
at org.nutz.mvc.impl.Loadings.isModule(Loadings.java:345)
at org.nutz.mvc.impl.Loadings.checkModule(Loadings.java:202)
at org.nutz.mvc.impl.Loadings.scanModuleInPackage(Loadings.java:188)
at org.nutz.mvc.impl.Loadings.scanModules(Loadings.java:167)
at org.nutz.mvc.impl.NutLoading.getModuleClasses(NutLoading.java:449)
at org.nutz.boot.starter.nutz.mvc.NbMvcLoading.getModuleClasses(NbMvcLoading.java:45)
at org.nutz.mvc.impl.NutLoading.evalUrlMapping(NutLoading.java:184)
at org.nutz.mvc.impl.NutLoading.load(NutLoading.java:108)
at org.nutz.boot.starter.nutz.mvc.NbMvcLoading.load(NbMvcLoading.java:28)
at org.nutz.mvc.ActionHandler.<init>(ActionHandler.java:19)
at org.nutz.mvc.NutFilter._init(NutFilter.java:91)
at org.nutz.mvc.NutFilter.init(NutFilter.java:69)
at org.eclipse.jetty.servlet.FilterHolder.initialize(FilterHolder.java:139)
at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:741)
at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:374)
at org.eclipse.jetty.webapp.WebAppContext.startWebapp(WebAppContext.java:1497)
at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1459)
at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:847)
at org.eclipse.jetty.servlet.ServletContextHandler.doStart(ServletContextHandler.java:287)
at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:545)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:138)
at org.eclipse.jetty.server.Server.start(Server.java:416)
at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:108)
at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:113)
at org.eclipse.jetty.server.Server.doStart(Server.java:383)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
at org.nutz.boot.starter.jetty.JettyStarter.start(JettyStarter.java:129)
at org.nutz.boot.AppContext.startServers(AppContext.java:306)
at org.nutz.boot.NbApp.execute(NbApp.java:205)
at org.nutz.boot.NbApp.run(NbApp.java:178)
at com.tzding.tzd.BackendLauncher.main(BackendLauncher.java:46)
Caused by: java.lang.ClassNotFoundException: javax.xml.ws.http.HTTPException
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:582)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:190)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:499)
... 36 more