Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 352205 - Eclipse can't find ant : Ant throws NoClassDefFoundError
Summary: Eclipse can't find ant : Ant throws NoClassDefFoundError
Status: RESOLVED WORKSFORME
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Ant (show other bugs)
Version: 4.1   Edit
Hardware: PC Linux
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: Pradeep Balachandran CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-15 08:36 EDT by Jasper Floor CLA
Modified: 2019-09-02 15:04 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jasper Floor CLA 2011-07-15 08:36:39 EDT
Build Identifier: 20110218-0911

Running an ant build in Eclipse fails. It also fails with no visible output. If you look in the eclipse log file then you can find:

java.lang.NoClassDefFoundError: org/apache/tools/ant/BuildException

If I look in the ant menu in the windows->preferences and I set the ANT_HOME to the same place it already says it is looking then it works partially. It still can't find any tasks in the contributed entries.

Reproducible: Always

Steps to Reproduce:
It happens every time but I don't know how to get Eclipse into this state.
Comment 1 Michael Rennie CLA 2011-07-18 11:47:22 EDT
Sounds like a dupe of bug 101224. What happens if you reset your ANT_HOME to the default location?

See bug 101224 comment#13 for more information about resetting ANT_HOME within Eclipse.
Comment 2 Jasper Floor CLA 2011-07-18 11:57:27 EDT
I've done some more testing and I discovered the following.

I install eclipse in a folder called apps. I have several eclipse installs here.

I create a link to this folder (or whatever eclipse is 'the' eclipse).

When I run eclipse I always go through the symbolic link.

Eclipse can then no longer find ant or its own tasks.

I can reset ant home explicitly to a specific folder and that works.
I can call eclipse by not going through the symbolic link.

Its the use of the symbolic link which breaks eclipse.
Comment 3 Michael Rennie CLA 2011-07-18 14:24:18 EDT
(In reply to comment #2)
 
> Eclipse can then no longer find ant or its own tasks.

So on the Ant > Runtime preferences page you are setting ANT_HOME to be the path to this symlink?

> I can reset ant home explicitly to a specific folder and that works.
> I can call eclipse by not going through the symbolic link.

Good to know.
Comment 4 Eclipse Genie CLA 2018-12-22 12:57:03 EST
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.
Comment 5 Lars Vogel CLA 2019-09-02 15:01:18 EDT
This bug has been marked as stalebug a while ago without any further interaction.

If this report is still relevant for the current release, please reopen and remove the stalebug whiteboard flag.
Comment 6 Lars Vogel CLA 2019-09-02 15:04:06 EDT
This bug was marked as stalebug a while ago. Marking as worksforme.

If this report is still relevant for the current release, please reopen and remove the stalebug whiteboard tag.