[gutsy] No ant support

Bug #134537 reported by Edmundo
32
Affects Status Importance Assigned to Milestone
eclipse (Ubuntu)
Invalid
Undecided
Unassigned
Declined for Gutsy by Henrik Nilsen Omma

Bug Description

I can't get to have eclipse to use an ant file.

here's the log output:

!ENTRY org.eclipse.jface 4 2 2007-08-24 09:45:41.600
!MESSAGE Problems occurred when invoking code from plug-in: "org.eclipse.jface".
!STACK 0
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.defineClass(DefaultClassLoader.java:161)
        at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.defineClass(ClasspathManager.java:501)
        at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findClassImpl(ClasspathManager.java:471)
        at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClassImpl(ClasspathManager.java:430)
        at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:413)
        at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(DefaultClassLoader.java:189)
        at org.eclipse.osgi.framework.internal.core.BundleLoader.findLocalClass(BundleLoader.java:334)
        at org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:386)
        at org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:347)
        at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(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(AntModelProject.java:105)
        at org.eclipse.ant.internal.ui.model.AntModel.initializeProject(AntModel.java:367)
        at org.eclipse.ant.internal.ui.model.AntModel.prepareForFullParse(AntModel.java:341)
        at org.eclipse.ant.internal.ui.model.AntModel.parseDocument(AntModel.java:305)
        at org.eclipse.ant.internal.ui.model.AntModel.reconcile(AntModel.java:263)
        at org.eclipse.ant.internal.ui.model.AntModel.getProjectNode(AntModel.java:1383)
        at org.eclipse.ant.internal.ui.model.AntModel.getProjectNode(AntModel.java:1393)
        at org.eclipse.ant.internal.ui.AntUtil.getTargets(AntUtil.java:285)
        at org.eclipse.ant.internal.ui.model.AntProjectNodeProxy.parseBuildFile(AntProjectNodeProxy.java:63)
        at org.eclipse.ant.internal.ui.model.AntProjectNodeProxy.parseBuildFile(AntProjectNodeProxy.java:86)
        at org.eclipse.ant.internal.ui.model.AntProjectNodeProxy.getLabel(AntProjectNodeProxy.java:106)
        at org.eclipse.ant.internal.ui.model.AntModelLabelProvider.getText(AntModelLabelProvider.java:36)
        at org.eclipse.jface.viewers.StructuredViewer.buildLabel(StructuredViewer.java:2102)
        at org.eclipse.jface.viewers.TreeViewer.doUpdateItem(TreeViewer.java:258)
        at org.eclipse.jface.viewers.AbstractTreeViewer$UpdateItemSafeRunnable.run(AbstractTreeViewer.java:95)
        at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
        at org.eclipse.core.runtime.Platform.run(Platform.java:858)
        at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:44)
        at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:149)
        at org.eclipse.jface.viewers.AbstractTreeViewer.doUpdateItem(AbstractTreeViewer.java:849)
        at org.eclipse.jface.viewers.StructuredViewer$UpdateItemSafeRunnable.run(StructuredViewer.java:465)
        at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
        at org.eclipse.core.runtime.Platform.run(Platform.java:858)
        at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:44)
        at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:149)
        at org.eclipse.jface.viewers.StructuredViewer.updateItem(StructuredViewer.java:1955)
        at org.eclipse.jface.viewers.AbstractTreeViewer.createTreeItem(AbstractTreeViewer.java:753)
        at org.eclipse.jface.viewers.AbstractTreeViewer.createAddedElements(AbstractTreeViewer.java:313)
        at org.eclipse.jface.viewers.AbstractTreeViewer.internalAdd(AbstractTreeViewer.java:257)
        at org.eclipse.jface.viewers.TreeViewer.internalAdd(TreeViewer.java:910)
        at org.eclipse.jface.viewers.AbstractTreeViewer.add(AbstractTreeViewer.java:136)
        at org.eclipse.jface.viewers.AbstractTreeViewer.add(AbstractTreeViewer.java:602)
        at org.eclipse.ant.internal.ui.views.AntViewContentProvider.add(AntViewContentProvider.java:44)
        at org.eclipse.ant.internal.ui.views.AntView.addProject(AntView.java:456)
        at org.eclipse.ant.internal.ui.views.AntViewDropAdapter.processString(AntViewDropAdapter.java:77)
        at org.eclipse.ant.internal.ui.views.AntViewDropAdapter.access$0(AntViewDropAdapter.java:62)
        at org.eclipse.ant.internal.ui.views.AntViewDropAdapter$1.run(AntViewDropAdapter.java:48)
        at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:67)
        at org.eclipse.ant.internal.ui.views.AntViewDropAdapter.drop(AntViewDropAdapter.java:45)
        at org.eclipse.swt.dnd.DNDListener.handleEvent(DNDListener.java:65)
        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.Widget.sendEvent(Widget.java:1109)
        at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1094)
        at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:935)
        at org.eclipse.swt.dnd.DropTarget.drag_data_received(DropTarget.java:363)
        at org.eclipse.swt.dnd.DropTarget.Drag_Data_Received(DropTarget.java:246)
        at org.eclipse.swt.internal.gtk.OS._gtk_drag_get_data(Native Method)
        at org.eclipse.swt.internal.gtk.OS.gtk_drag_get_data(OS.java:4067)
        at org.eclipse.swt.dnd.DropTarget.drag_drop(DropTarget.java:405)
        at org.eclipse.swt.dnd.DropTarget.Drag_Drop(DropTarget.java:253)
        at org.eclipse.swt.internal.gtk.OS._gtk_main_do_event(Native Method)
        at org.eclipse.swt.internal.gtk.OS.gtk_main_do_event(OS.java:5291)
        at org.eclipse.swt.widgets.Display.eventProc(Display.java:1149)
        at org.eclipse.swt.internal.gtk.OS._g_main_context_iteration(Native Method)
        at org.eclipse.swt.internal.gtk.OS.g_main_context_iteration(OS.java:1437)
        at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2854)
        at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1930)
        at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1894)
        at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:422)
        at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
        at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:95)
        at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.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(EclipseStarter.java:400)
        at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:177)
        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: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)

