0

I am developing a RCP Application with JDK11 and Eclipse 2020-06. I have a product file based on features.

When I launch the product, I get some errors as below. I've heard that JDK 11 does not contain JAXB. Is this error related to it?

!ENTRY org.eclipse.mylyn.commons.notifications.feed 4 0 2021-02-08 18:15:45.088
!MESSAGE FrameworkEvent ERROR
!STACK 0
org.osgi.framework.BundleException: Could not resolve module: org.eclipse.mylyn.commons.notifications.feed [470]
  Bundle was not resolved because of a uses constraint violation.
  org.apache.felix.resolver.reason.ReasonException: Uses constraint violation. Unable to resolve resource org.eclipse.mylyn.commons.notifications.feed [osgi.identity; type="osgi.bundle"; version:Version="1.17.1.v20200511-1958"; osgi.identity="org.eclipse.mylyn.commons.notifications.feed"; singleton:="true"] because it is exposed to package 'javax.xml.bind' from resources javax.xml.bind [osgi.identity; type="osgi.bundle"; version:Version="2.2.0.v201105210648"; osgi.identity="javax.xml.bind"] and jakarta.xml.bind [osgi.identity; type="osgi.bundle"; version:Version="2.3.3.v20201118-1818"; osgi.identity="jakarta.xml.bind"] via two dependency chains.

Chain 1:
  org.eclipse.mylyn.commons.notifications.feed [osgi.identity; type="osgi.bundle"; version:Version="1.17.1.v20200511-1958"; osgi.identity="org.eclipse.mylyn.commons.notifications.feed"; singleton:="true"]
    require: (&(osgi.wiring.bundle=javax.xml.bind)(bundle-version>=2.2.0))
     |
    provide: osgi.wiring.bundle: javax.xml.bind
  javax.xml.bind [osgi.identity; type="osgi.bundle"; version:Version="2.2.0.v201105210648"; osgi.identity="javax.xml.bind"]

Chain 2:
  org.eclipse.mylyn.commons.notifications.feed [osgi.identity; type="osgi.bundle"; version:Version="1.17.1.v20200511-1958"; osgi.identity="org.eclipse.mylyn.commons.notifications.feed"; singleton:="true"]
    require: (&(osgi.wiring.bundle=com.sun.xml.bind)(bundle-version>=2.2.0))
     |
    provide: osgi.wiring.bundle; bundle-version:Version="2.3.3.v20201118-1818"; osgi.wiring.bundle="com.sun.xml.bind"
  com.sun.xml.bind [osgi.identity; type="osgi.bundle"; version:Version="2.3.3.v20201118-1818"; osgi.identity="com.sun.xml.bind"]
    import: (&(osgi.wiring.package=javax.xml.bind)(&(version>=2.3.3)(!(version>=2.3.4))))
     |
    export: osgi.wiring.package: javax.xml.bind
  jakarta.xml.bind [osgi.identity; type="osgi.bundle"; version:Version="2.3.3.v20201118-1818"; osgi.identity="jakarta.xml.bind"]
    at org.eclipse.osgi.container.Module.start(Module.java:463)
    at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel$2.run(ModuleContainer.java:1845)
    at org.eclipse.osgi.internal.framework.EquinoxContainerAdaptor$1$1.execute(EquinoxContainerAdaptor.java:136)
    at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1838)
    at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1779)
    at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1743)
    at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1665)
    at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1)
    at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:234)
    at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:345)

!ENTRY org.eclipse.mylyn.tasks.bugs 4 0 2021-02-08 18:15:45.135
!MESSAGE FrameworkEvent ERROR
!STACK 0
org.osgi.framework.BundleException: Could not resolve module: org.eclipse.mylyn.tasks.bugs [482]
  Unresolved requirement: Require-Bundle: org.eclipse.mylyn.tasks.ui; bundle-version="[3.8.0,4.0.0)"
    -> Bundle-SymbolicName: org.eclipse.mylyn.tasks.ui; bundle-version="3.25.1.v20200512-0316"; singleton:="true"
       org.eclipse.mylyn.tasks.ui [484]
         Unresolved requirement: Require-Bundle: org.eclipse.mylyn.commons.notifications.feed; bundle-version="1.0.0"
           -> Bundle-SymbolicName: org.eclipse.mylyn.commons.notifications.feed; bundle-version="1.17.1.v20200511-1958"; singleton:="true"
              org.eclipse.mylyn.commons.notifications.feed [470]
                No resolution report for the bundle.  Bundle was not resolved because of a uses constraint violation.
  org.apache.felix.resolver.reason.ReasonException: Uses constraint violation. Unable to resolve resource org.eclipse.mylyn.commons.notifications.feed [osgi.identity; type="osgi.bundle"; version:Version="1.17.1.v20200511-1958"; osgi.identity="org.eclipse.mylyn.commons.notifications.feed"; singleton:="true"] because it is exposed to package 'javax.xml.bind' from resources javax.xml.bind [osgi.identity; type="osgi.bundle"; version:Version="2.2.0.v201105210648"; osgi.identity="javax.xml.bind"] and jakarta.xml.bind [osgi.identity; type="osgi.bundle"; version:Version="2.3.3.v20201118-1818"; osgi.identity="jakarta.xml.bind"] via two dependency chains.

