开发者社区> 问答> 正文

IDEA Jetty部署war包显示jar包找不到,实际war包中jar包存在?报错

报错信息如下:

[2018-08-24 07:13:29,422] Artifact firstServletTest: Artifact is being deployed, please wait...
2018-08-24 07:13:31.629:WARN:oejw.WebAppContext:Scanner-1: Failed startup of context o.e.j.w.WebAppContext@458b3741{/firstServletTest,jar:file:///D:/Workspaces/firstServletTest/out/artifacts/firstServletTest/firstServletTest.war!/,null}{D:\Workspaces\firstServletTest\out\artifacts\firstServletTest\firstServletTest.war}
java.io.FileNotFoundException: JAR entry WEB-INF/lib/commons-logging-1.2.jar!/ not found in D:\Workspaces\firstServletTest\out\artifacts\firstServletTest\firstServletTest.war
    at sun.net.www.protocol.jar.JarURLConnection.connect(JarURLConnection.java:142)
    at sun.net.www.protocol.jar.JarURLConnection.getJarFile(JarURLConnection.java:89)
    at org.eclipse.jetty.webapp.MetaInfConfiguration.getTlds(MetaInfConfiguration.java:409)
    at org.eclipse.jetty.webapp.MetaInfConfiguration.scanForTlds(MetaInfConfiguration.java:326)
    at org.eclipse.jetty.webapp.MetaInfConfiguration.scanJars(MetaInfConfiguration.java:143)
    at org.eclipse.jetty.webapp.MetaInfConfiguration.preConfigure(MetaInfConfiguration.java:94)
    at org.eclipse.jetty.webapp.WebAppContext.preConfigure(WebAppContext.java:485)
    at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:521)
    at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
    at org.eclipse.jetty.deploy.bindings.StandardStarter.processBinding(StandardStarter.java:41)
    at org.eclipse.jetty.deploy.AppLifeCycle.runBindings(AppLifeCycle.java:188)
    at org.eclipse.jetty.deploy.DeploymentManager.requestAppGoal(DeploymentManager.java:499)
    at org.eclipse.jetty.deploy.DeploymentManager.addApp(DeploymentManager.java:147)
    at org.eclipse.jetty.deploy.providers.ScanningAppProvider.fileAdded(ScanningAppProvider.java:180)
    at org.eclipse.jetty.deploy.providers.WebAppProvider.fileAdded(WebAppProvider.java:458)
    at org.eclipse.jetty.deploy.providers.ScanningAppProvider$1.fileAdded(ScanningAppProvider.java:64)
    at org.eclipse.jetty.util.Scanner.reportAddition(Scanner.java:610)
    at org.eclipse.jetty.util.Scanner.reportDifferences(Scanner.java:529)
    at org.eclipse.jetty.util.Scanner.scan(Scanner.java:392)
    at org.eclipse.jetty.util.Scanner$1.run(Scanner.java:329)
    at java.util.TimerThread.mainLoop(Timer.java:555)
    at java.util.TimerThread.run(Timer.java:505)

Jetty版本:9.3.24,JDK:1.8

展开
收起
爱吃鱼的程序员 2020-06-06 15:40:48 1174 0
1 条回答
写回答
取消 提交回答
  • https://developer.aliyun.com/profile/5yerqm5bn5yqg?spm=a2c6h.12873639.0.0.6eae304abcjaIB
                        实际上你只能部署war或jar,jar里不能包含war,war的lib里可以有jar 
                    
    
                            谢谢回答,不过问题不是jar里包含war,而是同一个war包部署到tomcat中没问题,lib里有对应jar包,而用Jetty部署r就报找不到jar包
    
    2020-06-06 15:41:02
    赞同 展开评论 打赏
问答分类:
问答地址:
问答排行榜
最热
最新

相关电子书

更多
蚂蚁金服高级开发工程师萧恺:IDEA 插件开发入门教程 立即下载
低代码开发师(初级)实战教程 立即下载
阿里巴巴DevOps 最佳实践手册 立即下载