Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 300197 - PlatformURLPluginConnection#parse fails to load bundle with underscore in Bundle-SymbolicName
Summary: PlatformURLPluginConnection#parse fails to load bundle with underscore in Bun...
Status: RESOLVED FIXED
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: Components (show other bugs)
Version: 3.6   Edit
Hardware: Macintosh Mac OS X - Carbon (unsup.)
: P3 normal (vote)
Target Milestone: 3.6 M5   Edit
Assignee: DJ Houghton CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-01-20 10:06 EST by Fabian Steeg CLA
Modified: 2010-01-25 12:07 EST (History)
3 users (show)

See Also:


Attachments
Stack trace (4.97 KB, text/plain)
2010-01-20 10:10 EST, Fabian Steeg CLA
no flags Details
Unit test, requires the original contacts demo in addition to the renamed one described above. (1.77 KB, application/octet-stream)
2010-01-22 07:42 EST, Fabian Steeg CLA
no flags Details
Patch for PlatformURLConnection.java (1.05 KB, patch)
2010-01-22 07:42 EST, Fabian Steeg CLA
dj.houghton: iplog+
Details | Diff
fiz and tests (7.87 KB, patch)
2010-01-22 15:19 EST, Thomas Watson CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Fabian Steeg CLA 2010-01-20 10:06:22 EST
Build Identifier: 0.9.0.I20100114-2115

If a project name contains an underscore the applicationXMI file (specified in the plugin.xml) cannot be resolved when launching the product.

Reproducible: Always

Steps to Reproduce:
1. In the menu select 'e4' -> 'Generate Example Project', Import Project Set 
2. Open 'org.eclipse.e4.demo.contacts/contacts.product', click 'Launch an Eclipse application', app launches fine
3. Select 'org.eclipse.e4.demo.contacts', 'Refactor' -> 'Rename' to 'org.eclipse.e_4.demo.contacts'
4. Open 'plugin.xml', change value of the 'applicationXMI' property to 'org.eclipse.e_4.demo.contacts/Application.e4xmi'
5. Open the launch configuration, select the 'org.eclipse.e_4.demo.contacts.product' (Main tab) and the 'org.eclipse.e_4.demo.contacts' plugin (Plug-ins tab), click 'Run'

The application does not start, reporting a java.io.IOException: Unable to resolve plug-in "platform:/plugin/org.eclipse.e_4.demo.contacts/Application.e4xmi"
Comment 1 Fabian Steeg CLA 2010-01-20 10:10:08 EST
Created attachment 156654 [details]
Stack trace
Comment 2 Paul Webster CLA 2010-01-20 10:11:31 EST
Check the MANIFEST.MF ... did it update the bundle Bundle-SymbolicName?

The only other thing I can think of is you might have to go to the launch config and clear the config area (assuming org.eclipse.e_4.demo.contacts is now listed in the plugins used for launch config, but it sounds like it is).

PW
Comment 3 Fabian Steeg CLA 2010-01-20 10:18:31 EST
The Bundle-SymbolicName was updated and is 'org.eclipse.e_4.demo.contacts'. I just tried clearing the config area, but no change.
Comment 4 Fabian Steeg CLA 2010-01-22 07:42:08 EST
Created attachment 156925 [details]
Unit test, requires the original contacts demo in addition to the renamed one described above.
Comment 5 Fabian Steeg CLA 2010-01-22 07:42:52 EST
Created attachment 156926 [details]
Patch for PlatformURLConnection.java
Comment 6 Remy Suen CLA 2010-01-22 07:50:53 EST
Thank you, Fabian, for your investigations.
Comment 7 Thomas Watson CLA 2010-01-22 15:19:13 EST
Created attachment 156993 [details]
fiz and tests

Here is a patch that includes some tests.  It is interesting that we already tried to fix this issue in bug 155081.  This is a different flavor because the _ is included in the BSN and in bug 155081 the _ was in the version.

This patch includes a test to ensure bug 155081 is not re-introduced by this fix.
Comment 8 Thomas Watson CLA 2010-01-22 15:20:17 EST
DJ please review and release.  I'm fine with including in M5 if you feel it is safe.  Thanks Fabian!
Comment 9 DJ Houghton CLA 2010-01-25 12:05:22 EST
Released to HEAD.