Jena / maven / eclipse问题 - MultiException [java.lang.RuntimeException:错误扫描条目

时间:2017-01-05 02:03:10

标签: eclipse maven jena

我有一个Java maven项目,它有一个jetty插件,并在pom.xml文件中使用不同的依赖项。耶拿就是其中之一。基于我在线阅读的内容,依赖jena tbd就足够了,因为它还带来了包括core,arq等在内的依赖项。当我这样做并构建项目时,它工作正常但是我一开始调试,以下是我得到的错误。我试过在java 7和8版本之间切换,但仍然无法解决问题。不确定我做错了什么,但是在实施项目的第一步中陷入困境是非常令人沮丧的。如果没有Jena依赖项,项目会按照它应该执行的操作,但只要添加了Jena依赖项并下载了Jar文件。调试时出现错误。

有什么想法吗?欣赏它。 (我已经排除了系统无法从这里加载jena jar文件的许多类,因为这里的文字有限......有很多错误!)。

MultiException[java.lang.RuntimeException: Error scanning entry org/apache/jena/iri/IRIRelativize.class from jar file:/C:/Users/amis/.m2/repository/org/apache/jena/jena-iri/3.1.1/jena-iri-3.1.1.jar, java.lang.RuntimeException: Error scanning entry org/apache/jena/iri/impl/SchemeSpecification.class from jar file:/C:/Users/amis/.m2/repository/org/apache/jena/jena-iri/3.1.1/jena-iri-3.1.1.jar]
    at org.eclipse.jetty.annotations.AnnotationConfiguration.scanForAnnotations(AnnotationConfiguration.java:460)
    at org.eclipse.jetty.annotations.AnnotationConfiguration.configure(AnnotationConfiguration.java:380)
    at org.eclipse.jetty.webapp.WebAppContext.configure(WebAppContext.java:466)
    at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1342)
    at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:743)
    at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:492)
    at org.eclipse.jetty.maven.plugin.JettyWebAppContext.doStart(JettyWebAppContext.java:282)
    at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:69)
    at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:118)
    at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:100)
    at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:60)
    at org.eclipse.jetty.server.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:155)
    at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:69)
    at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:118)
    at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:100)
    at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:60)
    at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:69)
    at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:118)
    at org.eclipse.jetty.server.Server.start(Server.java:338)
    at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:100)
    at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:60)
    at org.eclipse.jetty.server.Server.doStart(Server.java:305)
    at org.eclipse.jetty.maven.plugin.JettyServer.doStart(JettyServer.java:68)
    at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:69)
    at org.eclipse.jetty.maven.plugin.AbstractJettyMojo.startJetty(AbstractJettyMojo.java:564)
    at org.eclipse.jetty.maven.plugin.AbstractJettyMojo.execute(AbstractJettyMojo.java:360)
    at org.eclipse.jetty.maven.plugin.JettyRunMojo.execute(JettyRunMojo.java:168)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
    at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
    at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
    at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
    at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
    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:498)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
2017-01-05 12:47:50.969:WARN:oejsh.RequestLogHandler:main: !RequestLog
2017-01-05 12:47:50.999:INFO:oejs.ServerConnector:main: Started ServerConnector@625a9c5d{HTTP/1.1}{0.0.0.0:8585}
[INFO] Started Jetty Server

1 个答案:

答案 0 :(得分:1)

您需要至少使用Jetty 9.2 for Java 8代码(Jena 3.x)才能正常工作。

详细信息:https://webtide.com/jetty-9-2-0-released/

或者,您可以尝试仅修复ASM(我建议不要这样做):https://vaskoz.wordpress.com/2013/12/18/fix-jetty-9-1-for-jdk8-annotations/

P.S。 Eclipse IDE与Jetty是一个Eclipse项目(https://eclipse.org/jetty/)无关。