861037: Eclipse does not start in rawhide

There is an unwanted wiring during bundles resolution here. Many UI
packages required package org.w3.dom.css which was provided by a bundle
in the upstream Eclipse, but is provided by vm SDK in Fedora. The
problem is that it is also provided by javax.xml, and since there are
duplicates, some classes are loaded from javax.xml bundle in some
bundles and others from SDK in other bundles, causing LinkageErrors
and/or class cast exceptions. 
The solution is to remove imports from the UI code to ensure that
javax.xml is not searched during class resolution, and that proper
classes from SDK are used.

https://bugzilla.redhat.com/show_bug.cgi?id=861037
This commit is contained in:
Krzysztof Daniel 2012-09-28 14:49:54 +02:00
parent 8a5ee96acd
commit 5232c6c050
2 changed files with 75 additions and 1 deletions

View File

@ -0,0 +1,68 @@
--- eclipse.platform.ui/bundles/org.eclipse.e4.ui.css.core/META-INF/MANIFEST.MF.bak 2012-09-17 15:49:37.000000000 +0200
+++ eclipse.platform.ui/bundles/org.eclipse.e4.ui.css.core/META-INF/MANIFEST.MF 2012-09-28 11:08:08.943277380 +0200
@@ -37,4 +37,3 @@
org.eclipse.equinox.common;bundle-version="[3.5.0,4.0.0)",
org.eclipse.core.runtime;bundle-version="[3.6.0,4.0.0)"
Bundle-RequiredExecutionEnvironment: J2SE-1.5
-Import-Package: org.w3c.dom.css;version="2.0.0"
--- eclipse.platform.ui/bundles/org.eclipse.e4.ui.css.swt/META-INF/MANIFEST.MF.bak 2012-09-17 15:49:37.000000000 +0200
+++ eclipse.platform.ui/bundles/org.eclipse.e4.ui.css.swt/META-INF/MANIFEST.MF 2012-09-28 11:08:46.078526952 +0200
@@ -25,4 +25,3 @@
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Bundle-Activator: org.eclipse.e4.ui.internal.css.swt.CSSActivator
Bundle-ActivationPolicy: lazy
-Import-Package: org.w3c.dom.css;version="2.0.0"
--- eclipse.platform.ui/bundles/org.eclipse.e4.ui.css.swt.theme/META-INF/MANIFEST.MF.bak 2012-09-17 15:49:37.000000000 +0200
+++ eclipse.platform.ui/bundles/org.eclipse.e4.ui.css.swt.theme/META-INF/MANIFEST.MF 2012-09-28 11:09:35.677860544 +0200
@@ -18,5 +18,4 @@
Export-Package: org.eclipse.e4.ui.css.swt.internal.theme;x-internal:=true,
org.eclipse.e4.ui.css.swt.theme;x-friends:="org.eclipse.e4.ui.workbench.renderers.swt,org.eclipse.e4.ui.workbench.swt,org.eclipse.ui.workbench"
Import-Package: org.osgi.framework;version="1.5.0",
- org.osgi.service.event;version="1.3.0";resolution:=optional,
- org.w3c.dom.css;version="2.0.0"
+ org.osgi.service.event;version="1.3.0";resolution:=optional
--- eclipse.platform.ui/bundles/org.eclipse.e4.ui.services/META-INF/MANIFEST.MF.bak 2012-09-17 15:49:37.000000000 +0200
+++ eclipse.platform.ui/bundles/org.eclipse.e4.ui.services/META-INF/MANIFEST.MF 2012-09-28 11:10:38.229281658 +0200
@@ -10,8 +10,7 @@
Import-Package: javax.annotation;version="1.0.0",
javax.inject;version="1.0.0",
org.osgi.framework;version="1.3.0",
- org.osgi.service.event;resolution:=optional,
- org.w3c.dom.css;version="2.0.0"
+ org.osgi.service.event;resolution:=optional
Require-Bundle: org.eclipse.core.commands;bundle-version="[3.4.0,4.0.0)",
org.eclipse.e4.core.services;bundle-version="0.9.0",
org.eclipse.osgi;bundle-version="[3.6.0,4.0.0)",
--- eclipse.platform.ui/bundles/org.eclipse.e4.ui.workbench.renderers.swt/META-INF/MANIFEST.MF.bak 2012-09-17 15:49:37.000000000 +0200
+++ eclipse.platform.ui/bundles/org.eclipse.e4.ui.workbench.renderers.swt/META-INF/MANIFEST.MF 2012-09-28 11:11:48.509755332 +0200
@@ -28,6 +28,5 @@
org.eclipse.e4.ui.workbench.renderers.swt;x-friends:="org.eclipse.e4.ui.workbench.addons.swt,org.eclipse.ui.workbench"
Bundle-ActivationPolicy: lazy
Import-Package: javax.annotation;version="1.0.0",
- javax.inject;version="1.0.0",
- org.w3c.dom.css;version="2.0.0"
+ javax.inject;version="1.0.0"
Bundle-Activator: org.eclipse.e4.ui.internal.workbench.renderers.swt.SWTRenderersActivator
--- eclipse.platform.ui/bundles/org.eclipse.e4.ui.workbench.swt/META-INF/MANIFEST.MF.bak 2012-09-17 15:49:37.000000000 +0200
+++ eclipse.platform.ui/bundles/org.eclipse.e4.ui.workbench.swt/META-INF/MANIFEST.MF 2012-09-28 11:12:42.438119165 +0200
@@ -48,7 +48,6 @@
org.eclipse.osgi.service.debug;version="1.1.0",
org.osgi.framework;version="1.5.0",
org.osgi.service.packageadmin;version="1.2.0",
- org.osgi.util.tracker;version="1.4.0",
- org.w3c.dom.css;version="2.0.0"
+ org.osgi.util.tracker;version="1.4.0"
Service-Component: OSGI-INF/testableobject.xml, OSGI-INF/statusreporter.xml,
OSGI-INF/menuservice.xml
--- eclipse.platform.ui/bundles/org.eclipse.ui.workbench/META-INF/MANIFEST.MF.bak 2012-09-17 15:49:37.000000000 +0200
+++ eclipse.platform.ui/bundles/org.eclipse.ui.workbench/META-INF/MANIFEST.MF 2012-09-28 11:13:39.266502896 +0200
@@ -122,8 +122,5 @@
org.eclipse.emf.common.util,
org.eclipse.emf.ecore,
org.eclipse.emf.ecore.util,
- org.osgi.service.event;version="1.2.0",
- org.w3c.dom,
- org.w3c.dom.css;version="2.0.0",
- org.xml.sax
+ org.osgi.service.event;version="1.2.0"
Bundle-RequiredExecutionEnvironment: J2SE-1.5

