Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 158870 - eclipse's bundled ant classes being picked up by system ant
Summary: eclipse's bundled ant classes being picked up by system ant
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: eclipse
Version: 4
Hardware: All
OS: Linux
medium
high
Target Milestone: ---
Assignee: eclipse-bugs
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: FC4Blocker
TreeView+ depends on / blocked
 
Reported: 2005-05-26 14:04 UTC by Gary Benson
Modified: 2007-11-30 22:11 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2006-02-03 22:07:17 UTC


Attachments (Terms of Use)
Fix (deleted)
2005-05-26 15:01 UTC, Gary Benson
no flags Details | Diff

Description Gary Benson 2005-05-26 14:04:17 UTC
Description of problem:
Some of eclipse's bundled ant classes are being picked up by the system ant,
which then fails because the classpath (for system ant) does not contain all the
classes that the (newer) eclipse ant requires.

Version-Release number of selected component (if applicable):
eclipse-3.1.0_fc-0.M7.7

How reproducible:
Always

Steps to Reproduce:
1. echo '<project/>' > build.xml
2. ant
  
Actual results:
Buildfile: build.xml
java.lang.NoClassDefFoundError: while resolving class: org.apache.tools.ant.Project
   at java.lang.VMClassLoader.transformException(java.lang.Class,
java.lang.Throwable) (/usr/lib/libgcj.so.6.0.0)
   at java.lang.VMClassLoader.resolveClass(java.lang.Class)
(/usr/lib/libgcj.so.6.0.0)
   at java.lang.Class.initializeClass() (/usr/lib/libgcj.so.6.0.0)
   at org.apache.tools.ant.Main.runBuild(java.lang.ClassLoader)
(/usr/lib/eclipse/plugins/org.apache.ant_1.6.3/lib/ant.jar.so)
   at org.apache.tools.ant.Main.startAnt(java.lang.String[],
java.util.Properties, java.lang.ClassLoader)
(/usr/lib/eclipse/plugins/org.apache.ant_1.6.3/lib/ant.jar.so)
   at org.apache.tools.ant.launch.Launcher.run(java.lang.String[])
(/usr/lib/eclipse/plugins/org.apache.ant_1.6.3/lib/ant-nodeps.jar.so)
   at org.apache.tools.ant.launch.Launcher.main(java.lang.String[])
(/usr/lib/eclipse/plugins/org.apache.ant_1.6.3/lib/ant-nodeps.jar.so)
   at gnu.java.lang.MainThread.call_main() (/usr/lib/libgcj.so.6.0.0)
   at gnu.java.lang.MainThread.run() (/usr/lib/libgcj.so.6.0.0)
Caused by: java.lang.ClassNotFoundException: org.apache.tools.ant.Executor not
found in...
   ...

Expected results:
Buildfile: build.xml

BUILD SUCCESSFUL
Total time: 1 second

Comment 1 Thomas Fitzsimmons 2005-05-26 14:42:26 UTC
Our eclipse packages create symlinks to the system-installed ant (rather than
bundling their own version of ant).  In M7 eclipse started bundling ant 1.6.4. 
Currently our eclipse packages link to what they think is 1.6.2, which causes
the breakage you're seeing.


Comment 2 Gary Benson 2005-05-26 14:46:43 UTC
How does that work?  org.apache.tools.ant.Executor first appeared in ant-1.6.3:
the code that references it must come from that version of ant, so eclipse must
be bundling it, must it not?

Comment 3 Gary Benson 2005-05-26 15:01:36 UTC
Created attachment 114870 [details]
Fix

This ought to fix it.  It's going to take some messing about to build it
though:

 1. delete eclipse-3.1.0_fc-0.M7.5 and eclipse-3.1.0_fc-0.M7.7 from dist-fc4
    (to stop the new classes from masking the system ant's)
 2. move java-1.4.2-gcj-compat-1.4.2.0-40jpp_26rh out of dist-fc4 temporarily
    and delete java-1.4.2-gcj-compat-1.4.2.0-40jpp_25rh entirely
    (so tools.jar is looking in the right place for ecj)
 3. build the new eclipse
 4. move java-1.4.2-gcj-compat-1.4.2.0-40jpp_26rh back into dist-fc4.

Comment 5 Gary Benson 2005-05-27 09:15:45 UTC
I can confirm that the combination of eclipse-ecj-3.1.0_fc-0.M7.8 and
java-1.4.2-gcj-compat-1.4.2.0-40jpp_30rh works beautifully.


Note You need to log in before you can comment on or make changes to this bug.