java.lang.NoClassDefFoundError: com/sun/mirror/apt/AnnotationProcessorFactory

Jenkins JIRA | Krzysztof Malinowski | 5 years ago
  1. 0

    When trying to compile the following error occurs: [hpi:apt-compile] Aug 25, 2011 5:26:01 PM org.sonatype.guice.bean.reflect.NamedClass WARNING: Error injecting: org.jvnet.hudson.maven.plugins.hpi.AptCompiler 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.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:46) at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1021) at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40) at com.google.inject.Scopes$1$1.get(Scopes.java:59) 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 org.sonatype.guice.bean.locators.LazyBeanEntry.getValue(LazyBeanEntry.java:79) at org.sonatype.guice.plexus.locators.LazyPlexusBean.getValue(LazyPlexusBean.java:53) at java.util.AbstractMap.get(AbstractMap.java:182) at org.codehaus.plexus.compiler.manager.DefaultCompilerManager.getCompiler(DefaultCompilerManager.java:54) at org.jvnet.hudson.maven.plugins.hpi.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:260) at org.jvnet.hudson.maven.plugins.hpi.CompilerMojo.execute(CompilerMojo.java:111) at org.jvnet.hudson.maven.plugins.hpi.AptMojo.execute(AptMojo.java:24) 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: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) ... 53 more

    Jenkins JIRA | 5 years ago | Krzysztof Malinowski
    java.lang.NoClassDefFoundError: com/sun/mirror/apt/AnnotationProcessorFactory
  2. 0

    When trying to compile the following error occurs: [hpi:apt-compile] Aug 25, 2011 5:26:01 PM org.sonatype.guice.bean.reflect.NamedClass WARNING: Error injecting: org.jvnet.hudson.maven.plugins.hpi.AptCompiler 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.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:46) at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1021) at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40) at com.google.inject.Scopes$1$1.get(Scopes.java:59) 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 org.sonatype.guice.bean.locators.LazyBeanEntry.getValue(LazyBeanEntry.java:79) at org.sonatype.guice.plexus.locators.LazyPlexusBean.getValue(LazyPlexusBean.java:53) at java.util.AbstractMap.get(AbstractMap.java:182) at org.codehaus.plexus.compiler.manager.DefaultCompilerManager.getCompiler(DefaultCompilerManager.java:54) at org.jvnet.hudson.maven.plugins.hpi.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:260) at org.jvnet.hudson.maven.plugins.hpi.CompilerMojo.execute(CompilerMojo.java:111) at org.jvnet.hudson.maven.plugins.hpi.AptMojo.execute(AptMojo.java:24) 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: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) ... 53 more

    Jenkins JIRA | 5 years ago | Krzysztof Malinowski
    java.lang.NoClassDefFoundError: com/sun/mirror/apt/AnnotationProcessorFactory
  3. Speed up your debug routine!

    Automated exception search integrated into your IDE

  4. 0

    Could not compile custom Hudson plugin in Java 1.7

    Eclipse Bugzilla | 4 years ago | michal.rejda
    java.lang.NoClassDefFoundError: com/sun/mirror/apt/AnnotationProcessorFactory
  5. 0

    Re: [tycho-user] ClassNotFoundException: org.eclipse.osgi.service.plugin

    eclipse.org | 1 year ago
    java.lang.NoClassDefFoundError: org/eclipse/osgi/service/pluginconversion/PluginConversionException
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.lang.ClassNotFoundException

    com.sun.mirror.apt.AnnotationProcessorFactory

    at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass()
  2. Plexus
    ClassRealm.loadClass
    1. org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:50)
    2. org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:244)
    3. org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:230)
    3 frames
  3. Java RT
    Class.getDeclaredConstructors
    1. java.lang.Class.getDeclaredConstructors0(Native Method)
    2. java.lang.Class.privateGetDeclaredConstructors(Class.java:2404)
    3. java.lang.Class.getDeclaredConstructors(Class.java:1853)
    3 frames
  4. Google Guice - Core Library
    InjectorImpl.getInstance
    1. com.google.inject.spi.InjectionPoint.forConstructorOf(InjectionPoint.java:243)
    2. com.google.inject.internal.ConstructorBindingImpl.create(ConstructorBindingImpl.java:96)
    3. com.google.inject.internal.InjectorImpl.createUninitializedBinding(InjectorImpl.java:628)
    4. com.google.inject.internal.InjectorImpl.createJustInTimeBinding(InjectorImpl.java:835)
    5. com.google.inject.internal.InjectorImpl.createJustInTimeBindingRecursive(InjectorImpl.java:769)
    6. com.google.inject.internal.InjectorImpl.getJustInTimeBinding(InjectorImpl.java:254)
    7. com.google.inject.internal.InjectorImpl.getBindingOrThrow(InjectorImpl.java:205)
    8. com.google.inject.internal.InjectorImpl.getInternalFactory(InjectorImpl.java:843)
    9. com.google.inject.internal.InjectorImpl.getProviderOrThrow(InjectorImpl.java:957)
    10. com.google.inject.internal.InjectorImpl.getProvider(InjectorImpl.java:990)
    11. com.google.inject.internal.InjectorImpl.getProvider(InjectorImpl.java:951)
    12. com.google.inject.internal.InjectorImpl.getInstance(InjectorImpl.java:1003)
    12 frames
  5. Sisu-Inject-Bean : legacy wrapper
    AbstractDeferredClass.get
    1. org.sonatype.guice.bean.reflect.AbstractDeferredClass.get(AbstractDeferredClass.java:47)
    1 frame
  6. Google Guice - Core Library
    InjectorImpl$4.get
    1. com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:40)
    2. com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:46)
    3. com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1021)
    4. com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)
    5. com.google.inject.Scopes$1$1.get(Scopes.java:59)
    6. com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:40)
    7. com.google.inject.internal.InjectorImpl$4$1.call(InjectorImpl.java:968)
    8. com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1014)
    9. com.google.inject.internal.InjectorImpl$4.get(InjectorImpl.java:964)
    9 frames
  7. Sisu-Inject-Bean : legacy wrapper
    LazyBeanEntry.getValue
    1. org.sonatype.guice.bean.locators.LazyBeanEntry.getValue(LazyBeanEntry.java:79)
    1 frame
  8. org.sonatype.guice
    LazyPlexusBean.getValue
    1. org.sonatype.guice.plexus.locators.LazyPlexusBean.getValue(LazyPlexusBean.java:53)
    1 frame
  9. Java RT
    AbstractMap.get
    1. java.util.AbstractMap.get(AbstractMap.java:182)
    1 frame
  10. Plexus Compiler Manager
    DefaultCompilerManager.getCompiler
    1. org.codehaus.plexus.compiler.manager.DefaultCompilerManager.getCompiler(DefaultCompilerManager.java:54)
    1 frame
  11. org.jvnet.hudson
    AptMojo.execute
    1. org.jvnet.hudson.maven.plugins.hpi.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:260)
    2. org.jvnet.hudson.maven.plugins.hpi.CompilerMojo.execute(CompilerMojo.java:111)
    3. org.jvnet.hudson.maven.plugins.hpi.AptMojo.execute(AptMojo.java:24)
    3 frames
  12. Maven Plugin
    DefaultBuildPluginManager.executeMojo
    1. org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
    1 frame
  13. Maven Core
    DefaultMaven.execute
    1. org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
    2. org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
    3. org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
    4. org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
    5. org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
    6. org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
    7. org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
    8. org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:319)
    9. org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
    9 frames
  14. M3 Interceptor
    MavenCli.main
    1. org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
    2. org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
    3. org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
    3 frames
  15. Java RT
    Method.invoke
    1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    4. java.lang.reflect.Method.invoke(Method.java:601)
    4 frames
  16. Plexus
    Launcher.main
    1. org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
    2. org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
    3. org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
    4. org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
    4 frames