I'm using sun-java5

Revision history for this message
jleigh' (james-nospam) wrote : Incompatible ant version in gutsy

Eclipse 3.2 requires ant 1.6. However, gutsy only includes ant 1.7. The solution is to either install eclipse 3.3(?) or install ant 1.6 and change the ant home directory from eclipse-> Window-> Preferences-> Ant.

Revision history for this message
Rogelio Castillo A. (rogelio2k) wrote :

Ant don't work

Changed in eclipse:
status: New → Confirmed
Revision history for this message
Kevin McGuinness (kevin-mcguinness) wrote :

Installing ant 1.6.5 and setting eclipse-> Window-> Preferences-> Ant ->Ant Home to the new path does not work.
Indeed, you shouldn't need to do this at all, considering that by default eclipse points Ant Home to it's internal
version of ant (1.6.5) in /usr/lib/eclipse/plugins.

Revision history for this message
Kevin McGuinness (kevin-mcguinness) wrote :

The other workaround (install eclipse 3.3) does appear to work, however

Revision history for this message
sircam (sircam) wrote :

The ANT 1.6 workaround with Eclipse 3.2 + Sun Java6 did not work for me. Stumbled accross AntLauch ClassNotFound exception, although I had change ANT_HOME in Eclipse.

However, installing 3.3 Europa seems to be a good move. It's fairly easy (although not automated, download & unzip and you're rolling), ANT 1.7 works fine, plus you get the latest features.

Revision history for this message
Mikael Nilsson (mini) wrote :

This is a really annoying eclipse bug. Has this been traced at all? There should be a simple workaround (with the existing 3.2 installation)

Revision history for this message
Richard Andreu (randreu) wrote :

Same problem here, I've installed Eclipse 3.3 manually and it works fine. Installing Ant 1.6.5 and pointing Ant Home to that installation path doesn't work in Eclipse 3.2.

Revision history for this message
sandos (sandos) wrote :

