Skip to main content



      Home
Home » Language IDEs » Java Development Tools (JDT) » Error using ant from eclipse
Error using ant from eclipse [message #248422] Fri, 05 October 2007 14:05 Go to next message
Eclipse UserFriend
Originally posted by: henrik_b.freenet.de

Hi,

I hope this is the right place to get help, if not forgive me.
I'm trying to use the "Run as - Ant Build..." feature for a build.xml of my
project, but eclipse does not find any targets any more - it did last week,
so something must have changed. The build.xml itself seems to be ok,
running ant from the console works.

I'm using eclipse M20060921-0945 (Debian version: 3.2.1-6) on debian. ant
seems to be 1.6.5.

The eclipse error-log throws the following:

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
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.def ineClass(DefaultClassLoader.java:160)
at
org.eclipse.osgi.baseadaptor.loader.ClasspathManager.defineC lass(ClasspathManager.java:498)
at
org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findCla ssImpl(ClasspathManager.java:468)
at
org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLoc alClassImpl(ClasspathManager.java:427)
at
org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLoc alClass(ClasspathManager.java:410)
at
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.fin dLocalClass(DefaultClassLoader.java:188)
at
org.eclipse.osgi.framework.internal.core.BundleLoader.findLo calClass(BundleLoader.java:334)
at
org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader.java:386)
at
org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader.java:347)
at
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loa dClass(DefaultClassLoader.java:83)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
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
org.eclipse.ant.internal.ui.model.AntModelProject.init(AntMo delProject.java:105)
at
org.eclipse.ant.internal.ui.model.AntModel.initializeProject (AntModel.java:367)
at
org.eclipse.ant.internal.ui.model.AntModel.prepareForFullPar se(AntModel.java:341)
at
org.eclipse.ant.internal.ui.model.AntModel.parseDocument(Ant Model.java:305)
at org.eclipse.ant.internal.ui.model.AntModel.reconcile(AntMode l.java:263)
at
org.eclipse.ant.internal.ui.model.AntModel.getProjectNode(An tModel.java:1383)
at
org.eclipse.ant.internal.ui.model.AntModel.getProjectNode(An tModel.java:1393)
at org.eclipse.ant.internal.ui.AntUtil.getTargets(AntUtil.java: 236)
at
org.eclipse.ant.internal.ui.launchConfigurations.AntTargetsT ab$7.run(AntTargetsTab.java:493)
at
org.eclipse.jface.operation.ModalContext.runInCurrentThread( ModalContext.java:369)
at org.eclipse.jface.operation.ModalContext.run(ModalContext.ja va:313)
at
org.eclipse.jface.window.ApplicationWindow$1.run(Application Window.java:763)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator .java:67)
at
org.eclipse.jface.window.ApplicationWindow.run(ApplicationWi ndow.java:760)
at org.eclipse.ui.internal.WorkbenchWindow.run(WorkbenchWindow. java:2283)
at
org.eclipse.ui.internal.progress.ProgressManager$5.run(Progr essManager.java:1130)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator .java:67)
at
org.eclipse.ui.internal.progress.ProgressManager.runInUI(Pro gressManager.java:1126)
at
org.eclipse.ant.internal.ui.launchConfigurations.AntTargetsT ab.getTargets(AntTargetsTab.java:510)
at
org.eclipse.ant.internal.ui.launchConfigurations.AntTargetsT ab.initializeFrom(AntTargetsTab.java:619)
at
org.eclipse.debug.ui.AbstractLaunchConfigurationTabGroup.ini tializeFrom(AbstractLaunchConfigurationTabGroup.java:86)
at
org.eclipse.ant.internal.ui.launchConfigurations.AntTabGroup .initializeFrom(AntTabGroup.java:46)
at
org.eclipse.debug.internal.ui.launchConfigurations.LaunchCon figurationTabGroupViewer.displayInstanceTabs(LaunchConfigura tionTabGroupViewer.java:655)
at
org.eclipse.debug.internal.ui.launchConfigurations.LaunchCon figurationTabGroupViewer$6.run(LaunchConfigurationTabGroupVi ewer.java:548)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator .java:67)
at
org.eclipse.debug.internal.ui.launchConfigurations.LaunchCon figurationTabGroupViewer.inputChanged(LaunchConfigurationTab GroupViewer.java:565)
at
org.eclipse.debug.internal.ui.launchConfigurations.LaunchCon figurationTabGroupViewer.setInput(LaunchConfigurationTabGrou pViewer.java:529)
at
org.eclipse.debug.internal.ui.launchConfigurations.LaunchCon figurationPropertiesDialog.initializeContent(LaunchConfigura tionPropertiesDialog.java:77)
at
org.eclipse.debug.internal.ui.launchConfigurations.LaunchCon figurationsDialog.createContents(LaunchConfigurationsDialog. java:434)
at org.eclipse.jface.window.Window.create(Window.java:426)
at org.eclipse.jface.dialogs.Dialog.create(Dialog.java:1124)
at
org.eclipse.debug.internal.ui.launchConfigurations.LaunchCon figurationsDialog.create(LaunchConfigurationsDialog.java:363 )
at org.eclipse.jface.window.Window.open(Window.java:785)
at
org.eclipse.debug.internal.ui.launchConfigurations.LaunchCon figurationsDialog.open(LaunchConfigurationsDialog.java:1086)
at
org.eclipse.debug.internal.ui.launchConfigurations.LaunchCon figurationPropertiesDialog.open(LaunchConfigurationPropertie sDialog.java:180)
at
org.eclipse.debug.ui.DebugUITools.openLaunchConfigurationDia log(DebugUITools.java:456)
at
org.eclipse.ant.internal.ui.launchConfigurations.AntLaunchSh ortcut.launch(AntLaunchShortcut.java:337)
at
org.eclipse.ant.internal.ui.launchConfigurations.AntLaunchSh ortcut.launch(AntLaunchShortcut.java:232)
at
org.eclipse.ant.internal.ui.launchConfigurations.AntLaunchSh ortcut.launch(AntLaunchShortcut.java:177)
at
org.eclipse.ant.internal.ui.launchConfigurations.AntLaunchSh ortcut.launch(AntLaunchShortcut.java:85)
at
org.eclipse.debug.internal.ui.launchConfigurations.LaunchSho rtcutExtension.launch(LaunchShortcutExtension.java:369)
at
org.eclipse.debug.internal.ui.actions.LaunchShortcutAction.r un(LaunchShortcutAction.java:68)
at org.eclipse.jface.action.Action.runWithEvent(Action.java:499 )
at
org.eclipse.jface.action.ActionContributionItem.handleWidget Selection(ActionContributionItem.java:539)
at
org.eclipse.jface.action.ActionContributionItem.access$2(Act ionContributionItem.java:488)
at
org.eclipse.jface.action.ActionContributionItem$5.handleEven t(ActionContributionItem.java:400)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1085)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:3166)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2842)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:1914)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1878)
at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:419)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplicatio n.java:95)
at
org.eclipse.core.internal.runtime.PlatformActivator$1.run(Pl atformActivator.java:78)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .runApplication(EclipseAppLauncher.java:92)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .start(EclipseAppLauncher.java:68)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:400)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:177)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.eclipse.core.launcher.Main.invokeFramework(Main.java:336 )
at org.eclipse.core.launcher.Main.basicRun(Main.java:280)
at org.eclipse.core.launcher.Main.run(Main.java:977)
at org.eclipse.core.launcher.Main.main(Main.java:952)


