2
votes

I upgraded to jetty 9 and getting the following error when I try to run the project.

[WARNING] Error injecting: org.eclipse.jetty.maven.plugin.JettyRunMojo
java.lang.TypeNotPresentException: Type org.eclipse.jetty.maven.plugin.JettyRunMojo not present
        at org.eclipse.sisu.space.URLClassSpace.loadClass(URLClassSpace.java:115)
        at org.eclipse.sisu.space.NamedClass.load(NamedClass.java:46)
        at org.eclipse.sisu.space.AbstractDeferredClass.get(AbstractDeferredClass.java:48)
        at com.google.inject.internal.ProviderInternalFactory.provision(ProviderInternalFactory.java:86)
        at com.google.inject.internal.InternalFactoryToInitializableAdapter.provision(InternalFactoryToInitializableAdapter.java:55)
        at com.google.inject.internal.ProviderInternalFactory$1.call(ProviderInternalFactory.java:70)
        at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision(ProvisionListenerStackCallback.java:100)
        at org.eclipse.sisu.plexus.PlexusLifecycleManager.onProvision(PlexusLifecycleManager.java:133)
        at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision(ProvisionListenerStackCallback.java:109)
        at com.google.inject.internal.ProvisionListenerStackCallback.provision(ProvisionListenerStackCallback.java:55)
        at com.google.inject.internal.ProviderInternalFactory.circularGet(ProviderInternalFactory.java:68)
        at com.google.inject.internal.InternalFactoryToInitializableAdapter.get(InternalFactoryToInitializableAdapter.java:47)
        at com.google.inject.internal.InjectorImpl$2$1.call(InjectorImpl.java:997)
        at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1047)
        at com.google.inject.internal.InjectorImpl$2.get(InjectorImpl.java:993)
        at com.google.inject.Scopes$1$1.get(Scopes.java:59)
        at org.eclipse.sisu.inject.LazyBeanEntry.getValue(LazyBeanEntry.java:82)
        at org.eclipse.sisu.plexus.LazyPlexusBean.getValue(LazyPlexusBean.java:51)
        at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:260)
        at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:252)
        at org.apache.maven.plugin.internal.DefaultMavenPluginManager.getConfiguredMojo(DefaultMavenPluginManager.java:459)
        at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:97)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
        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:317)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:152)
        at org.apache.maven.cli.MavenCli.execute(MavenCli.java:555)
        at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:214)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:158)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
        at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
        at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: java.lang.UnsupportedClassVersionError: org/eclipse/jetty/maven/plugin/JettyRunMojo : Unsupported major.minor version 52.0
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
        at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
        at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
        at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
        at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClassFromSelf(ClassRealm.java:389)
        at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:42)
        at org.codehaus.plexus.classworlds.realm.ClassRealm.unsynchronizedLoadClass(ClassRealm.java:259)
        at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:235)
        at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:227)
        at org.eclipse.sisu.space.URLClassSpace.loadClass(URLClassSpace.java:107)
        ... 41 more
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1:07.726s
[INFO] Finished at: Thu Sep 10 16:33:54 EDT 2015
[INFO] Final Memory: 11M/27M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.eclipse.jetty:jetty-maven-plugin:9.3.2.v20150730:run (default-cli) on project WOWUserInterface: Execution default-cli of goal org.eclipse.jetty:jetty-maven-plugin:9.3.2.v20150730:run failed: Unable to load the mojo 'run' in the plugin 'org.eclipse.jetty:jetty-maven-plugin:9.3.2.v20150730' due to an API incompatibility: org.codehaus.plexus.component.repository.exception.ComponentLookupException: org/eclipse/jetty/maven/plugin/JettyRunMojo : Unsupported major.minor version 52.0
[ERROR] -----------------------------------------------------
[ERROR] realm =    plugin>org.eclipse.jetty:jetty-maven-plugin:9.3.2.v20150730
[ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
[ERROR] urls[0] = file:/C:/Users/Anu/.m2/repository/org/eclipse/jetty/jetty-maven-plugin/9.3.2.v20150730/jetty-maven-plugin-9.3.2.v20150730.jar
[ERROR] urls[1] = file:/C:/Users/Anu/.m2/repository/org/sonatype/sisu/sisu-inject-bean/2.1.1/sisu-inject-bean-2.1.1.jar
[ERROR] urls[2] = file:/C:/Users/Anu/.m2/repository/org/sonatype/sisu/sisu-guice/2.9.4/sisu-guice-2.9.4-no_aop.jar
[ERROR] urls[3] = file:/C:/Users/Anu/.m2/repository/org/codehaus/plexus/plexus-utils/2.0.6/plexus-utils-2.0.6.jar
[ERROR] urls[4] = file:/C:/Users/Anu/.m2/repository/org/sonatype/aether/aether-util/1.11/aether-util-1.11.jar
[ERROR] urls[5] = file:/C:/Users/Anu/.m2/repository/org/codehaus/plexus/plexus-interpolation/1.14/plexus-interpolation-1.14.jar
[ERROR] urls[6] = file:/C:/Users/Anu/.m2/repository/org/codehaus/plexus/plexus-component-annotations/1.5.5/plexus-component-annotations-1.5.5.jar
[ERROR] urls[7] = file:/C:/Users/Anu/.m2/repository/org/sonatype/plexus/plexus-sec-dispatcher/1.3/plexus-sec-dispatcher-1.3.jar
[ERROR] urls[8] = file:/C:/Users/Anu/.m2/repository/org/sonatype/plexus/plexus-cipher/1.4/plexus-cipher-1.4.jar
[ERROR] urls[9] = file:/C:/Users/Anu/.m2/repository/org/apache/maven/plugin-tools/maven-plugin-tools-api/3.4/maven-plugin-tools-api-3.4.jar
[ERROR] urls[10] = file:/C:/Users/Anu/.m2/repository/backport-util-concurrent/backport-util-concurrent/3.1/backport-util-concurrent-3.1.jar
[ERROR] urls[11] = file:/C:/Users/Anu/.m2/repository/org/eclipse/jetty/jetty-util/9.3.2.v20150730/jetty-util-9.3.2.v20150730.jar
[ERROR] urls[12] = file:/C:/Users/Anu/.m2/repository/org/eclipse/jetty/jetty-webapp/9.3.2.v20150730/jetty-webapp-9.3.2.v20150730.jar
[ERROR] urls[13] = file:/C:/Users/Anu/.m2/repository/org/eclipse/jetty/jetty-xml/9.3.2.v20150730/jetty-xml-9.3.2.v20150730.jar
[ERROR] urls[14] = file:/C:/Users/Anu/.m2/repository/org/eclipse/jetty/jetty-servlet/9.3.2.v20150730/jetty-servlet-9.3.2.v20150730.jar
[ERROR] urls[15] = file:/C:/Users/Anu/.m2/repository/org/eclipse/jetty/jetty-quickstart/9.3.2.v20150730/jetty-quickstart-9.3.2.v20150730.jar
[ERROR] urls[16] = file:/C:/Users/Anu/.m2/repository/org/eclipse/jetty/jetty-jaas/9.3.2.v20150730/jetty-jaas-9.3.2.v20150730.jar
[ERROR] urls[17] = file:/C:/Users/Anu/.m2/repository/org/eclipse/jetty/jetty-security/9.3.2.v20150730/jetty-security-9.3.2.v20150730.jar
[ERROR] urls[18] = file:/C:/Users/Anu/.m2/repository/org/eclipse/jetty/jetty-plus/9.3.2.v20150730/jetty-plus-9.3.2.v20150730.jar
[ERROR] urls[19] = file:/C:/Users/Anu/.m2/repository/org/eclipse/jetty/jetty-jndi/9.3.2.v20150730/jetty-jndi-9.3.2.v20150730.jar
[ERROR] urls[20] = file:/C:/Users/Anu/.m2/repository/org/eclipse/jetty/jetty-server/9.3.2.v20150730/jetty-server-9.3.2.v20150730.jar
[ERROR] urls[21] = file:/C:/Users/Anu/.m2/repository/javax/servlet/javax.servlet-api/3.1.0/javax.servlet-api-3.1.0.jar
[ERROR] urls[22] = file:/C:/Users/Anu/.m2/repository/org/eclipse/jetty/jetty-http/9.3.2.v20150730/jetty-http-9.3.2.v20150730.jar
[ERROR] urls[23] = file:/C:/Users/Anu/.m2/repository/org/eclipse/jetty/jetty-io/9.3.2.v20150730/jetty-io-9.3.2.v20150730.jar
[ERROR] urls[24] = file:/C:/Users/Anu/.m2/repository/org/eclipse/jetty/jetty-jmx/9.3.2.v20150730/jetty-jmx-9.3.2.v20150730.jar
[ERROR] urls[25] = file:/C:/Users/Anu/.m2/repository/org/eclipse/jetty/jetty-annotations/9.3.2.v20150730/jetty-annotations-9.3.2.v20150730.jar
[ERROR] urls[26] = file:/C:/Users/Anu/.m2/repository/javax/annotation/javax.annotation-api/1.2/javax.annotation-api-1.2.jar
[ERROR] urls[27] = file:/C:/Users/Anu/.m2/repository/org/ow2/asm/asm/5.0.1/asm-5.0.1.jar
[ERROR] urls[28] = file:/C:/Users/Anu/.m2/repository/org/ow2/asm/asm-commons/5.0.1/asm-commons-5.0.1.jar
[ERROR] urls[29] = file:/C:/Users/Anu/.m2/repository/org/ow2/asm/asm-tree/5.0.1/asm-tree-5.0.1.jar
[ERROR] urls[30] = file:/C:/Users/Anu/.m2/repository/org/eclipse/jetty/websocket/javax-websocket-server-impl/9.3.2.v20150730/javax-websocket-server-impl-9.3.2.v20150730.jar
[ERROR] urls[31] = file:/C:/Users/Anu/.m2/repository/org/eclipse/jetty/websocket/javax-websocket-client-impl/9.3.2.v20150730/javax-websocket-client-impl-9.3.2.v20150730.jar
[ERROR] urls[32] = file:/C:/Users/Anu/.m2/repository/javax/websocket/javax.websocket-api/1.0/javax.websocket-api-1.0.jar
[ERROR] urls[33] = file:/C:/Users/Anu/.m2/repository/org/eclipse/jetty/websocket/websocket-server/9.3.2.v20150730/websocket-server-9.3.2.v20150730.jar
[ERROR] urls[34] = file:/C:/Users/Anu/.m2/repository/org/eclipse/jetty/websocket/websocket-common/9.3.2.v20150730/websocket-common-9.3.2.v20150730.jar
[ERROR] urls[35] = file:/C:/Users/Anu/.m2/repository/org/eclipse/jetty/websocket/websocket-api/9.3.2.v20150730/websocket-api-9.3.2.v20150730.jar
[ERROR] urls[36] = file:/C:/Users/Anu/.m2/repository/org/eclipse/jetty/websocket/websocket-client/9.3.2.v20150730/websocket-client-9.3.2.v20150730.jar
[ERROR] urls[37] = file:/C:/Users/Anu/.m2/repository/org/eclipse/jetty/websocket/websocket-servlet/9.3.2.v20150730/websocket-servlet-9.3.2.v20150730.jar
[ERROR] urls[38] = file:/C:/Users/Anu/.m2/repository/org/eclipse/jetty/apache-jsp/9.3.2.v20150730/apache-jsp-9.3.2.v20150730.jar
[ERROR] urls[39] = file:/C:/Users/Anu/.m2/repository/org/eclipse/jetty/toolchain/jetty-schemas/3.1.M0/jetty-schemas-3.1.M0.jar
[ERROR] urls[40] = file:/C:/Users/Anu/.m2/repository/org/mortbay/jasper/apache-jsp/8.0.23.M1/apache-jsp-8.0.23.M1.jar
[ERROR] urls[41] = file:/C:/Users/Anu/.m2/repository/org/mortbay/jasper/apache-el/8.0.23.M1/apache-el-8.0.23.M1.jar
[ERROR] urls[42] = file:/C:/Users/Anu/.m2/repository/org/eclipse/jetty/orbit/org.eclipse.jdt.core/3.8.2.v20130121/org.eclipse.jdt.core-3.8.2.v20130121.jar
[ERROR] urls[43] = file:/C:/Users/Anu/.m2/repository/org/eclipse/jetty/apache-jstl/9.3.2.v20150730/apache-jstl-9.3.2.v20150730.jar
[ERROR] urls[44] = file:/C:/Users/Anu/.m2/repository/org/apache/taglibs/taglibs-standard-spec/1.2.1/taglibs-standard-spec-1.2.1.jar
[ERROR] urls[45] = file:/C:/Users/Anu/.m2/repository/org/apache/taglibs/taglibs-standard-impl/1.2.1/taglibs-standard-impl-1.2.1.jar
[ERROR] urls[46] = file:/C:/Users/Anu/.m2/repository/org/eclipse/jetty/toolchain/jetty-test-helper/3.0/jetty-test-helper-3.0.jar
[ERROR] urls[47] = file:/C:/Users/Anu/.m2/repository/junit/junit/4.12/junit-4.12.jar
[ERROR] urls[48] = file:/C:/Users/Anu/.m2/repository/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar
[ERROR] urls[49] = file:/C:/Users/Anu/.m2/repository/org/hamcrest/hamcrest-library/1.3/hamcrest-library-1.3.jar
[ERROR] urls[50] = file:/C:/Users/Anu/.m2/repository/javax/transaction/javax.transaction-api/1.2/javax.transaction-api-1.2.jar
[ERROR] Number of foreign imports: 1
[ERROR] import: Entry[import  from realm ClassRealm[maven.api, parent: null]]
[ERROR]
[ERROR] -----------------------------------------------------
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginContainerException

Can anyone tell me why this is happening?

Below is version of installed maven and jdk.

Apache Maven 3.1.1 (0728685237757ffbf44136acec0402957f723d9a; 2013-09-17 11:22:22-0400) Maven home: I:\maven\bin.. Java version: 1.7.0_51, vendor: Oracle Corporation Java home: C:\Program Files (x86)\Java\jdk1.7.0_51\jre Default locale: en_IN, platform encoding: Cp1252 OS name: "windows 8", version: "6.2", arch: "x86", family: "windows"

2

2 Answers

5
votes

Upgraded to Java 8 and it solved the problem.

2
votes

you are using jetty 9.3.2.v20150730 that required java 8. read jetty version more here