Chain 1:
  org.eclipse.mylyn.commons.notifications.feed [osgi.identity; type="osgi.bundle"; version:Version="1.17.1.v20200511-1958"; osgi.identity="org.eclipse.mylyn.commons.notifications.feed"; singleton:="true"]
    require: (&(osgi.wiring.bundle=javax.xml.bind)(bundle-version>=2.2.0))
     |
    provide: osgi.wiring.bundle: javax.xml.bind
  javax.xml.bind [osgi.identity; type="osgi.bundle"; version:Version="2.2.0.v201105210648"; osgi.identity="javax.xml.bind"]

Chain 2:
  org.eclipse.mylyn.commons.notifications.feed [osgi.identity; type="osgi.bundle"; version:Version="1.17.1.v20200511-1958"; osgi.identity="org.eclipse.mylyn.commons.notifications.feed"; singleton:="true"]
    require: (&(osgi.wiring.bundle=com.sun.xml.bind)(bundle-version>=2.2.0))
     |
    provide: osgi.wiring.bundle; bundle-version:Version="2.3.3.v20201118-1818"; osgi.wiring.bundle="com.sun.xml.bind"
  com.sun.xml.bind [osgi.identity; type="osgi.bundle"; version:Version="2.3.3.v20201118-1818"; osgi.identity="com.sun.xml.bind"]
    import: (&(osgi.wiring.package=javax.xml.bind)(&(version>=2.3.3)(!(version>=2.3.4))))
     |
    export: osgi.wiring.package: javax.xml.bind
  jakarta.xml.bind [osgi.identity; type="osgi.bundle"; version:Version="2.3.3.v20201118-1818"; osgi.identity="jakarta.xml.bind"]
    at org.eclipse.osgi.container.Module.start(Module.java:463)
    at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel$2.run(ModuleContainer.java:1845)
    at org.eclipse.osgi.internal.framework.EquinoxContainerAdaptor$1$1.execute(EquinoxContainerAdaptor.java:136)
    at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1838)
    at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1779)
    at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1743)
    at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1665)
    at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1)
    at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:234)
    at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:345)

!ENTRY org.eclipse.mylyn.tasks.ui 4 0 2021-02-08 18:15:45.188
!MESSAGE FrameworkEvent ERROR
!STACK 0
org.osgi.framework.BundleException: Could not resolve module: org.eclipse.mylyn.tasks.ui [484]
  Unresolved requirement: Require-Bundle: org.eclipse.mylyn.commons.notifications.feed; bundle-version="1.0.0"
    -> Bundle-SymbolicName: org.eclipse.mylyn.commons.notifications.feed; bundle-version="1.17.1.v20200511-1958"; singleton:="true"
       org.eclipse.mylyn.commons.notifications.feed [470]
         No resolution report for the bundle.  Bundle was not resolved because of a uses constraint violation.
  org.apache.felix.resolver.reason.ReasonException: Uses constraint violation. Unable to resolve resource org.eclipse.mylyn.commons.notifications.feed [osgi.identity; type="osgi.bundle"; version:Version="1.17.1.v20200511-1958"; osgi.identity="org.eclipse.mylyn.commons.notifications.feed"; singleton:="true"] because it is exposed to package 'javax.xml.bind' from resources javax.xml.bind [osgi.identity; type="osgi.bundle"; version:Version="2.2.0.v201105210648"; osgi.identity="javax.xml.bind"] and jakarta.xml.bind [osgi.identity; type="osgi.bundle"; version:Version="2.3.3.v20201118-1818"; osgi.identity="jakarta.xml.bind"] via two dependency chains.

Chain 1:
  org.eclipse.mylyn.commons.notifications.feed [osgi.identity; type="osgi.bundle"; version:Version="1.17.1.v20200511-1958"; osgi.identity="org.eclipse.mylyn.commons.notifications.feed"; singleton:="true"]
    require: (&(osgi.wiring.bundle=javax.xml.bind)(bundle-version>=2.2.0))
     |
    provide: osgi.wiring.bundle: javax.xml.bind
  javax.xml.bind [osgi.identity; type="osgi.bundle"; version:Version="2.2.0.v201105210648"; osgi.identity="javax.xml.bind"]

