java - jenkins打war包部署到tomcat解壓啟動(dòng)失敗。
問題描述
項(xiàng)目在jenkins中進(jìn)行構(gòu)建打包,之后部署到tomcat中解壓運(yùn)營,如果是tomcat中已存在該項(xiàng)目的情況下,一定會(huì)失敗。并且如果把部署過來的war包在服務(wù)器上手動(dòng)解壓(windows服務(wù)器,使用解壓縮工具比如WINRAR進(jìn)行解壓),項(xiàng)目就可以正常運(yùn)行。查了一下log,在tomcat自動(dòng)解壓部署的war包并啟動(dòng)的時(shí)候會(huì)出現(xiàn)以下錯(cuò)誤:java.io.IOException: Invalid argument
at java.io.WinNTFileSystem.canonicalize0(Native Method)at java.io.WinNTFileSystem.canonicalize(WinNTFileSystem.java:428)at java.io.File.getCanonicalPath(File.java:618)at org.apache.catalina.startup.ExpandWar.expand(ExpandWar.java:137)at org.apache.catalina.startup.ContextConfig.fixDocBase(ContextConfig.java:619)at org.apache.catalina.startup.ContextConfig.beforeStart(ContextConfig.java:752)at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:308)at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:95)at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:394)at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:144)at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:725)at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:701)at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:717)at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:940)at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:467)at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1612)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 org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:300)at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)at org.apache.catalina.manager.ManagerServlet.check(ManagerServlet.java:1451)at org.apache.catalina.manager.ManagerServlet.deploy(ManagerServlet.java:724)at org.apache.catalina.manager.ManagerServlet.doPut(ManagerServlet.java:423)at javax.servlet.http.HttpServlet.service(HttpServlet.java:651)at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:292)at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)at org.apache.catalina.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:108)at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212)at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:614)at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141)at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:616)at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:528)at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1099)at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:670)at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.doRun(AprEndpoint.java:2508)at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:2497)at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)at java.lang.Thread.run(Thread.java:745)
查了很久一直找不到問題。求大神解答~
問題解答
回答1:提供有價(jià)值的信息太少,不好判斷。建議使用Deploy to container Plugin插件來發(fā)布war包。
回答2:是不是你在Jenkins打包的時(shí)候缺少東西,我懷疑是你的包存在問題,你可以copy下來,對比一下本地的包
相關(guān)文章:
1. 我在導(dǎo)入模板資源時(shí)遇到無法顯示的問題,請老師解答下2. 運(yùn)行python程序時(shí)出現(xiàn)“應(yīng)用程序發(fā)生異常”的內(nèi)存錯(cuò)誤?3. thinkphp6使用驗(yàn)證器 信息如何輸出到前端頁面4. python - sqlalchemy更新數(shù)據(jù)報(bào)錯(cuò)5. javascript - h5微信中怎么禁止橫屏6. PHPExcel表格導(dǎo)入數(shù)據(jù)庫怎么導(dǎo)入7. macos - 無法source activate python278. html5 - 前端面試碰到了一個(gè)緩存數(shù)據(jù)的問題,來論壇上請教一下9. html - 網(wǎng)頁的a標(biāo)簽到底要不要寫上域名?10. css - 移動(dòng)端 盒子內(nèi)加overflow-y:scroll后 字體會(huì)變大

網(wǎng)公網(wǎng)安備