Bug 476469 - After installing german language packs (R0.13.0), eclipse crashes on startup
Summary: After installing german language packs (R0.13.0), eclipse crashes on startup
Status: NEW
Alias: None
Product: RAP
Classification: RT
Component: Releng (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 10
: P3 blocker with 7 votes (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 492394 521576 522288 (view as bug list)
Depends on:
Blocks:
 
Reported: 2015-09-02 15:46 EDT by Josua Mayer CLA
Modified: 2018-09-12 10:05 EDT (History)
12 users (show)

See Also:


Attachments
eclipse startup error log (4.01 KB, application/octet-stream)
2015-09-02 15:46 EDT, Josua Mayer CLA
no flags Details
log output of a failed startup attempt on linux (ubuntu 14.04 w/ java 8) (4.14 KB, text/plain)
2015-09-02 16:09 EDT, Sebastian Hoß CLA
no flags Details
log output of eclipse-installer (44.08 KB, text/plain)
2015-09-03 16:24 EDT, Sebastian Hoß CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Josua Mayer CLA 2015-09-02 15:46:29 EDT
Created attachment 256337 [details]
eclipse startup error log

as in summary.
Steps to reproduce:
1) download eclipse Mars
2) open install Software Dialog and add babel repo: http://download.eclipse.org/technology/babel/update-site/R0.13.0/mars
3) install german language selection
4) yes, restart eclipse

Eclipse will Show an error message pointing to a logfile in Workspace.
Find a copy attached.

The error message suggests that there is a class file provided by multiple .jar's.

I tracked that down to:
org/eclipse/jface/bindings/Binding.class
in
org.eclipse.rap.jface_3.0.0.20150520-1729.jar
org.eclipse.jface_3.11.0.v20150602-1400.jar

Deleting one of These (I deleted the .rap.* one), makes eclipse load as expected.
Comment 1 Josua Mayer CLA 2015-09-02 15:50:45 EDT
Further tesing has shown that after running eclipse with one of the jars removed, it can be added back without breaking further restarts.
I did not expect this effect.

I should further add that I not only produced this issue on Windows 10, but also on openSUSE.
Comment 2 Sebastian Hoß CLA 2015-09-02 16:09:17 EDT
Created attachment 256339 [details]
log output of a failed startup attempt on linux (ubuntu 14.04 w/ java 8)

I'm having the same issue on Linux. Adding the entire german language pack to the Mars release will break the installation.
Comment 3 Kit Lo CLA 2015-09-02 17:55:15 EDT
I remember seeing problems when you install the "entire" set of Babel language packs for all projects. p2 is not smart enough to skip installing language packs for projects that do not exist in your installation.

Please try installing just the language packs for the projects in your installation (for example, just Eclipse Platform, RAP, etc). See if that's any better. In the meantime, I will try to reproduce the problem.
Comment 4 Sebastian Hoß CLA 2015-09-03 16:21:59 EDT
I can reproduce this with the german language packs for Eclipse itself ("Babel Language Pack for eclipse in German") + the language pack for RAP ("Babel Language Pack for rt.rap in German"). Installing those two together always results in a broken installation. However installing the RAP language pack first and then one for Eclipse seems to work fine.
Comment 5 Sebastian Hoß CLA 2015-09-03 16:24:42 EDT
Created attachment 256378 [details]
log output of eclipse-installer