Chain 2:
  org.eclipse.mylyn.commons.notifications.feed [osgi.identity; type="osgi.bundle"; version:Version="1.17.1.v20200511-1958"; osgi.identity="org.eclipse.mylyn.commons.notifications.feed"; singleton:="true"]
    require: (&(osgi.wiring.bundle=com.sun.xml.bind)(bundle-version>=2.2.0))
     |
    provide: osgi.wiring.bundle; bundle-version:Version="2.3.3.v20201118-1818"; osgi.wiring.bundle="com.sun.xml.bind"
  com.sun.xml.bind [osgi.identity; type="osgi.bundle"; version:Version="2.3.3.v20201118-1818"; osgi.identity="com.sun.xml.bind"]
    import: (&(osgi.wiring.package=javax.xml.bind)(&(version>=2.3.3)(!(version>=2.3.4))))
     |
    export: osgi.wiring.package: javax.xml.bind
  jakarta.xml.bind [osgi.identity; type="osgi.bundle"; version:Version="2.3.3.v20201118-1818"; osgi.identity="jakarta.xml.bind"]
    at org.eclipse.osgi.container.Module.start(Module.java:463)
    at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel$2.run(ModuleContainer.java:1845)
    at org.eclipse.osgi.internal.framework.EquinoxContainerAdaptor$1$1.execute(EquinoxContainerAdaptor.java:136)
    at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1838)
    at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1779)
    at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1743)
    at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1665)
    at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1)
    at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:234)
    at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:345)

!ENTRY org.eclipse.e4.ui.workbench 4 0 2021-02-08 18:16:06.178
!MESSAGE Failed to evaluate: ReferenceExpression [definitionId=org.eclipse.cdt.dsf.debug.ui.testIsUpdateModesActionSetActive]
!STACK 0
org.eclipse.core.runtime.CoreException: Unable to locate expression definition org.eclipse.cdt.dsf.debug.ui.testIsUpdateModesActionSetActive
    at org.eclipse.core.internal.expressions.DefinitionRegistry.getExpression(DefinitionRegistry.java:82)
    at org.eclipse.core.internal.expressions.ReferenceExpression.evaluate(ReferenceExpression.java:73)
    at org.eclipse.ui.internal.services.EvaluationReference.evaluate(EvaluationReference.java:74)
    at org.eclipse.ui.internal.services.EvaluationReference.evaluate(EvaluationReference.java:100)
    at org.eclipse.ui.internal.services.EvaluationReference.changed(EvaluationReference.java:94)
    at org.eclipse.e4.core.internal.contexts.TrackableComputationExt.update(TrackableComputationExt.java:108)
    at org.eclipse.e4.core.internal.contexts.EclipseContext.runAndTrack(EclipseContext.java:346)
    at org.eclipse.ui.internal.services.EvaluationService.addEvaluationReference(EvaluationService.java:239)
    at org.eclipse.ui.internal.services.EvaluationService.addEvaluationListener(EvaluationService.java:213)
    at org.eclipse.ui.internal.activities.MutableActivityManager.updateActivity(MutableActivityManager.java:639)
    at org.eclipse.ui.internal.activities.MutableActivityManager.getActivity(MutableActivityManager.java:147)
    at org.eclipse.ui.internal.activities.ProxyActivityManager.getActivity(ProxyActivityManager.java:48)
    at org.eclipse.ui.internal.ActivityPersistanceHelper.loadEnabledStates(ActivityPersistanceHelper.java:214)
    at org.eclipse.ui.internal.ActivityPersistanceHelper.loadEnabledStates(ActivityPersistanceHelper.java:188)
    at org.eclipse.ui.internal.ActivityPersistanceHelper.<init>(ActivityPersistanceHelper.java:140)
    at org.eclipse.ui.internal.ActivityPersistanceHelper.getInstance(ActivityPersistanceHelper.java:108)
    at org.eclipse.ui.internal.Workbench.init(Workbench.java:1624)
    at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2793)
    at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:646)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
    at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:557)
    at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:154)
    at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:150)
    at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:203)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:137)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:107)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:401)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:566)
    at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:657)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:594)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1447)
    at org.eclipse.equinox.launcher.Main.main(Main.java:1420)

