1

我正在尝试运行挂毯氛围来为学校项目编写聊天应用程序。在此期间,我遇到了一个错误,即使我的教授也不理解。

java.io.FileNotFoundException:JAR 条目 WEB-INF/lib/antlr-runtime-3.5.2.jar!/ 未找到

没有人知道“!”是什么 代表。如果有人知道请让我们所有人都知道,以便将来和现在的新生可以想到这个错误。

这是在 UkLance 的演示框架上完成的:tapestry-atmosphere https://github.com/uklance/tapestry-atmosphere

以下是来自 (intellij) 的错误日志


2016-10-27 10:26:26.980:WARN:oejw.WebAppContext:Scanner-1: 无法启动上下文 oejwWebAppContext@71a39e83{/tapestry-atmosphere-demo,jar:file:///C:("locationToRoot") /tapestry-atmosphere-master/tapestry-atmosphere-demo/target/tapestry-atmosphere-demo.war!/,null}{C:\("locationToRoot")\tapestry-atmosphere-master\tapestry-atmosphere-demo\target \tapestry-atmosphere-demo.war} java.io.FileNotFoundException: JAR entry WEB-INF/lib/antlr-runtime-3.5.2.jar!/ not found in C:/("locationToRoot")\tapestry-atmosphere- master\tapestry-atmosphere-demo\target\tapestry-atmosphere-demo.war 在 sun.net.www.protocol.jar.JarURLConnection.connect(JarURLConnection.java:142) 在 sun.net.www.protocol.jar.JarURLConnection .getJarFile(JarURLConnection.java:89) 在 org.eclipse.jetty.webapp.MetaInfConfiguration。getTlds(MetaInfConfiguration.java:409) 在 org.eclipse.jetty.webapp.MetaInfConfiguration.scanForTlds(MetaInfConfiguration.java:326) 在 org.eclipse.jetty.webapp.MetaInfConfiguration.scanJars(MetaInfConfiguration.java:143) 在 org.eclipse .jetty.webapp.MetaInfConfiguration.preConfigure(MetaInfConfiguration.java:94) 在 org.eclipse.jetty.webapp.WebAppContext.preConfigure(WebAppContext.java:483) 在 org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java :519) 在 org.eclipse.jetty.deploy.bindings.StandardStarter.processBinding(StandardStarter.java:41) 在 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) 在 org.eclipse.jetty.deploy.providers.ScanningAppProvider.fileAdded(ScanningAppProvider.java:180) 在 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) 在 java.util.TimerThread.mainLoop(Timer.java:555) 在 java.util.TimerThread.run(Timer.java:505) [2016-10-27 10:26:27,252] 工件Tapestry-atmosphere-demo:war: Artifact 部署成功 [2016-10-27 10:26:27,252] Artifact Tapestry-atmosphere-demo:war:部署耗时 2,079 毫秒与目标 VM 断开连接,地址:'127.0.0.1:57612',传输:'socket'

感谢您花时间阅读/思考这个问题。

4

1 回答 1

2

xxx.jar!/yyy表示您正在尝试从 加载/yyy资源xxx.jar。这是通往资源的绝对路线。

通常,MyClass.class.getResource("/yyy")正在调用类似的东西。

在这种特殊情况下,您正在""从 jar 中加载资源(空字符串),并且该资源显然不存在。可能资源名称没有正确传播。

于 2016-10-27T09:00:09.147 回答