Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 288186 - Product Export gives mysterious error message due to Eclipse folder name
Summary: Product Export gives mysterious error message due to Eclipse folder name
Status: CLOSED DUPLICATE of bug 187993
Alias: None
Product: PDE
Classification: Eclipse Project
Component: Build (show other bugs)
Version: 4.0   Edit
Hardware: Macintosh Mac OS X - Carbon (unsup.)
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: pde-build-inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-08-31 17:37 EDT by Bob Kanefsky CLA
Modified: 2009-09-02 14:12 EDT (History)
1 user (show)

See Also:


Attachments
Full stack trace (2.45 KB, text/plain)
2009-09-01 22:18 EDT, Bob Kanefsky CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Bob Kanefsky CLA 2009-08-31 17:37:44 EDT
User-Agent:       Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1.2) Gecko/20090729 Firefox/3.5.2
Build Identifier: M20090211-1700

I tried exporting a product and got the not-very-helpful message "BUILD FAILED".  Asking for details explains "IllegalArgumentException".

I looked further and found a stack trace in the Error Log view, and located the low-level error.  Looks like Eclipse is giving me trouble because it doesn't appreciate what I called it:

java.net.URISyntaxException: Illegal character in path at  
index 32: file:/Applications/Eclipse-3-4-2 from Confluence/plugins/ 
org.apache.ant_1.7.0.v200803061910/lib/ant.jar

I suspect org.apache.ant.Project.setAntLib (or something it calls or is called by) needs to be more careful in turning the pathname into a URI so that it gets properly escaped.

Once I studied the stack trace, the workaround was obvious, so I tried it and that resolved the problem.  But this has the potential to waste a lot of people's time if they don't look in the right place, and I'll bet there's a one-line fix.

Reproducible: Always

Steps to Reproduce:
1. Go to the Overview tab in a .product file
2. Click on Eclipse Product export wizard
3. 

These steps will probably succeed, but if you first do this before starting Eclipse, they should fail:

0.1.  Find the Eclipse application.  (Mac:  From the dock, right-click on Eclipse icon and select Show In Finder).
0.2.  Go up to its parent folder.
0.3.  Rename it to, say, "Eclipse export test"
Comment 1 Andrew Niefer CLA 2009-09-01 10:23:13 EDT
Can you please post the rest of that stack trace.
Comment 2 Bob Kanefsky CLA 2009-09-01 22:18:05 EDT
Created attachment 146245 [details]
Full stack trace

Requested stack trace is attached herewith.
Comment 3 Andrew Niefer CLA 2009-09-02 14:12:04 EDT
Thanks for the stack trace, this is a bug in Ant, see https://issues.apache.org/bugzilla/show_bug.cgi?id=42222

This is tracked in eclipse by bug 187993. A workaround was released, but it didn't work on Mac (see bug 187993 comment #10).

This is fixed by upgrading to Ant 1.7.1, which is what is shipped in Eclipse 3.5

If you don't want to get Eclipse 3.5, download 
http://download.eclipse.org/tools/orbit/downloads/drops/R20090825191606/bundles/org.apache.ant_1.7.1.v20090120-1145.zip.
Unzip it somewhere, and in your Preferences -> Ant -> Runtime, click "Ant Home..." and point to the new 1.7.1.

(Note if you do upgrade to 3.5 and keep your workspace, you may still need to go update that preference)

*** This bug has been marked as a duplicate of bug 187993 ***