Bug 467028 - Remove javax.xml from the org.eclipse.e4.rcp feature and use JRE classes instead
Summary: Remove javax.xml from the org.eclipse.e4.rcp feature and use JRE classes instead
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.5   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: 4.7 M7   Edit
Assignee: Lars Vogel CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-05-11 15:07 EDT by Thomas Schindl CLA
Modified: 2017-11-17 12:15 EST (History)
11 users (show)

See Also:
daniel_megert: pmc_approved+


Attachments
warning screenshot (24.89 KB, image/png)
2017-02-13 09:55 EST, Dirk Fauth CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Schindl CLA 2015-05-11 15:07:56 EDT
I bug 466775 we tracked that all stuff we require from javax.xml is provided by the JRE and we should get rid of this old javax.xml stuff and directly use the JRE provided versions.

To use the JRE versions all imports who bind to javax.xml should be changed to unversioned imports and javax.xml should not be delivered by the Platform anymore.
Comment 1 Lars Vogel CLA 2015-05-11 15:10:09 EDT
+1 Hurra
Comment 2 Eclipse Genie CLA 2015-10-11 17:30:42 EDT
New Gerrit change created: https://git.eclipse.org/r/57946
Comment 3 Thomas Watson CLA 2016-04-08 09:30:25 EDT
Dani, Do we need some announcement before removing bundles from the platform?  I fully agree we should remove the javax.xml bundles, but I think our policies require some notice to the community.

