java.lang.NoClassDefFoundError: org/apache/tools/ant/launch/AntMain

Terracotta | fs111 | 8 years ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    Messages posted by fs111

    terracotta.org | 1 year ago
    java.lang.NoClassDefFoundError: org/apache/tools/ant/launch/AntMain
  2. 0

    Re:integration testing w/ maven tc plugin -&gt catch 22

    Terracotta | 8 years ago | fs111
    java.lang.NoClassDefFoundError: org/apache/tools/ant/launch/AntMain
  3. 0

    [MNG-3586] [regression] jaxws mojo wsgen failure with maven 3.0 due to system-scope dependencies being excluded - ASF JIRA

    apache.org | 1 year ago
    org.apache.maven.lifecycle.LifecycleExecutionException: Internal error in the plugin manager executing goal 'org.codehaus.mojo:jaxws-maven-plugin:1.10:wsgen': Mojo execution failed.
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    I can build jar projects using the jaxws wsgen mojo (1.9) under maven 2.0.x but it failed under m2eclipse (0.9.3) when using maven 2.1 embedded (it works if I switch m2eclipse to use the maven 2.0.9 on my system). I tried with various JVM (Sun and IBM 5 and 6) but still got the problem with maven 2.1 embedded (maven 2.1-620417 and 2.1-655675): error is : From file: C:\workspace\xxx-er-go\pom.xml Reason: Failed to execute wsgen java.lang.NoClassDefFoundError: com/sun/mirror/apt/AnnotationProcessorFactory at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:620) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124) at java.net.URLClassLoader.defineClass(URLClassLoader.java:260) at java.net.URLClassLoader.access$100(URLClassLoader.java:56) at java.net.URLClassLoader$1.run(URLClassLoader.java:195) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:188) at java.lang.ClassLoader.loadClass(ClassLoader.java:306) at java.lang.ClassLoader.loadClass(ClassLoader.java:251) at org.codehaus.plexus.classworlds.realm.ClassRealm.loadRealmClass(ClassRealm.java:174) at org.codehaus.plexus.classworlds.strategy.DefaultStrategy.loadClass(DefaultStrategy.java:67) at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:201) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319) at com.sun.tools.ws.WsGen.doMain(WsGen.java:69) at org.codehaus.mojo.jaxws.AbstractWsGenMojo.execute(AbstractWsGenMojo.java:91) at org.codehaus.mojo.jaxws.MainWsGenMojo.execute(MainWsGenMojo.java:14) at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:577) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:498) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmentForProject(DefaultLifecycleExecutor.java:265) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:191) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:149) at org.apache.maven.DefaultMaven.execute_aroundBody0(DefaultMaven.java:223) at org.apache.maven.DefaultMaven.execute_aroundBody1$advice(DefaultMaven.java:304) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:1) at org.apache.maven.embedder.MavenEmbedder.execute_aroundBody2(MavenEmbedder.java:903) at org.apache.maven.embedder.MavenEmbedder.execute_aroundBody3$advice(MavenEmbedder.java:304) at org.apache.maven.embedder.MavenEmbedder.execute(MavenEmbedder.java:1) at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:176) at org.apache.maven.cli.MavenCli.main(MavenCli.java:63) at org.apache.maven.cli.MavenCli.main(MavenCli.java:52) Any idea or fixes ? my pom.xml wsgen is standard : <build> <plugins> <plugin> <artifactId>maven-compiler-plugin</artifactId> <configuration> <source>1.5</source> <target>1.5</target> </configuration> <executions> <execution> <id>compile</id> <goals> <goal>compile</goal> </goals> <phase>initialize</phase> </execution> </executions> </plugin> <!-- We need JAX-WS support for Annotation processing --> <!-- NB: wsgen can handle only one SEI at a time so we define an execution by SEI --> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>jaxws-maven-plugin</artifactId> <executions> <execution> <id>go-wsgen</id> <goals> <goal>wsgen</goal> </goals> <phase>generate-sources</phase> <configuration> <resourceDestDir>${project.build.directory}/classes/com/mycorp/service/resources/wsdl</resourceDestDir> <sei>com.mycorp.service.MyService</sei> <genWsdl>true</genWsdl> <keep>false</keep> </configuration> </execution> </executions> </plugin> </plugins> </build> I attached a simple project so you could try it. From others reports, it seems the tools.jar is missing in embedded mode.

    Apache's JIRA Issue Tracker | 9 years ago | Henri Gomez
    java.lang.NoClassDefFoundError: com/sun/mirror/apt/AnnotationProcessorFactory
  6. 0

    {noformat} 2009-06-08 19:42:23 ERROR [er_start_runner] - org.mortbay.log - failed org.mortbay.jetty.webapp.WebAppContext@ad4d40{/nexus,../../../runtime/apps/nexus/webapp} java.lang.NoClassDefFoundError: junit/framework/TestCase at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:621) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124) at java.net.URLClassLoader.defineClass(URLClassLoader.java:260) at java.net.URLClassLoader.access$000(URLClassLoader.java:56) at java.net.URLClassLoader$1.run(URLClassLoader.java:195) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:188) at java.lang.ClassLoader.loadClass(ClassLoader.java:307) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) at java.lang.ClassLoader.loadClass(ClassLoader.java:252) at org.codehaus.plexus.classworlds.strategy.ForeignStrategy.loadClass(ForeignStrategy.java:35) at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:207) at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:201) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320) at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:621) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124) at java.net.URLClassLoader.defineClass(URLClassLoader.java:260) at java.net.URLClassLoader.access$000(URLClassLoader.java:56) at java.net.URLClassLoader$1.run(URLClassLoader.java:195) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:188) at java.lang.ClassLoader.loadClass(ClassLoader.java:307) at org.codehaus.plexus.classworlds.realm.ClassRealm.loadRealmClass(ClassRealm.java:174) at org.codehaus.plexus.classworlds.strategy.DefaultStrategy.loadClass(DefaultStrategy.java:67) at org.codehaus.plexus.classworlds.strategy.ForeignStrategy.loadClass(ForeignStrategy.java:39) at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:207) at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:201) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320) at org.sonatype.nexus.configuration.SimpleApplicationConfiguration.getWorkingDirectory(SimpleApplicationConfiguration.java:62) at org.sonatype.nexus.proxy.repository.AbstractRepositoryConfigurator.doApplyConfiguration(AbstractRepositoryConfigurator.java:128) at org.sonatype.nexus.proxy.repository.AbstractProxyRepositoryConfigurator.doApplyConfiguration(AbstractProxyRepositoryConfigurator.java:26) at org.sonatype.nexus.proxy.maven.AbstractMavenRepositoryConfigurator.doApplyConfiguration(AbstractMavenRepositoryConfigurator.java:37) at org.sonatype.nexus.proxy.repository.AbstractRepositoryConfigurator.applyConfiguration(AbstractRepositoryConfigurator.java:63) at org.sonatype.nexus.configuration.AbstractConfigurable.doConfigure(AbstractConfigurable.java:95) at org.sonatype.nexus.configuration.AbstractConfigurable.configure(AbstractConfigurable.java:63) at org.sonatype.nexus.configuration.application.runtime.DefaultApplicationRuntimeConfigurationBuilder.createRepositoryFromModel(DefaultApplicationRuntimeConfigurationBuilder.java:46) at org.sonatype.nexus.configuration.application.DefaultNexusConfiguration.createRepositoryFromModel(DefaultNexusConfiguration.java:328) at org.sonatype.nexus.configuration.application.DefaultNexusConfiguration.createRepositories(DefaultNexusConfiguration.java:431) at org.sonatype.nexus.configuration.application.DefaultNexusConfiguration.createInternals(DefaultNexusConfiguration.java:411) at org.sonatype.nexus.DefaultNexus.startService(DefaultNexus.java:896) at org.sonatype.nexus.DefaultNexus.start(DefaultNexus.java:860) at org.codehaus.plexus.personality.plexus.lifecycle.phase.StartPhase.execute(StartPhase.java:33) at org.codehaus.plexus.lifecycle.AbstractLifecycleHandler.start(AbstractLifecycleHandler.java:97) at org.codehaus.plexus.component.manager.AbstractComponentManager.start(AbstractComponentManager.java:167) at org.codehaus.plexus.component.builder.XBeanComponentBuilder.startComponentLifecycle(XBeanComponentBuilder.java:255) at org.codehaus.plexus.component.builder.XBeanComponentBuilder.build(XBeanComponentBuilder.java:129) at org.codehaus.plexus.component.manager.AbstractComponentManager.createComponentInstance(AbstractComponentManager.java:181) at org.codehaus.plexus.component.manager.SingletonComponentManager.getComponent(SingletonComponentManager.java:67) at org.codehaus.plexus.DefaultComponentRegistry.getComponent(DefaultComponentRegistry.java:329) at org.codehaus.plexus.DefaultComponentRegistry.lookup(DefaultComponentRegistry.java:165) at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:377) at org.sonatype.nexus.web.NexusBooterListener.contextInitialized(NexusBooterListener.java:35) at org.mortbay.jetty.handler.ContextHandler.startContext(ContextHandler.java:548) at org.mortbay.jetty.servlet.Context.startContext(Context.java:136) at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1234) at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:517) at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:460) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50) at org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:152) at org.mortbay.jetty.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:156) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50) at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130) at org.mortbay.jetty.Server.doStart(Server.java:222) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50) at org.sonatype.plexus.jetty.DefaultServletContainer.start(DefaultServletContainer.java:309) at org.codehaus.plexus.personality.plexus.lifecycle.phase.StartPhase.execute(StartPhase.java:33) at org.codehaus.plexus.lifecycle.AbstractLifecycleHandler.start(AbstractLifecycleHandler.java:97) at org.codehaus.plexus.component.manager.AbstractComponentManager.start(AbstractComponentManager.java:167) at org.codehaus.plexus.component.builder.XBeanComponentBuilder.startComponentLifecycle(XBeanComponentBuilder.java:255) at org.codehaus.plexus.component.builder.XBeanComponentBuilder.build(XBeanComponentBuilder.java:129) at org.codehaus.plexus.component.manager.AbstractComponentManager.createComponentInstance(AbstractComponentManager.java:181) at org.codehaus.plexus.component.manager.SingletonComponentManager.getComponent(SingletonComponentManager.java:67) at org.codehaus.plexus.DefaultComponentRegistry.getComponent(DefaultComponentRegistry.java:329) at org.codehaus.plexus.DefaultComponentRegistry.lookup(DefaultComponentRegistry.java:165) at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:372) at org.codehaus.plexus.DefaultPlexusContainer.initialize(DefaultPlexusContainer.java:585) at org.codehaus.plexus.DefaultPlexusContainer.construct(DefaultPlexusContainer.java:275) at org.codehaus.plexus.DefaultPlexusContainer.<init>(DefaultPlexusContainer.java:166) at org.sonatype.appbooter.PlexusAppBooter.startContainer(PlexusAppBooter.java:315) at org.sonatype.appbooter.jsw.PlexusAppBooterJSWListener.start(PlexusAppBooterJSWListener.java:68) at org.tanukisoftware.wrapper.WrapperManager$12.run(WrapperManager.java:2788) {noformat}

    Sonatype JIRA | 8 years ago | Juven Xu
    java.lang.NoClassDefFoundError: junit/framework/TestCase

  1. rsprangemeijer 1 times, last 3 weeks ago
  2. andyglick 2 times, last 1 month ago
  3. bamboomy 1 times, last 1 month ago
  4. Handemelindo 4 times, last 3 months ago
  5. Hronom 1 times, last 3 months ago
9 more registered users
86 unregistered visitors
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.NoClassDefFoundError

    org/apache/tools/ant/launch/AntMain

    at java.lang.ClassLoader.defineClass1()
  2. Java RT
    ClassLoader.loadClass
    1. java.lang.ClassLoader.defineClass1(Native Method)
    2. java.lang.ClassLoader.defineClass(ClassLoader.java:620)
    3. java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
    4. java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
    5. java.net.URLClassLoader.access$000(URLClassLoader.java:56)
    6. java.net.URLClassLoader$1.run(URLClassLoader.java:195)
    7. java.security.AccessController.doPrivileged(Native Method)
    8. java.net.URLClassLoader.findClass(URLClassLoader.java:188)
    9. java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    10. java.lang.ClassLoader.loadClass(ClassLoader.java:251)
    10 frames
  3. Plexus
    ClassRealm.loadClass
    1. org.codehaus.plexus.classworlds.realm.ClassRealm.loadRealmClass(ClassRealm.java:174)
    2. org.codehaus.plexus.classworlds.strategy.DefaultStrategy.loadClass(DefaultStrategy.java:67)
    3. org.codehaus.plexus.classworlds.strategy.ForeignStrategy.loadClass(ForeignStrategy.java:39)
    4. org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:201)
    4 frames
  4. Java RT
    ClassLoader.loadClassInternal
    1. java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
    1 frame
  5. Ant
    Project.init
    1. org.apache.tools.ant.Project.initProperties(Project.java:308)
    2. org.apache.tools.ant.Project.init(Project.java:295)
    2 frames
  6. Groovy
    AntBuilder.<init>
    1. groovy.util.AntBuilder.createProject(AntBuilder.java:134)
    2. groovy.util.AntBuilder.<init>(AntBuilder.java:63)
    2 frames
  7. org.codehaus.groovy
    MojoSupport.execute
    1. org.codehaus.groovy.maven.runtime.v1_5.ScriptExecutorFeature$ScriptExecutorImpl.createAntBuilder(ScriptExecutorFeature.java:84)
    2. org.codehaus.groovy.maven.runtime.v1_5.ScriptExecutorFeature$ScriptExecutorImpl.createMagicAttribute(ScriptExecutorFeature.java:101)
    3. org.codehaus.groovy.maven.runtime.support.ScriptExecutorSupport.applyContext(ScriptExecutorSupport.java:108)
    4. org.codehaus.groovy.maven.runtime.support.ScriptExecutorSupport.execute(ScriptExecutorSupport.java:69)
    5. org.codehaus.groovy.maven.plugin.execute.ExecuteMojo.process(ExecuteMojo.java:182)
    6. org.codehaus.groovy.maven.plugin.ComponentMojoSupport.doExecute(ComponentMojoSupport.java:60)
    7. org.codehaus.groovy.maven.plugin.MojoSupport.execute(MojoSupport.java:69)
    7 frames
  8. Maven Plugin
    DefaultPluginManager.executeMojo
    1. org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:453)
    1 frame
  9. Maven Core
    DefaultMaven.execute
    1. org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:559)
    2. org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:500)
    3. org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:479)
    4. org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:331)
    5. org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:292)
    6. org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:142)
    7. org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:336)
    8. org.apache.maven.DefaultMaven.execute(DefaultMaven.java:129)
    8 frames
  10. M3 Interceptor
    MavenCli.main
    1. org.apache.maven.cli.MavenCli.main(MavenCli.java:301)
    1 frame
  11. Java RT
    Method.invoke
    1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    4. java.lang.reflect.Method.invoke(Method.java:597)
    4 frames
  12. Plexus
    Launcher.main
    1. org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
    2. org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
    3. org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
    4. org.codehaus.classworlds.Launcher.main(Launcher.java:375)
    4 frames