Argh, so no solution to this problem then? :(

I can't really use eclipse 3.3 due to an important plugin not working for it (P4WSAD) so 3.3 does not help me.

Revision history for this message
Mikael Nilsson (mini) wrote : Re: [Bug 134537] Re: [gutsy] No ant support

I've worked around the problem by doing this:

cd /tmp
mkdir ant
cd ant
unzip /usr/share/java/ant-launcher.jar
unzip /usr/share/java/ant.jar
jar cf ../ant.jar *
sudo rm /usr/lib/eclipse/plugins/org.apache.ant_1.6.5/lib/ant-launcher.jar
sudo rm /usr/lib/eclipse/plugins/org.apache.ant_1.6.5/lib/ant.jar
sudo cp ../ant.jar /usr/lib/eclipse/plugins/org.apache.ant_1.6.5/lib/ant.jar

(requires unzip and a working jar executable).

/Mikael

sön 2007-12-02 klockan 09:08 +0000 skrev sandos:
> Argh, so no solution to this problem then? :(
>
> I can't really use eclipse 3.3 due to an important plugin not working
> for it (P4WSAD) so 3.3 does not help me.
>
--
<email address hidden>

Plus ça change, plus c'est la même chose

Revision history for this message
Eden Crane (ubuntulaunchpad-tonecontrol) wrote :

I am using sun-java6-jre and I also encountered this bug. The fix from Mikael Nilsson worked for me but I agree, it is very annoying. Many Java developers who use Eclipse use Ant and would like this to work 'out of the box'.

Revision history for this message
naut (naut) wrote :

Mikael's workaround does not work for me, unfortunately.

This is a serious bug. Ant is the de facto standard build tool for Java. Eclipse is the most popular IDE for Java developers [ http://www.zefhemel.com/archives/2003/10/18/java-ide-market-share-survey ]. And Java is the most popular application programming language [ http://www.tiobe.com/index.html?tiobe_index ] in the world today!

For the integration between these tools to be so completely broken is a huge bug. I can't believe Henrik Nilsen Omma has declined this for gutsy gibbon, I just hope he reconsiders.

Revision history for this message
Sami Mäkinen (sami-makinen-helsinki) wrote :

I would also like to request that this be fixed now in Gutsy, rather than waiting for the next version with its new issues.

For me, as a Java developer using Bluetooth a lot, Gutsy seems to have a lot of things broken that used to work before. Not the best version, this one.

Revision history for this message
Pierrick Vandenbroucke (vanpie) wrote :

I also encountered the same problem with Ant and Eclipse, but I have a temporary solution: I use Ant in the terminal (after sudo apt-get install ant).

Revision history for this message
toxic (gaiduri) wrote :

the problem is that the eclipse ant plugin's jar files are linked to those in /usr/share, that is the v1.7.0.3 version of ant. this is the case in 8.04 beta, and although the ant version is different, was also the case in 7.10.

my solution was to put ant 1.6.5 somewhere, rename the plugins lib directory, and link to the lib directory of the 1.6.5 version. note that as far as i can tell all the scripts, etc. are not aliased, only the jar files are, so this should be the only change required. i performed this myself a short while ago, being fed up with not seeing my projects targets in the dialog box, and now all seems to be well.

Revision history for this message
todor (todor-gitchev) wrote :

I've experienced the same problem and have tried all the tips above but no success. I'm running Kubuntu 8.04 x64 bits on and the provided Eclipse 3.2.2. I was playing around with the provided ANT eclipse plug-in org.apache.ant_1.7.0.v200706080842 and the separate provided ANT 1.7.0 but with no success so far. I also find this problem a bit sever as these two tools are the most important for me now as Java development environment.
I'll be thankful for every tip to overcome this issue.
Thanks in advance.

Revision history for this message
Sami Mäkinen (sami-makinen-helsinki) wrote :

Well, right now on Kubuntu Hardy 64bit ant seems to work via eclipse.

eclipse is 3.2.2-5ubu
ant is 1.7.0-3

Perhaps this bug could be closed as fixed then? Is somebody still seeing problems?

Revision history for this message
toxic (gaiduri) wrote :
Download full text (9.9 KiB)

hi

i can assure you that this works.

user@box:/usr/lib/eclipse/plugins/org.apache.ant_1.6.5$ ls -l

drwxr-xr-x 2 root root 4096 2008-04-18 20:30 about_files
-rw-r--r-- 1 root root 3937 2008-03-09 15:47 about.html
drwxr-xr-x 2 root root 4096 2008-04-18 20:30 bin
drwxr-xr-x 3 root root 4096 2008-04-18 20:30 etc
=====> this is the link i created, it points eclipse at 1.6.5's jar files
lrwxrwxrwx 1 root root 38 2008-04-20 21:21 lib ->
/<some>/<dir>/lib/java/apache-ant-1.6.5/lib
=====> this is the renamed lib directory, it contains relative links to the
/usr/share/ant/lib/*.jar files (1.7.x)
drwxr-xr-x 2 root root 4096 2008-04-18 20:30 lib.new
drwxr-xr-x 2 root root 4096 2008-04-18 20:30 META-INF
-rw-r--r-- 1 root root 583 2008-03-09 15:47 plugin.properties

besides, as has been suggested, there are other workarounds. you can run it
from the command line. as such it is an annoyance, but not particularly a
product flaw (i should know, i work in development support).

On Sat, May 3, 2008 at 8:59 AM, todor <email address hidden> wrote:

> I've experienced the same problem and have tried all the tips above but no
> success. I'm running Kubuntu 8.04 x64 bits on and the provided Eclipse
> 3.2.2. I was playing around with the provided ANT eclipse plug-in
> org.apache.ant_1.7.0.v200706080842 and the separate provided ANT 1.7.0 but
> with no success so far. I also find this problem a bit sever as these two
> tools are the most important for me now as Java development environment.
> I'll be thankful for every tip to overcome this issue.
> Thanks in advance.
>
> --
> [gutsy] No ant support
> https://bugs.launchpad.net/bugs/134537
> You received this bug notification because you are a direct subscriber
> of the bug.
>
> Status in Source Package "eclipse" in Ubuntu: Confirmed
>
> Bug description:
> I can't get to have eclipse to use an ant file.
>
> here's the log output:
>
> !ENTRY org.eclipse.jface 4 2 2007-08-24 09:45:41.600
> !MESSAGE Problems occurred when invoking code from plug-in:
> "org.eclipse.jface".
> !STACK 0
> 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.defineClass(DefaultClassLoader.java:161)
> at
> org.eclipse.osgi.baseadaptor.loader.ClasspathManager.defineClass(ClasspathManager.java:501)
> at
> org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findClassImpl(ClasspathManager.java:471)
> at
> org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClassImpl(ClasspathManager.java:430)
> at
> org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:413)
> at
> org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(DefaultClassLoader.java:189)
> at
> org.eclipse.osgi.framework.internal.core.BundleLoader.findLocalClass(BundleLoader.java:334)
> at
> org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:386)
> at
> org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(Bun...

Revision history for this message
Adrian Weiler (0-launchpad-aweiler-com) wrote :

Hi...

The eclipse-cpp (Eclipse IDE for C/C++ developers) distribution has a broken ANT support at least since the Europa release.

Symptom: In Eclipse, under Window->Preferences, there is no category "Ant".

Diagnosis: only the the plugin "org.eclipse.ant.core" is provided. "org.eclipse.ant.ui" is missing.
I had this both on Linux (Debian) and Windows after installing eclipse-cpp.

Solution:
- Don't use the eclipse-cpp distribution. Take the "Eclipse Classic" distribution from http://www.eclipse.org/downloads/ instead and install the C/C++ support manually. Then you will have both C/C++ and a working ANT.

- if you don't want to replace your existing installation, you can still download the "classic" distribution (just 151MB ;-), and extract the JARs missing in the "cpp" distribution from there (version numbers apply to the current Ganymede release):

eclipse/plugins/org.eclipse.ant.ui_3.3.0.v20080529.jar
eclipse/plugins/org.eclipse.jdt.core_3.4.2.v_883_R34x.jar
eclipse/plugins/org.eclipse.jdt.debug.ui_3.3.1.v20080730_r341.jar
eclipse/plugins/org.eclipse.jdt.launching_3.4.1.v20080729_r341.jar
eclipse/plugins/org.eclipse.jdt.core.manipulation_1.2.0.v20080603-2000.jar
and the following directory
eclipse/plugins/org.eclipse.jdt.debug_3.4.0.v20080604/

The first JAR is what's obviously missing, and the others are it's dependencies.

Hope that helps for all those who had to say "does not work for me".

Cheers,
Adrian

Revision history for this message
Festor (festor-deactivatedaccount) wrote :

Gutsy no longer supported

Changed in eclipse (Ubuntu):
status: Confirmed → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.