!ENTRY org.eclipse.e4.ui.workbench 4 0 2021-02-08 18:16:06.204
!MESSAGE Failed to evaluate: ReferenceExpression [definitionId=org.eclipse.cdt.dsf.debug.ui.testIsUpdateModesActionSetActive]
!STACK 0
org.eclipse.core.runtime.CoreException: Unable to locate expression definition org.eclipse.cdt.dsf.debug.ui.testIsUpdateModesActionSetActive
    at org.eclipse.core.internal.expressions.DefinitionRegistry.getExpression(DefinitionRegistry.java:82)
    at org.eclipse.core.internal.expressions.ReferenceExpression.evaluate(ReferenceExpression.java:73)
    at org.eclipse.ui.internal.services.EvaluationReference.evaluate(EvaluationReference.java:74)
    at org.eclipse.ui.internal.activities.MutableActivityManager.updateActivity(MutableActivityManager.java:652)
    at org.eclipse.ui.internal.activities.MutableActivityManager.getActivity(MutableActivityManager.java:147)
    at org.eclipse.ui.internal.activities.ProxyActivityManager.getActivity(ProxyActivityManager.java:48)
    at org.eclipse.ui.internal.ActivityPersistanceHelper.loadEnabledStates(ActivityPersistanceHelper.java:214)
    at org.eclipse.ui.internal.ActivityPersistanceHelper.loadEnabledStates(ActivityPersistanceHelper.java:188)
    at org.eclipse.ui.internal.ActivityPersistanceHelper.<init>(ActivityPersistanceHelper.java:140)
    at org.eclipse.ui.internal.ActivityPersistanceHelper.getInstance(ActivityPersistanceHelper.java:108)
    at org.eclipse.ui.internal.Workbench.init(Workbench.java:1624)
    at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2793)
    at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:646)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
    at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:557)
    at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:154)
    at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:150)
    at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:203)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:137)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:107)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:401)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:566)
    at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:657)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:594)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1447)
    at org.eclipse.equinox.launcher.Main.main(Main.java:1420)
Phil Dukhov
  • 67,741
  • 15
  • 184
  • 220
ehLim
  • 11
  • 1
  • Looks like it found javax.xml.bind in both the javax.xml.bind and jakarta.xml.bind plugins – greg-449 Feb 08 '21 at 11:01
  • Same problem for me on Eclipse 2021-12 + JDK 11. This thread provides a solution, as long as you are using an OOMPH setup file to build your product (I think..). https://www.eclipse.org/forums/index.php/t/1106342/ Since I'm just using Maven+Tycho I have the same problem: how to "add" the required bundle `com.sun.xml.bind_2.2.0.v20201118-1845` to the product?I have tried adding it to the target platform (from Orbit) and the add it to a feature included in the product. And also as dependency of a plugin included in the product. The final product has only `com.sun.xml.bind_2.3.3.v20201118-1818` – Gionata Feb 23 '22 at 09:12

3 Answers3

0

Installing Spring Dashboard (optional) from https://download.springsource.com/snapshot/TOOLS/nightly/e4.18 as workaround solved the issue for me (source: https://github.com/spring-projects/sts4/issues/588#issuecomment-762313076).

SaschaH
  • 351
  • 3
  • 10
0

Same problem for me on Eclipse 2021-12 + JDK 11. This thread provides a solution, as long as you are using an OOMPH setup file to build your product (I think..). https://www.eclipse.org/forums/index.php/t/1106342/

Since I'm just using Maven+Tycho I still have the problem, but I've just found a solution. Create a new feature project and add the required pluigin with the exact match for the version. This is the relevant part of the file feature.xml:

   <requires>
      <import plugin="com.sun.xml.bind" version="2.2.0.v20201118-1845" match="perfect"/>
   </requires>

Please check the plugin version if it's right for you.

You have to install the plugin in your eclipse installation or add it to the target platform if you are using it. The Orbit repo has this version for Eclipse 2021-12:

https://download.eclipse.org/tools/orbit/downloads/drops2/R20211213173813/repository/plugins/com.sun.xml.bind_2.2.0.v20201118-1845.jar

Add this feature to your .product file, in the content tab. (I have to add the project as maven module of course). When you export the product (or build with Tycho) the plugin should be included.

Gionata
  • 133
  • 11
  • This post doesn't look like an attempt to answer this question. Every post here is expected to be an explicit attempt to *answer* this question; if you have a critique or need a clarification of the question or another answer, you can [post a comment](/help/privileges/comment) (like this one) directly below it. Please remove this answer and create either a comment or a new question. See: [Ask questions, get answers, no distractions](/tour). – Luca Kiebel Feb 23 '22 at 09:07
  • You are right.. I have udpate the answer with a working solution, at least for me – Gionata Feb 23 '22 at 11:27
0

I found a discussion in eclipse forums around the issue https://www.eclipse.org/lists/cross-project-issues-dev/msg18691.html Mylyn is where the bug fix is being made.

A solution is provided in this forum discussion https://bugs.eclipse.org/bugs/show_bug.cgi?id=569078#c4 This installs the missing jaxb library.

./eclipse/eclipse -consoleLog -application org.eclipse.equinox.p2.director -repository http://download.eclipse.org/releases/2020-12 -installIUs com.sun.xml.bind/2.2.0.v20201118-1845
user37068
  • 1
  • 1
  • 1