Bug 481214 - PDE Junit Plug-in Test: Multiple Versions of a bundle
Summary: PDE Junit Plug-in Test: Multiple Versions of a bundle
Status: RESOLVED WORKSFORME
Alias: None
Product: PDE
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.5   Edit
Hardware: Macintosh Mac OS X
: P3 normal with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: PDE-UI-Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords: investigate
Depends on:
Blocks:
 
Reported: 2015-11-02 04:04 EST by Peter Kullmann CLA
Modified: 2019-09-02 15:14 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Kullmann CLA 2015-11-02 04:04:20 EST
PDE Junit Plug-in Tests seem not to support multiple versions of the same plugin (ie bundles with the same bundle symbolic name) in the test runtime. I have a complicated integration test where two versions of org.apache.batik.util.gui are requiered. I select both of the plug-ins in the Plug-ins tab of the run configuration and Validate Plug-ins finds no problems. But when launched, the framework actually contains only one of the two bundles and the test cannot be started due to resolution errors.

Here is the relevant bit of the launch config:

<stringAttribute key="selected_target_plugins" value="...,org.apache.batik.util.gui*1.6.0.v201011041432@default:default,org.apache.batik.util.gui*1.7.0.v200903091627@default:default,..."/>
Comment 1 Peter Kullmann CLA 2015-11-07 04:22:51 EST
Here is part of the content of config.ini of the test launch:

...,reference\:file\:/Users/kup/e451/Eclipse.app/Contents/Eclipse/plugins/org.apache.batik.util.gui_1.6.0.v201011041432.jar,...,reference\:file\:/Users/kup/e451/Eclipse.app/Contents/Eclipse/plugins/org.apache.batik.util.gui_1.6.0.v201011041432.jar,

it references the same bundle with the same version twice.

Looking at the code in org.eclipse.pde.internal.launching.launcher.LaunchConfigurationHelper I can see that the information about the bundle versions is lost somewhere. The method setBundleLocations takes a list of bundles consisting only of symbolic names (without versions) and creates the bundle list with full paths to jars (including versions). The jars and versions are looked up in a map keyed by the bundle symbolic name. 

So, there will be no easy way to fix this. It was probably never possible to launch with two bundles of the same symbolic name. I can run the tests in tycho or try to work around the issue somehow.
Comment 2 Peter Kullmann CLA 2015-11-07 09:01:21 EST
Including org.eclipse.equinox.simpleconfigurator in the launch config helps! I can easily live with that but I leave the bug open.
Comment 3 Vikas Chandra CLA 2015-11-09 01:15:07 EST
With the fix to this(https://bugs.eclipse.org/bugs/show_bug.cgi?id=472778) help this issue ? Can you check?
Comment 4 Peter Kullmann CLA 2015-11-10 07:35:20 EST
(In reply to comment #3)
> With the fix to this(https://bugs.eclipse.org/bugs/show_bug.cgi?id=472778) help
> this issue ? Can you check?
I tried with Build id: I20151029-1100 and the problem ist still there.
Comment 5 Svilen Valkanov CLA 2016-08-22 04:53:54 EDT
Is there any update on this bug ?
I am experiencing a similar problem with

Version: Neon Release (4.6.0)
Build id: 20160613-1800
Comment 6 Eclipse Genie CLA 2018-12-07 14:57:42 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 7 Lars Vogel CLA 2019-09-02 15:11:51 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 8 Lars Vogel CLA 2019-09-02 15:14:12 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.