Thanks for your help.

Henrik
Re: Error using ant from eclipse [message #248438 is a reply to message #248422] Fri, 05 October 2007 17:29 Go to previous messageGo to next message
Eclipse UserFriend
Hmmm...strange that things just went bad.
Did you happen to use the same Eclipse install for 2 different workspaces?

Within Eclipse, please open Window>Preferences>Ant>Runtime>Classpath
If things look amiss here hit Restore Defaults.

Also check the Classpath for the particular Ant launch configuration you are
failing to launch.
Open the External Tools Dialog and select the launch configuration.
Go to the Classpath tab
Check that the Ant Home entries are correct. You can try Restore defaults
again to fix things up.

HTH
Darins

"Henrik Buchholz" <henrik_b@freenet.de> wrote in message
news:1fnt66fc5k84k$.jsafx6avq7as.dlg@40tude.net...
> Hi,
>
> I hope this is the right place to get help, if not forgive me.
> I'm trying to use the "Run as - Ant Build..." feature for a build.xml of
> my
> project, but eclipse does not find any targets any more - it did last
> week,
> so something must have changed. The build.xml itself seems to be ok,
> running ant from the console works.
>
> I'm using eclipse M20060921-0945 (Debian version: 3.2.1-6) on debian. ant
> seems to be 1.6.5.
>
> The eclipse error-log throws the following:
>
> 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
> org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.def ineClass(DefaultClassLoader.java:160)
> at
> org.eclipse.osgi.baseadaptor.loader.ClasspathManager.defineC lass(ClasspathManager.java:498)
> at
> org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findCla ssImpl(ClasspathManager.java:468)
> at
> org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLoc alClassImpl(ClasspathManager.java:427)
> at
> org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLoc alClass(ClasspathManager.java:410)
> at
> org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.fin dLocalClass(DefaultClassLoader.java:188)
> at
> org.eclipse.osgi.framework.internal.core.BundleLoader.findLo calClass(BundleLoader.java:334)
> at
> org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader.java:386)
> at
> org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader.java:347)
> at
> org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loa dClass(DefaultClassLoader.java:83)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
> 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
> org.eclipse.ant.internal.ui.model.AntModelProject.init(AntMo delProject.java:105)
> at
> org.eclipse.ant.internal.ui.model.AntModel.initializeProject (AntModel.java:367)
> at
> org.eclipse.ant.internal.ui.model.AntModel.prepareForFullPar se(AntModel.java:341)
> at
> org.eclipse.ant.internal.ui.model.AntModel.parseDocument(Ant Model.java:305)
> at org.eclipse.ant.internal.ui.model.AntModel.reconcile(AntMode l.java:263)
> at
> org.eclipse.ant.internal.ui.model.AntModel.getProjectNode(An tModel.java:1383)
> at
> org.eclipse.ant.internal.ui.model.AntModel.getProjectNode(An tModel.java:1393)
> at org.eclipse.ant.internal.ui.AntUtil.getTargets(AntUtil.java: 236)
> at
> org.eclipse.ant.internal.ui.launchConfigurations.AntTargetsT ab$7.run(AntTargetsTab.java:493)
> at
> org.eclipse.jface.operation.ModalContext.runInCurrentThread( ModalContext.java:369)
> at org.eclipse.jface.operation.ModalContext.run(ModalContext.ja va:313)
> at
> org.eclipse.jface.window.ApplicationWindow$1.run(Application Window.java:763)
> at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator .java:67)
> at
> org.eclipse.jface.window.ApplicationWindow.run(ApplicationWi ndow.java:760)
> at org.eclipse.ui.internal.WorkbenchWindow.run(WorkbenchWindow. java:2283)
> at
> org.eclipse.ui.internal.progress.ProgressManager$5.run(Progr essManager.java:1130)
> at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator .java:67)
> at
> org.eclipse.ui.internal.progress.ProgressManager.runInUI(Pro gressManager.java:1126)
> at
> org.eclipse.ant.internal.ui.launchConfigurations.AntTargetsT ab.getTargets(AntTargetsTab.java:510)
> at
> org.eclipse.ant.internal.ui.launchConfigurations.AntTargetsT ab.initializeFrom(AntTargetsTab.java:619)
> at
> org.eclipse.debug.ui.AbstractLaunchConfigurationTabGroup.ini tializeFrom(AbstractLaunchConfigurationTabGroup.java:86)
> at
> org.eclipse.ant.internal.ui.launchConfigurations.AntTabGroup .initializeFrom(AntTabGroup.java:46)
> at
> org.eclipse.debug.internal.ui.launchConfigurations.LaunchCon figurationTabGroupViewer.displayInstanceTabs(LaunchConfigura tionTabGroupViewer.java:655)
> at
> org.eclipse.debug.internal.ui.launchConfigurations.LaunchCon figurationTabGroupViewer$6.run(LaunchConfigurationTabGroupVi ewer.java:548)
> at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator .java:67)
> at
> org.eclipse.debug.internal.ui.launchConfigurations.LaunchCon figurationTabGroupViewer.inputChanged(LaunchConfigurationTab GroupViewer.java:565)
> at
> org.eclipse.debug.internal.ui.launchConfigurations.LaunchCon figurationTabGroupViewer.setInput(LaunchConfigurationTabGrou pViewer.java:529)
> at
> org.eclipse.debug.internal.ui.launchConfigurations.LaunchCon figurationPropertiesDialog.initializeContent(LaunchConfigura tionPropertiesDialog.java:77)
> at
> org.eclipse.debug.internal.ui.launchConfigurations.LaunchCon figurationsDialog.createContents(LaunchConfigurationsDialog. java:434)
> at org.eclipse.jface.window.Window.create(Window.java:426)
> at org.eclipse.jface.dialogs.Dialog.create(Dialog.java:1124)
> at
> org.eclipse.debug.internal.ui.launchConfigurations.LaunchCon figurationsDialog.create(LaunchConfigurationsDialog.java:363 )
> at org.eclipse.jface.window.Window.open(Window.java:785)
> at
> org.eclipse.debug.internal.ui.launchConfigurations.LaunchCon figurationsDialog.open(LaunchConfigurationsDialog.java:1086)
> at
> org.eclipse.debug.internal.ui.launchConfigurations.LaunchCon figurationPropertiesDialog.open(LaunchConfigurationPropertie sDialog.java:180)
> at
> org.eclipse.debug.ui.DebugUITools.openLaunchConfigurationDia log(DebugUITools.java:456)
> at
> org.eclipse.ant.internal.ui.launchConfigurations.AntLaunchSh ortcut.launch(AntLaunchShortcut.java:337)
> at
> org.eclipse.ant.internal.ui.launchConfigurations.AntLaunchSh ortcut.launch(AntLaunchShortcut.java:232)
> at
> org.eclipse.ant.internal.ui.launchConfigurations.AntLaunchSh ortcut.launch(AntLaunchShortcut.java:177)
> at
> org.eclipse.ant.internal.ui.launchConfigurations.AntLaunchSh ortcut.launch(AntLaunchShortcut.java:85)
> at
> org.eclipse.debug.internal.ui.launchConfigurations.LaunchSho rtcutExtension.launch(LaunchShortcutExtension.java:369)
> at
> org.eclipse.debug.internal.ui.actions.LaunchShortcutAction.r un(LaunchShortcutAction.java:68)
> at org.eclipse.jface.action.Action.runWithEvent(Action.java:499 )
> at
> org.eclipse.jface.action.ActionContributionItem.handleWidget Selection(ActionContributionItem.java:539)
> at
> org.eclipse.jface.action.ActionContributionItem.access$2(Act ionContributionItem.java:488)
> at
> org.eclipse.jface.action.ActionContributionItem$5.handleEven t(ActionContributionItem.java:400)
> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :66)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1085)
> at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:3166)
> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2842)
> at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:1914)
> at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1878)
> at
> org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:419)
> at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
> at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplicatio n.java:95)
> at
> org.eclipse.core.internal.runtime.PlatformActivator$1.run(Pl atformActivator.java:78)
> at
> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .runApplication(EclipseAppLauncher.java:92)
> at
> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .start(EclipseAppLauncher.java:68)
> at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:400)
> at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:177)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:585)
> at org.eclipse.core.launcher.Main.invokeFramework(Main.java:336 )
> at org.eclipse.core.launcher.Main.basicRun(Main.java:280)
> at org.eclipse.core.launcher.Main.run(Main.java:977)
> at org.eclipse.core.launcher.Main.main(Main.java:952)
>
>
> Thanks for your help.
>
> Henrik
Re: Error using ant from eclipse [message #248443 is a reply to message #248438] Sat, 06 October 2007 05:08 Go to previous message
Eclipse UserFriend
Originally posted by: henrik_b.freenet.de

Am Fri, 5 Oct 2007 14:29:40 -0700 schrieb Darin Swanson:

thanks for your answer. but didn't help...

> Hmmm...strange that things just went bad.
> Did you happen to use the same Eclipse install for 2 different workspaces?

No, I did not change anything about my workspace. Could be possible that I
used a different user with a different workspace on the same machine, but
that really shouldn't be a problem.

>
> Within Eclipse, please open Window>Preferences>Ant>Runtime>Classpath
> If things look amiss here hit Restore Defaults.
>
> Also check the Classpath for the particular Ant launch configuration you are
> failing to launch.
> Open the External Tools Dialog and select the launch configuration.
> Go to the Classpath tab
> Check that the Ant Home entries are correct. You can try Restore defaults
> again to fix things up.

Tried both, the path is always
/usr/lib/eclipse/plugins/org.apache.ant_1.6.5/lib which seems to be ok.
Restoring defaults doesn't change anything. The problem remains.

Greetings Henrik
Previous Topic:Rewriting import decalarations from within plugin jar
Next Topic:Tracking Java Elements?
Goto Forum:
  


Current Time: Wed May 14 09:51:36 EDT 2025

Powered by FUDForum. Page generated in 0.03956 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top