Also, this patch removes the bundle from the feature.  I assume all the require-bundle: javax.xml have been adjusted to import-package.  Keep in mind all third-party plugins would need to do the same so that is why I think we need to make advanced notice to the community before doing this.
Comment 4 Dani Megert CLA 2016-04-08 11:43:19 EDT
(In reply to Thomas Watson from comment #3)
> Dani, Do we need some announcement before removing bundles from the
> platform?

Well, first you need to get PMC approval explaining why this is necessary after the API freeze. Send a note to the pmc-list if you really want to do this for 4.6. Personally I'd prefer 4.7.
Comment 5 Thomas Schindl CLA 2016-04-08 11:54:38 EDT
I know that WTP was using javax.xml (IIRC through Xerces?)
Comment 6 Lars Vogel CLA 2016-04-25 15:12:05 EDT
Mass move to 4.6 RC1. We might push out more to 4.7.
Comment 7 Mickael Istria CLA 2016-09-07 05:18:18 EDT
IMHO, it's the right time to give a try to that removal. For 4.7, all dependent projects will have time to react and if it's causing an issue, it will be noticed by Simrel Oxygen RC3.
@Thomas: can you take care of sending the note to PMC and of the "administrative" part of that change?
Comment 8 Thomas Schindl CLA 2016-09-07 06:02:37 EDT
Unfortunately no - I'm currently not able to put time into Eclipse Platform stuff.
Comment 9 Lars Vogel CLA 2016-11-29 18:16:34 EST
I suggest to remove the javax.xml early M5 so that project have time to react.
Comment 10 Lars Vogel CLA 2017-01-17 05:39:24 EST
Tom suggested that this should be decided by the PMC. I add this to our next call.
Comment 11 Thomas Schindl CLA 2017-01-17 05:46:00 EST
Just as a side note - e(fx)clipse RCP application run with a javax.xml replacement who delegates to the JRE without ANY problems!
Comment 12 Dani Megert CLA 2017-01-23 05:00:07 EST
(In reply to Thomas Schindl from comment #11)
> Just as a side note - e(fx)clipse RCP application run with a javax.xml
> replacement who delegates to the JRE without ANY problems!

Thanks, that's good news.


I'm +1 to remove it, but first you have to announce this on the cross-project-issues-dev mailing list where you explain what will happen and detailed instructions what the projects have to do. I suggest you do this asap and announce the deletion for M6. Once the message is sent, I'll give the PMC approval on this bug.

Together with the deletion you also have to add an entry to the migration guide.
Comment 13 Dani Megert CLA 2017-02-02 08:53:04 EST
If you want to fix this for 4.7, you need to act now.
Comment 14 Lars Vogel CLA 2017-02-02 09:11:42 EST
(In reply to Dani Megert from comment #13)
> If you want to fix this for 4.7, you need to act now.

Eamil to cross https://dev.eclipse.org/mhonarc/lists/cross-project-issues-dev/msg14096.html
Comment 15 Dani Megert CLA 2017-02-02 09:58:37 EST
I suggest to wait a week and then go ahead.
Comment 16 Mike Wilson CLA 2017-02-03 09:40:06 EST
(In reply to Dani Megert from comment #15)
> I suggest to wait a week and then go ahead.

+1.
Comment 18 Dani Megert CLA 2017-02-09 10:11:08 EST
This is not done yet.

From comment 12:

"Together with the deletion you also have to add an entry to the migration guide."

And it needs an N&N entry.
Comment 19 Dirk Fauth CLA 2017-02-10 10:24:45 EST
I just updated my Oxygen installation and face an issue with this change.

!MESSAGE Could not resolve module: org.eclipse.e4.ui.css.swt.theme [33]
  Unresolved requirement: Require-Bundle: org.eclipse.e4.ui.css.swt; bundle-version="0.9.1"
    -> Bundle-SymbolicName: org.eclipse.e4.ui.css.swt; bundle-version="0.13.0.qualifier"; singleton:="true"
       org.eclipse.e4.ui.css.swt [32]
         Unresolved requirement: Require-Bundle: org.eclipse.e4.ui.css.core; bundle-version="0.9.0"
           -> Bundle-SymbolicName: org.eclipse.e4.ui.css.core; bundle-version="0.12.100.qualifier"; singleton:="true"
              org.eclipse.e4.ui.css.core [31]
                Unresolved requirement: Import-Package: org.w3c.dom.css; version="2.0.0"

javax.xml also provides the org.w3c.dom.css package in version 2.0.0. Which bundle provides this package now? There is a bundle dependency but it seems to be not provided by the JRE. At least my application is not starting anymore. Any hints?
Comment 20 Dirk Fauth CLA 2017-02-10 10:40:21 EST
OK, the org.w3c.dom.css and org.w3c.dom.stylesheets bundle is also provided by the JRE. But there we don't have a version constraint.

So the dependencies in org.eclipse.e4.ui.css.core needs to be modified. The version constraints on the package imports need to be removed in order to make it work again.
Comment 21 Eclipse Genie CLA 2017-02-11 15:02:25 EST
New Gerrit change created: https://git.eclipse.org/r/90882
Comment 22 Dirk Fauth CLA 2017-02-11 16:24:24 EST
I'm not sure but it looks like the same issue applies to some Equinox bundles. At least I get some warnings for org.eclipse.equinox.registry where the javax.xml packages are specified with a 0.0.0 version constraint.

The warning is raised by PDE if I start with the -console parameter. Not sure how this is related. But it looks like some additional checks need to be done in Equinox aswell.
Comment 23 Thomas Watson CLA 2017-02-13 09:05:49 EST
(In reply to Dirk Fauth from comment #22)
> I'm not sure but it looks like the same issue applies to some Equinox
> bundles. At least I get some warnings for org.eclipse.equinox.registry where
> the javax.xml packages are specified with a 0.0.0 version constraint.
> 
> The warning is raised by PDE if I start with the -console parameter. Not
> sure how this is related. But it looks like some additional checks need to
> be done in Equinox aswell.

What does the warning say?  The org.eclipse.equinox.registry already imports the xml packages with no version constraint.
Comment 24 Thomas Schindl CLA 2017-02-13 09:14:05 EST
I think the problem is PDE who is not smart enough to find out what JRE/JDK you try to run on, hence it does not find out that javax.xml is part of the JRE (same is true for the Target-Platform UI) because the Java8 EE contains it.

In e(fx)clipse we ship an EMPTY java.xml bundle to satisfy PDE in both cases!
Comment 25 Thomas Watson CLA 2017-02-13 09:26:52 EST
(In reply to Thomas Schindl from comment #24)
> I think the problem is PDE who is not smart enough to find out what JRE/JDK
> you try to run on, hence it does not find out that javax.xml is part of the
> JRE (same is true for the Target-Platform UI) because the Java8 EE contains
> it.
> 
> In e(fx)clipse we ship an EMPTY java.xml bundle to satisfy PDE in both cases!

When you mentioned this it made me think the issue is because equinox.registry still claims it supports J2SE-1.4 BREE (something I think needs to be updated at some point).  But the required xml packages are available on J2SE-1.4.  So PDE should not complain here about that missing.
Comment 26 Dirk Fauth CLA 2017-02-13 09:55:00 EST
Created attachment 266787 [details]
warning screenshot

I get this validation error on starting. Interestingly org.eclipse.equinox.registry starts and is in ACTIVE state. So it seems to be a PDE issue.
Comment 27 Thomas Watson CLA 2017-02-13 10:32:18 EST
(In reply to Dirk Fauth from comment #26)
> Created attachment 266787 [details]
> warning screenshot
> 
> I get this validation error on starting. Interestingly
> org.eclipse.equinox.registry starts and is in ACTIVE state. So it seems to
> be a PDE issue.

What is interesting here is that only the org.eclipse.equinox.registry has the issue.  My understanding is many other bundles in your testing import the xml packages in the same way.  This brings me back to suspecting something is going wrong with the BREE being J2SE-1.4 while I suspect all the other bundles are at a much later BREE.

If I recall correctly there is a PDEState object that is used to validate the set of bundles for launch.  In that state it is supposed to be loaded with all the supported execution environments by calling:

org.eclipse.osgi.service.resolver.State.setPlatformProperties(Dictionary<?, ?>[])

Where each Dictionary represents a supported execution environment.  One of the properties in the dictionary is supposed to contain the available packages for the execution environment ("org.osgi.framework.system.packages").  Perhaps somewhere along the way the java profile for J2SE-1.4 is losing this information for the PDEState.
Comment 29 Dani Megert CLA 2017-02-16 09:55:31 EST
(In reply to Thomas Watson from comment #27)

I suggest to open a separate bug against PDE.
Comment 30 Nobody - feel free to take it CLA 2017-02-20 07:59:15 EST
(In reply to Dirk Fauth from comment #26)
> Created attachment 266787 [details]
> warning screenshot
> 
> I get this validation error on starting. Interestingly
> org.eclipse.equinox.registry starts and is in ACTIVE state. So it seems to
> be a PDE issue.

I also got this with I20170219-2000. If you disregard it, it seems to start without issues though.
Comment 31 Nobody - feel free to take it CLA 2017-02-20 08:09:00 EST
(In reply to Dani Megert from comment #29)
> (In reply to Thomas Watson from comment #27)
> 
> I suggest to open a separate bug against PDE.

Done bug 512424
Comment 32 Marc-André Laperle CLA 2017-02-20 10:16:14 EST
As a related note, I noticed because of this change that org.apache.xerces also "requires bundle" javax.xml. So eventually it could be good for Orbit to go through a similar removal process.

Because our product (Trace Compass) includes some Web Tools dependencies that depend on org.apache.xerces, we also have to make sure javax.xml is included. I'm not sure if it will affect some EPPs but I thought I'd mention it.
Comment 33 Lars Vogel CLA 2017-03-03 03:50:12 EST
Mass move. Please move back to M6, if necessary
Comment 34 Dirk Fauth CLA 2017-03-03 04:25:15 EST
(In reply to Lars Vogel from comment #33)
> Mass move. Please move back to M6, if necessary

I'm unsure about this. Actually most of the jobs are done. Despite the open topics in PDE (separate ticket) and maybe some side effects we haven't noticed yet. But from my understanding javax.xml is removed and the modifications in the platform are done. Or is there something still open?
Comment 35 Dani Megert CLA 2017-03-08 12:40:09 EST
(In reply to Dirk Fauth from comment #34)
> (In reply to Lars Vogel from comment #33)
> > Mass move. Please move back to M6, if necessary
> 
> I'm unsure about this. Actually most of the jobs are done. Despite the open
> topics in PDE (separate ticket) and maybe some side effects we haven't
> noticed yet. But from my understanding javax.xml is removed and the
> modifications in the platform are done. Or is there something still open?

The migration entry is missing. Lars told me that he will fix it for M6.

Lars: only a few hours left ;-).
Comment 36 Lars Vogel CLA 2017-03-08 12:48:15 EST
(In reply to Dani Megert from comment #35)
> (In reply to Dirk Fauth from comment #3
> 
> Lars: only a few hours left ;-).

Cloning the Commons repo timed out yesterday night in the hotel, will try again tonight. Will be late (> 22:00 CET) so if that is after the cutoff, please move to M7.
Comment 37 Lars Vogel CLA 2017-03-08 17:39:00 EST
Cloning the commons repo continue to hang between 67-69%. Moving out to M7 and to a better Internet connection that hotel WLAN.
Comment 38 Alexander Kurtakov CLA 2017-04-21 02:42:14 EDT
We are getting close to M7 now.
Comment 39 Eclipse Genie CLA 2017-05-08 09:01:56 EDT
New Gerrit change created: https://git.eclipse.org/r/96574
Comment 41 Lars Vogel CLA 2017-05-08 09:03:15 EDT
Migration guide entry added.
Comment 42 Andrey Loskutov CLA 2017-11-17 12:15:23 EST
(In reply to Marc-André Laperle from comment #32)
> As a related note, I noticed because of this change that org.apache.xerces
> also "requires bundle" javax.xml. So eventually it could be good for Orbit
> to go through a similar removal process.
> 
> Because our product (Trace Compass) includes some Web Tools dependencies
> that depend on org.apache.xerces, we also have to make sure javax.xml is
> included. I'm not sure if it will affect some EPPs but I thought I'd mention
> it.

Marc-André: how it was fixed on your side for org.apache.xerces? I'm now trying to update our 4.6 Oomph based IDE to 4.7.1 and have exact same issue that Web Tools (still) includes (ancient) xerces which still "requires bundle" javax.xml. Funny enough they include this inside the feature, but Oomph p2 installer denies to "see" this bundle and says that javax.xml is missing.