java.lang.NoClassDefFoundError

org/apache/tools/ant/launch/AntMain

Samebug tips1

Look if your classpath is correct, and check if the versions of your libraries match the version you described in your pom.xml

Don't give up yet. Our experts can help. Paste your full stack trace to get a solution.

Solutions on the web19587

  • via Google Groups by Mark, 2 weeks ago
    > org/apache/tools/ant/launch/AntMain
  • via beehive-user by Eddie O'Neil, 3 weeks ago
    org/apache/tools/ant/launch/AntMain
  • via Stack Overflow by Deepak_Sharma
    , 1 year ago
    org/apache/tools/ant/launch/AntMain
  • Stack trace

    • java.lang.NoClassDefFoundError: org/apache/tools/ant/launch/AntMain 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$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: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.strategy.ForeignStrategy.loadClass(ForeignStrategy.java:39) at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:201) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319) at org.apache.tools.ant.Project.initProperties(Project.java:308) at org.apache.tools.ant.Project.init(Project.java:295) at groovy.util.AntBuilder.createProject(AntBuilder.java:134) at groovy.util.AntBuilder.<init>(AntBuilder.java:63) at org.codehaus.groovy.maven.runtime.v1_5.ScriptExecutorFeature$ScriptExecutorImpl.createAntBuilder(ScriptExecutorFeature.java:84) at org.codehaus.groovy.maven.runtime.v1_5.ScriptExecutorFeature$ScriptExecutorImpl.createMagicAttribute(ScriptExecutorFeature.java:101) at org.codehaus.groovy.maven.runtime.support.ScriptExecutorSupport.applyContext(ScriptExecutorSupport.java:108) at org.codehaus.groovy.maven.runtime.support.ScriptExecutorSupport.execute(ScriptExecutorSupport.java:69) at org.codehaus.groovy.maven.plugin.execute.ExecuteMojo.process(ExecuteMojo.java:182) at org.codehaus.groovy.maven.plugin.ComponentMojoSupport.doExecute(ComponentMojoSupport.java:60) at org.codehaus.groovy.maven.plugin.MojoSupport.execute(MojoSupport.java:69) at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:453) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:559) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:500) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:479) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:331) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:292) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:142) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:336) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:129) at org.apache.maven.cli.MavenCli.main(MavenCli.java:301) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315) at org.codehaus.classworlds.Launcher.launch(Launcher.java:255) at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430) at org.codehaus.classworlds.Launcher.main(Launcher.java:375)

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    Once, 4 days ago
    Once, 1 week ago
    Once, 1 month ago
    Unknown user
    Once, 4 months ago
    Unknown user
    Once, 9 months ago
    169 more bugmates