The above attachment shows the log output of the eclipse-installer for my local build during testing. I've picked the Eclipse IDE for Java devs, latest stable Mars release.
Comment 6 Josua Mayer CLA 2015-09-03 17:35:46 EDT
(In reply to Kit Lo from comment #3)
> I remember seeing problems when you install the "entire" set of Babel
> language packs for all projects. p2 is not smart enough to skip installing
> language packs for projects that do not exist in your installation.
> 
> Please try installing just the language packs for the projects in your
> installation (for example, just Eclipse Platform, RAP, etc). See if that's
> any better. In the meantime, I will try to reproduce the problem.

I tried just one experiment: start fresh and install german selection without RAP part. All working good.
Still the fact that there can be 2 classes with the same package and name does not seem right. If the jar is called "org.eclipse.rap.jface", shouldnt it contain the classes org.eclipse.rap.jface.*?
Comment 7 Kit Lo CLA 2015-09-03 18:21:28 EDT
Josua & Sebastian, "Eclipse IDE for Java Developers" does not contain RAP. My first question is why do you want to install Babel language packs for Eclipse and RAP together. By selecting the Babel language packs for RAP, are you hoping that p2 will install RAP for you at the same time?

I think the crashes after installing the Babel language packs for RAP did not mean that the Babel language packs for RAP were bad. The crashes happened because p2 failed to pull in all the dependencies for RAP. You probably will see a similar problem if you start with a fresh "Eclipse IDE for Java Developers" and select to install just RAP SDK.
Comment 8 Josua Mayer CLA 2015-09-03 18:30:57 EDT
(In reply to Kit Lo from comment #7)
> Josua & Sebastian, "Eclipse IDE for Java Developers" does not contain RAP.
> My first question is why do you want to install Babel language packs for
> Eclipse and RAP together. By selecting the Babel language packs for RAP, are
> you hoping that p2 will install RAP for you at the same time?
> 
> I think the crashes after installing the Babel language packs for RAP did
> not mean that the Babel language packs for RAP were bad. The crashes
> happened because p2 failed to pull in all the dependencies for RAP. You
> probably will see a similar problem if you start with a fresh "Eclipse IDE
> for Java Developers" and select to install just RAP SDK.

Thats very simple to answer: I don't even know what RAP is, so I just select "Show only components available for my installation", and then click the top-level checkbox for german language packs.
What I expect: install german language packs. I dont really care if I install more than I will use.
This used to work just fine for e.g. Juno and Indigo.

Just imagine a simple user, one that rather has the IDE in his own language for easier understanding, downloading "Eclipse IDE for Java Developers", and having no clue what RAP or other abbreviations mean.

Did you look into the .jar? All the other jars follow the convention that jarname = packagename of contained classes. Only the RAP jface one doesn't. I have no idea about eclipse internals so wether this is of any relevance, I do not know.
Comment 9 Satoru Yoshida CLA 2015-11-04 16:58:29 EST
Hello, Kit.

I will check translation data for the two jar files that Josua reported.
org.eclipse.rap.jface
org.eclipse.jface

I hope that a clue would be found.
Thank You.
Comment 10 Satoru Yoshida CLA 2015-11-07 00:14:44 EST
It may be helpful if we will writing guideline like following on www.eclipse.org/babel/downloads.php .

this guideline shows which language pack you should choose.

Legend : Feature -> Language Pack name (note)

*Always Required* -> eclipse
BIRT Framework -> birt
C/C++ Development Tools -> tools.cdt (in some case, tool.linuxtools also needed)
Code Recommenders Tools -> technology.recommenders
Data Tools Platform -> datatools
Git Team Provider -> technology.egit
Lua Development Tools -> technology.koneki
Java Development Tools -> eclipse
JavaScript Development Tools -> webtools
Market Place -> technology.packaging.mpc
Memory Analyzer Tool -> tools.mat
Mylyn Task List -> mylyn
Parallel Tools Platform -> tools.ptp, tools.ptp.photran
PHP Development Tools -> tools.pdt, technology.dltk
Plug-in Development Environment -> eclipse
Remote System Explorer -> tools.tm
Remote Application Platform -> rt.rap
Subversion (aka, SVN) -> technology.subversive
XML Editors and Tools -> webtools
Xtext -> modeling.tmf.xtext

Do you have any idea?
Comment 11 Satoru Yoshida CLA 2016-02-11 00:51:42 EST
Hello, Josua. Any news?
Comment 12 Josua Mayer CLA 2016-02-11 07:11:39 EST
The only news I have, is that it still crashes. As usual, removing the .rap.jface file removes the issue, and then it can even be put back in.
Comment 13 Satoru Yoshida CLA 2016-02-11 08:28:26 EST
Hello, Josua.
Bug 388359 seems to be similar issue.

I feel happy if you would remove both RAP plugins (if exist) and its babel data from your Eclipse envrionment if You have no need the RAP.

It is considered the possibility of conflict between the jface and rap.jface plugins. 

Thank You.
Comment 14 Brian de Alwis CLA 2016-04-25 23:32:27 EDT
*** Bug 492394 has been marked as a duplicate of this bug. ***
Comment 15 Brian de Alwis CLA 2016-05-02 09:54:41 EDT
The problem here is that RAP is being brought in by stealth.  The Babel packages provide bundle-specific messages for RAP bundles, like:

  org.eclipse.rap.doc
  org.eclipse.rap.filedialog
  org.eclipse.rap.fileupload
  org.eclipse.rap.jface.databinding
  org.eclipse.rap.jface
  org.eclipse.rap.nebula.jface.gridviewer

And these are included by the language packs.  But these RAP bundles aren't intended to be co-installed with their non-RAP equivalents.

RAP's org.eclipse.rap.feature *feature* [1] has some metadata to prevent it from being co-installed alongside the normal SWT-based bundles that it replaces (e.g., org.eclipse.jface), but the bundles themselves do not carry that metadata.  Adding that kind of metadata wouldn't help prevent this situation but it would instead prevent the Babel language packs from being installed.

A possible solution might be to split the language packs into RAP and non-RAP packs. But I question whether this the current approach is sustainable as it causes installing the non-RAP pack can still cause a partial install of functionality (e.g., datatools), since Babel deals in terms of bundles and fragments, and doesn't pull in corresponding features.  The fragments, for example, will pull in their host bundles, and I don't think that can be made optional.  I think some higher-level smarts may be required.

[1] https://git.eclipse.org/c/rap/org.eclipse.rap.git/tree/features/org.eclipse.rap.feature/p2.inf
Comment 16 Brian de Alwis CLA 2016-05-02 09:56:36 EDT
For those of you hitting this bug, I think you can workaround these problems by exiting Eclipse and then running with "-clean".
Comment 17 Kit Lo CLA 2016-05-02 10:11:36 EDT
Brian, thank you very much for the diagnosis! I'm forwarding this bug report to RAP team to see if they have any solution.

RAP team, please read comment 15.
Comment 18 Ivan Furnadjiev CLA 2016-05-03 02:55:45 EDT
You should never have RAP Runtime bundles installed in your IDE. RAP runtime is a target platform. How did you do that? Manually?
Comment 19 Hengrui Jiang CLA 2016-05-03 08:04:36 EDT
For the record:
- this problem can be reproduced in Windows 7 too
- also for R0.13.1
- clicking any selection "Babel Language Pack in xxx" produces the same error, probably, tested French
- getting more than one rap language packs also causes error, however another one
Comment 20 Pascal Rapicault CLA 2016-05-03 15:26:38 EDT
I think we already ran into this issue a while back (like years ago when the language packs started to be distributed by the mean of p2 repos), but anyway here is what I believe is the cause of this problem.

Assuming the translations are delivered through real fragments and built as such, the p2 IUs for these fragments will therefore include a dependency from the fragment to the bundle (for example the IU for the german rap fragment will have a dependency that says: <required namespace='osgi.bundle' name='org.eclipse.rap...' ..../>). Since by default all dependencies are 'greedy', it means that when p2 will do the dependency traversal, it will cause the bundle for the fragment to be brought in if it was not already part of the bundles to be considered as candidate for the dependency resolution.

As you will have guessed, the way to avoid this is to make sure that the dependency from the fragment to the bundle is identified to be non-greedy. The best way to do this is to author a p2.inf that will overwrite the dependencies and mark them non-greedy.
Comment 21 Kit Lo CLA 2017-08-30 10:58:52 EDT
*** Bug 521576 has been marked as a duplicate of this bug. ***
Comment 22 Kit Lo CLA 2017-09-14 08:16:44 EDT
*** Bug 522288 has been marked as a duplicate of this bug. ***
Comment 23 Georg Breitschopf CLA 2018-02-01 05:28:52 EST
Is there any update on this issue?
Comment 24 Libor Ukropec CLA 2018-09-12 08:46:43 EDT
Is there any separate p2 babel site with just for Eclipse RAP platform for Oxygen?
Comment 25 Kit Lo CLA 2018-09-12 09:58:46 EDT
(In reply to Libor Ukropec from comment #24)
> Is there any separate p2 babel site with just for Eclipse RAP platform for
> Oxygen?

There were older Babel Language Pack zips for RAP for Luna but not for Oxygen.
http://archive.eclipse.org/technology/babel/babel_language_packs/R0.14.1/luna/luna.php
Comment 26 Libor Ukropec CLA 2018-09-12 10:05:12 EDT
(In reply to Kit Lo from comment #25)
> 
> There were older Babel Language Pack zips for RAP for Luna but not for
> Oxygen.
> http://archive.eclipse.org/technology/babel/babel_language_packs/R0.14.1/
> luna/luna.php
Also for Mars - http://archive.eclipse.org/technology/babel/babel_language_packs/R0.14.1/mars/mars.php

But Neon and Oxygen does not contain the plugins anymore. Would be good if separate update site/ZIP archive exists so it does not corrupt the Eclipse update mechanism, and allow to install the plugins manually.