View File

@ -37,7 +37,7 @@ ln -s %{_javadir}/%{2} ${_f}
Summary: An open, extensible IDE
Name: eclipse
Version: %{eclipse_version}
Release: 0.3%{?dist}
Release: 0.4%{?dist}
License: EPL
Group: Development/Tools
URL: http://www.eclipse.org/
@ -189,6 +189,8 @@ Patch32: %{name}-adjust-p2-server-dependencies.patch
Patch33: %{name}-build-internal-jdt-debug-jar.patch
Patch34: %{name}-fix-linkageerrors-in-ui.patch
BuildRequires: ant >= 1.8.3
BuildRequires: rsync
BuildRequires: jpackage-utils >= 0:1.5, make, gcc
@ -414,6 +416,7 @@ tar --strip-components=1 -xf %{SOURCE1}
%patch31
%patch32
%patch33
%patch34
#p2.inf should be qualified (asked in the newsgroup and waiting for an answer)
#http://dev.eclipse.org/mhonarc/lists/cbi-dev/msg00777.html
@ -1255,6 +1258,9 @@ rm -rf %{_bindir}/efj/
%{_mavendepmapfragdir}/%{name}-equinox-osgi
%changelog
* Fri Sep 28 2012 Krzysztof Daniel <kdaniel@redhat.com> 1:4.2.1-0.4
- 861037: Eclipse does not start in rawhide
* Thu Sep 20 2012 Krzysztof Daniel <kdaniel@redhat.com> 1:4.2.1-0.3
- Remove build artifacts from P2 files.
- Fix native gnome-proxy build.