简体   繁体   English

Maven Web应用程序不再起作用(Netbeans)

[英]Maven web application doesn`t work anymore (Netbeans)

This is what I am getting when I am trying to create a new Maven Web Application in Netbeans: 当我尝试在Netbeans中创建新的Maven Web应用程序时,这就是我得到的:

15.02.2014 11:48:13 com.google.inject.internal.MessageProcessor visit
INFO: An exception was caught and reported. Message: java.util.NoSuchElementException
java.util.NoSuchElementException
   at java.util.AbstractList$2.next(libgcj.so.14)
   at com.google.inject.spi.InjectionPoint.forMember(InjectionPoint.java:116)
   at com.google.inject.spi.InjectionPoint.<init>(InjectionPoint.java:73)
   at com.google.inject.spi.InjectionPoint$InjectableMethod.toInjectionPoint(InjectionPoint.java:459)
   at com.google.inject.spi.InjectionPoint.getInjectionPoints(InjectionPoint.java:725)
   at com.google.inject.spi.InjectionPoint.forInstanceMethodsAndFields(InjectionPoint.java:358)
   at com.google.inject.spi.InjectionPoint.forInstanceMethodsAndFields(InjectionPoint.java:377)
   at com.google.inject.internal.BindingBuilder.toInstance(BindingBuilder.java:84)
   at org.codehaus.plexus.DefaultPlexusContainer$ContainerModule.configure(DefaultPlexusContainer.java:803)
   at com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:229)
   at com.google.inject.spi.Elements.getElements(Elements.java:103)
   at com.google.inject.spi.Elements.getElements(Elements.java:80)
   at org.sonatype.guice.bean.binders.MergedModule.configure(MergedModule.java:54)
   at com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:229)
   at com.google.inject.spi.Elements.getElements(Elements.java:103)
   at com.google.inject.internal.InjectorShell$Builder.build(InjectorShell.java:136)
   at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:104)
   at com.google.inject.Guice.createInjector(Guice.java:94)
   at com.google.inject.Guice.createInjector(Guice.java:71)
   at com.google.inject.Guice.createInjector(Guice.java:61)
   at org.codehaus.plexus.DefaultPlexusContainer.addPlexusInjector(DefaultPlexusContainer.java:470)
   at org.codehaus.plexus.DefaultPlexusContainer.<init>(DefaultPlexusContainer.java:196)
   at org.codehaus.plexus.DefaultPlexusContainer.<init>(DefaultPlexusContainer.java:160)
   at org.apache.maven.cli.MavenCli.container(MavenCli.java:375)
   at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:191)
   at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
   at java.lang.reflect.Method.invoke(libgcj.so.14)
   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)
15.02.2014 11:48:13 com.google.inject.internal.MessageProcessor visit
INFO: An exception was caught and reported. Message: java.util.NoSuchElementException
java.util.NoSuchElementException
   at java.util.AbstractList$2.next(libgcj.so.14)
   at com.google.inject.spi.InjectionPoint.forMember(InjectionPoint.java:116)
   at com.google.inject.spi.InjectionPoint.<init>(InjectionPoint.java:73)
   at com.google.inject.spi.InjectionPoint$InjectableMethod.toInjectionPoint(InjectionPoint.java:459)
   at com.google.inject.spi.InjectionPoint.getInjectionPoints(InjectionPoint.java:725)
   at com.google.inject.spi.InjectionPoint.forInstanceMethodsAndFields(InjectionPoint.java:358)
   at com.google.inject.spi.InjectionPoint.forInstanceMethodsAndFields(InjectionPoint.java:377)
   at com.google.inject.internal.BindingBuilder.toInstance(BindingBuilder.java:84)
   at org.codehaus.plexus.DefaultPlexusContainer$DefaultsModule.configure(DefaultPlexusContainer.java:836)
   at com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:229)
   at com.google.inject.spi.Elements.getElements(Elements.java:103)
   at com.google.inject.spi.Elements.getElements(Elements.java:80)
   at org.sonatype.guice.bean.binders.MergedModule.configure(MergedModule.java:54)
   at com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:229)
   at com.google.inject.spi.Elements.getElements(Elements.java:103)
   at com.google.inject.internal.InjectorShell$Builder.build(InjectorShell.java:136)
   at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:104)
   at com.google.inject.Guice.createInjector(Guice.java:94)
   at com.google.inject.Guice.createInjector(Guice.java:71)
   at com.google.inject.Guice.createInjector(Guice.java:61)
   at org.codehaus.plexus.DefaultPlexusContainer.addPlexusInjector(DefaultPlexusContainer.java:470)
   at org.codehaus.plexus.DefaultPlexusContainer.<init>(DefaultPlexusContainer.java:196)
   at org.codehaus.plexus.DefaultPlexusContainer.<init>(DefaultPlexusContainer.java:160)
   at org.apache.maven.cli.MavenCli.container(MavenCli.java:375)
   at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:191)
   at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
   at java.lang.reflect.Method.invoke(libgcj.so.14)
   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)
Error executing Maven.
null

I am using Maven 3.0.5. 我正在使用Maven 3.0.5。 Anybody has an idea why this is happening? 有人知道为什么会这样吗?

This may be because your JAVA_HOME points to a JRE or an outdated JDK version. 这可能是因为您的JAVA_HOME指向JRE或过时的JDK版本。 For me, this was JAVA_HOME pointing to a JDK 1.5.0 installation. 对我而言,这是指向JDK 1.5.0安装的JAVA_HOME。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM