当我尝试在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
我正在使用Maven 3.0.5。有人知道为什么会这样吗?
答案 0 :(得分:0)
这可能是因为您的JAVA_HOME指向JRE或过时的JDK版本。对我来说,这是指向JDK 1.5.0安装的JAVA_HOME。