Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 385270 - LinkageError while triggering Content Assist
Summary: LinkageError while triggering Content Assist
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Recommenders (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Marcel Bruch CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-07-17 04:48 EDT by Daniel Hirscher CLA
Modified: 2019-07-24 14:37 EDT (History)
0 users

See Also:


Attachments
The errors that appear in the Error Log view. (9.80 KB, text/plain)
2012-07-17 04:51 EDT, Daniel Hirscher CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Hirscher CLA 2012-07-17 04:48:16 EDT
Build Identifier: I20120608-1400 (4.2.0)

I put Google Guava 12.0.1 into the dropins folder.
It looks like another version of guava is used by the code recommenders.

A possible fix is to restrict the required guava version in all plug-ins:
com.google.guava;bundle-version="[10.0.0,11.0.0)"

I added the version constraints to about 4 plug-ins (2 were already correct) and now it is working for me.

The Guave team does not support unlimited backward compatibility, so restricting the versions to major would be better, instead to leave it unbounded.

Reproducible: Always

Steps to Reproduce:
1. Put Google Guava 12.0.1 into dropins folder
2. Start Eclipse
3. Type e.g.: System.err.println
4. Invoke Content Assist at the end of println (Content assist for parameters works, but not for types)
Comment 1 Daniel Hirscher CLA 2012-07-17 04:51:17 EDT
Created attachment 218791 [details]
The errors that appear in the Error Log view.
Comment 2 Marcel Bruch CLA 2012-07-18 08:31:36 EDT
Thanks for the report. We'll fix this for 1.0.1
Comment 3 Marcel Bruch CLA 2012-07-25 08:25:39 EDT
Fix will be available on HEAD update site in 30 minute for testing.

The following manifests have been modified:
http://git.eclipse.org/c/recommenders/org.eclipse.recommenders.git/commit/?id=b43b194ab86538c14fd72af745d4fb9cedd668dc


Please note that the root cause is not a binary incompatibility between 10 and 12 (guava keeps compatibilitiy for non-beta classes for 6 releases ~1 1/2 years) but that different bundles loaded different versions of the same class with two different class loaders. A cleaner workaround would be to reexport the guava bundle from those plugins that make these types available as part of their API to prevent us from these classloader issues in future.

 Anyway. This fix should work ;)
Comment 4 Daniel Hirscher CLA 2012-07-26 02:36:09 EDT
Thank you for the fix and the explanation of the real cause.