Details

      Description

      [INFO] --- hk2-maven-plugin:1.6.17:hk2-compile (default-hk2-compile) @ scattered-archive-api ---
      Sep 21, 2011 12:27:15 PM org.sonatype.guice.bean.reflect.LoadedClass
      WARNING: Error injecting: com.sun.enterprise.module.maven.HK2CompileMojo
      java.lang.NoClassDefFoundError: com/sun/mirror/apt/AnnotationProcessorFactory
      	at java.lang.Class.getDeclaredConstructors0(Native Method)
      	at java.lang.Class.privateGetDeclaredConstructors(Class.java:2404)
      	at java.lang.Class.getDeclaredConstructors(Class.java:1853)
      	at com.google.inject.spi.InjectionPoint.forConstructorOf(InjectionPoint.java:243)
      	at com.google.inject.internal.ConstructorBindingImpl.create(ConstructorBindingImpl.java:96)
      	at com.google.inject.internal.InjectorImpl.createUninitializedBinding(InjectorImpl.java:628)
      	at com.google.inject.internal.InjectorImpl.createJustInTimeBinding(InjectorImpl.java:835)
      	at com.google.inject.internal.InjectorImpl.createJustInTimeBindingRecursive(InjectorImpl.java:769)
      	at com.google.inject.internal.InjectorImpl.getJustInTimeBinding(InjectorImpl.java:254)
      	at com.google.inject.internal.InjectorImpl.getBindingOrThrow(InjectorImpl.java:205)
      	at com.google.inject.internal.InjectorImpl.getInternalFactory(InjectorImpl.java:843)
      	at com.google.inject.internal.InjectorImpl.getProviderOrThrow(InjectorImpl.java:957)
      	at com.google.inject.internal.InjectorImpl.getProvider(InjectorImpl.java:990)
      	at com.google.inject.internal.InjectorImpl.getProvider(InjectorImpl.java:951)
      	at com.google.inject.internal.InjectorImpl.getInstance(InjectorImpl.java:1003)
      	at org.sonatype.guice.bean.reflect.AbstractDeferredClass.get(AbstractDeferredClass.java:47)
      	at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:40)
      	at com.google.inject.internal.InjectorImpl$4$1.call(InjectorImpl.java:968)
      	at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1014)
      	at com.google.inject.internal.InjectorImpl$4.get(InjectorImpl.java:964)
      	at com.google.inject.Scopes$1$1.get(Scopes.java:59)
      	at org.sonatype.guice.bean.locators.LazyBeanEntry.getValue(LazyBeanEntry.java:79)
      	at org.sonatype.guice.plexus.locators.LazyPlexusBean.getValue(LazyPlexusBean.java:53)
      	at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:243)
      	at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:235)
      	at org.apache.maven.plugin.internal.DefaultMavenPluginManager.getConfiguredMojo(DefaultMavenPluginManager.java:455)
      	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:92)
      	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:319)
      	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:57)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:601)
      	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)
      Caused by: java.lang.ClassNotFoundException: com.sun.mirror.apt.AnnotationProcessorFactory
      	at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:50)
      	at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:244)
      	at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:230)
      	... 47 more
      ....
      [ERROR] Failed to execute goal org.glassfish.hk2:hk2-maven-plugin:1.6.17:hk2-compile (default-hk2-compile) on project scattered-archive-api: Execution default-hk2-compile of goal org.glassfish.hk2:hk2-maven-plugin:1.6.17:hk2-compile failed: Unable to load the mojo 'hk2-compile' in the plugin 'org.glassfish.hk2:hk2-maven-plugin:1.6.17'. A required class is missing: com/sun/mirror/apt/AnnotationProcessorFactory
      

      Similar to STAPLER-14. Workaround is to build using JDK 6.

        Issue Links

          Activity

          jglick created issue -
          jglick made changes -
          Field Original Value New Value
          Link This issue is related to STAPLER-14 [ STAPLER-14 ]
          Hide
          Romain Grécourt added a comment -

          There is an issue for JDK7 and GlassFish reported here

          The fix was included in version 1.6.18 of HK2, I see in the snippet you provided that the version 1.6.17 is used.
          The version used currently in the trunk is 1.6.19, have you updated your workspace?

          Show
          Romain Grécourt added a comment - There is an issue for JDK7 and GlassFish reported here The fix was included in version 1.6.18 of HK2, I see in the snippet you provided that the version 1.6.17 is used. The version used currently in the trunk is 1.6.19, have you updated your workspace?
          Hide
          jglick added a comment -

          OK, close as duplicate then. (I do not have permissions to do so.) Build seems to work using current trunk (49992) with JDK 7, Maven 3.0.3, -DskipTests.

          Show
          jglick added a comment - OK, close as duplicate then. (I do not have permissions to do so.) Build seems to work using current trunk (49992) with JDK 7, Maven 3.0.3, -DskipTests.
          Hide
          jglick added a comment -

          Or at least up to a seemingly unrelated error:

          nucleus/core/kernel/src/main/java/com/sun/enterprise/v3/server/AppServerStartup.java:63: error: cannot find symbol
          import org.glassfish.hk2.Bindings;
                                  ^
          
          Show
          jglick added a comment - Or at least up to a seemingly unrelated error: nucleus/core/kernel/src/main/java/com/sun/enterprise/v3/server/AppServerStartup.java:63: error: cannot find symbol import org.glassfish.hk2.Bindings; ^
          Hide
          scatari added a comment -

          3.1.2 cannot be compiled with JDK 7 for backward compatibility.

          Show
          scatari added a comment - 3.1.2 cannot be compiled with JDK 7 for backward compatibility.
          scatari made changes -
          Tags 3_1_2-exclude
          Romain Grécourt made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Assignee janey [ janey ]
          Fix Version/s 4.0_b36 [ 15625 ]
          Resolution Fixed [ 1 ]

            People

            • Assignee:
              Unassigned
              Reporter:
              jglick
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: