Step to reproduce:
1. Download Eclipse luna sr2 Packages from http://www.eclipse.org/downloads/
Extra and open eclipse IDE
Click menu Help-> Eclipse Marketplace -> search 'Spring' -> click 'Spring Tool Suite (STS) for Eclipse 3.7.7RELEASE'-> click 'Install'
After the Spring installation finished restart eclipse IDE
The git and maven are broken.
I copy some error fomr Error log:
1) FrameworkEvent ERROR in org.eclipse.egit.ui
eclipse.buildId=4.4.2.M20150204-1700
java.version=1.7.0_51
java.vendor=Oracle Corporation
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_NZ
Framework arguments: -product org.eclipse.epp.package.java.product
Command-line arguments: -os linux -ws gtk -arch x86_64 -product org.eclipse.epp.package.java.product
org.eclipse.mylyn.git.ui
Error
Fri Mar 18 17:16:34 NZDT 2016
FrameworkEvent ERROR
org.osgi.framework.BundleException: Could not resolve module: org.eclipse.mylyn.git.ui [269]
Unresolved requirement: Require-Bundle: org.eclipse.egit.ui
-> Bundle-SymbolicName: org.eclipse.egit.ui; bundle-version="4.2.0.201601211800-r"; singleton:="true"
org.eclipse.egit.ui [458]
No resolution report for the bundle. Bundle was not resolved because of a uses contraint violation.
org.osgi.service.resolver.ResolutionException: Uses constraint violation. Unable to resolve resource org.eclipse.egit.ui [osgi.identity; osgi.identity="org.eclipse.egit.ui"; type="osgi.bundle"; version:Version="4.2.0.201601211800-r"; singleton:="true"] because it is exposed to package 'com.jcraft.jsch' from resources com.jcraft.jsch [osgi.identity; osgi.identity="com.jcraft.jsch"; type="osgi.bundle"; version:Version="0.1.53.v201508180515"] and com.jcraft.jsch [osgi.identity; osgi.identity="com.jcraft.jsch"; type="osgi.bundle"; version:Version="0.1.51.v201410302000"] via two dependency chains.
Chain 1:
org.eclipse.egit.ui [osgi.identity; osgi.identity="org.eclipse.egit.ui"; type="osgi.bundle"; version:Version="4.2.0.201601211800-r"; singleton:="true"]
require: (&(osgi.wiring.bundle=com.jcraft.jsch)(&(bundle-version>=0.1.37)(!(bundle-version>=0.2.0))))
|
provide: osgi.wiring.bundle: com.jcraft.jsch
com.jcraft.jsch [osgi.identity; osgi.identity="com.jcraft.jsch"; type="osgi.bundle"; version:Version="0.1.53.v201508180515"]
Chain 2:
org.eclipse.egit.ui [osgi.identity; osgi.identity="org.eclipse.egit.ui"; type="osgi.bundle"; version:Version="4.2.0.201601211800-r"; singleton:="true"]
require: (&(osgi.wiring.bundle=org.eclipse.jsch.core)(&(bundle-version>=1.1.100)(!(bundle-version>=2.0.0))))
|
provide: osgi.wiring.bundle; osgi.wiring.bundle="org.eclipse.jsch.core"; bundle-version:Version="1.1.500.v20131112-1442"; singleton:="true"
org.eclipse.jsch.core [osgi.identity; osgi.identity="org.eclipse.jsch.core"; type="osgi.bundle"; version:Version="1.1.500.v20131112-1442"; singleton:="true"]
require: (&(osgi.wiring.bundle=com.jcraft.jsch)(&(bundle-version>=0.1.50)(!(bundle-version>=1.0.0))))
|
provide: osgi.wiring.bundle: com.jcraft.jsch
com.jcraft.jsch [osgi.identity; osgi.identity="com.jcraft.jsch"; type="osgi.bundle"; version:Version="0.1.51.v201410302000"]
at org.eclipse.osgi.container.Module.start(Module.java:434)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1582)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1561)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1533)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1476)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1)
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)
2) FrameworkEvent ERROR
eclipse.buildId=4.4.2.M20150204-1700
java.version=1.7.0_51
java.vendor=Oracle Corporation
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_NZ
Framework arguments: -product org.eclipse.epp.package.java.product
Command-line arguments: -os linux -ws gtk -arch x86_64 -product org.eclipse.epp.package.java.product
org.eclipse.m2e.core
Error
Fri Mar 18 17:16:34 NZDT 2016
FrameworkEvent ERROR
org.osgi.framework.BundleException: Could not resolve module: org.eclipse.m2e.core [479]
Unresolved requirement: Require-Bundle: org.eclipse.m2e.maven.runtime; bundle-version="[1.7.0,1.8.0)"
-> Bundle-SymbolicName: org.eclipse.m2e.maven.runtime; bundle-version="1.7.0.20160202-2118"; singleton:="false"
org.eclipse.m2e.maven.runtime [491]
Unresolved requirement: Require-Bundle: org.eclipse.m2e.maven.runtime.slf4j.simple; bundle-version="[1.7.0,1.8.0)"
-> Bundle-SymbolicName: org.eclipse.m2e.maven.runtime.slf4j.simple; bundle-version="1.7.0.20160202-2118"; singleton:="false"
org.eclipse.m2e.maven.runtime.slf4j.simple [492]
Unresolved requirement: Require-Capability: osgi.ee; filter:="(&(osgi.ee=JavaSE)(version=1.8))"
at org.eclipse.osgi.container.Module.start(Module.java:434)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1582)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1561)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1533)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1476)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1)
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)
I observed same type of issue with Maven plugin in eclipse when I copied my eclipse binary from one machine to another machine.
org.osgi.framework.BundleException: Could not resolve module: org.eclipse.m2e.core [479]
Unresolved requirement: Require-Bundle: org.eclipse.m2e.maven.runtime; bundle-version="[1.7.0,1.8.0)"
-> Bundle-SymbolicName: org.eclipse.m2e.maven.runtime; bundle-version="1.7.0.20160202-2118"; singleton:="false"
org.eclipse.m2e.maven.runtime [491]
Unresolved requirement: Require-Bundle: org.eclipse.m2e.maven.runtime.slf4j.simple; bundle-version="[1.7.0,1.8.0)"
-> Bundle-SymbolicName: org.eclipse.m2e.maven.runtime.slf4j.simple; bundle-version="1.7.0.20160202-2118"; singleton:="false"
org.eclipse.m2e.maven.runtime.slf4j.simple [492]
Unresolved requirement: Require-Capability: osgi.ee; filter:="(&(osgi.ee=JavaSE)(version=1.8))"
And the reason was the JDK7 on the new machine. When I pointed JDK8 in eclipse.ini, this issue get resolved.
Related
When I enter a dot operator after entering the class name, Eclipse will show method suggestions auto complete, at that time Eclipse hangs and gets closed automatically.
It also happens when showing method info. Can someone help with this?
When I checked Eclipse log, I saw these exceptions
eclipse.buildId=4.13.0.I20190916-1045
java.version=1.8.0_312
java.vendor=Private Build
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_IN
Framework arguments: -product org.eclipse.epp.package.jee.product
Command-line arguments: -os linux -ws gtk -arch x86_64 -product org.eclipse.epp.package.jee.product
!ENTRY org.brainwy.liclipsetext.editor 4 0 2022-05-13 14:48:14.576
!MESSAGE FrameworkEvent ERROR
!STACK 0
org.osgi.framework.BundleException: Could not resolve module: org.brainwy.liclipsetext.editor [93]
Unresolved requirement: Require-Capability: osgi.ee; filter:="(&(osgi.ee=JavaSE)(version=11))"
Unresolved requirement: Require-Bundle: org.brainwy.liclipsetext.shared_core; bundle-version="[2.3.0,2.3.1)"
-> Bundle-SymbolicName: org.brainwy.liclipsetext.shared_core; bundle-version="2.3.0.202104291051"
org.brainwy.liclipsetext.shared_core [94]
Unresolved requirement: Require-Capability: osgi.ee; filter:="(&(osgi.ee=JavaSE)(version=11))"
Unresolved requirement: Require-Bundle: org.brainwy.liclipsetext.shared_ui
-> Bundle-SymbolicName: org.brainwy.liclipsetext.shared_ui; bundle-version="2.3.0.202104291051"; singleton:="true"
org.brainwy.liclipsetext.shared_ui [95]
Unresolved requirement: Require-Bundle: org.brainwy.liclipsetext.shared_core; bundle-version="[2.3.0,2.3.1)"
-> Bundle-SymbolicName: org.brainwy.liclipsetext.shared_core; bundle-version="2.3.0.202104291051"
at org.eclipse.osgi.container.Module.start(Module.java:462)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel$2.run(ModuleContainer.java:1844)
at org.eclipse.osgi.internal.framework.EquinoxContainerAdaptor$2$1.execute(EquinoxContainerAdaptor.java:150)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1837)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1778)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1742)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1664)
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.brainwy.liclipsetext.shared_core 4 0 2022-05-13 14:48:14.579
!MESSAGE FrameworkEvent ERROR
!STACK 0
org.osgi.framework.BundleException: Could not resolve module: org.brainwy.liclipsetext.shared_core [94]
Unresolved requirement: Require-Capability: osgi.ee; filter:="(&(osgi.ee=JavaSE)(version=11))"
at org.eclipse.osgi.container.Module.start(Module.java:462)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel$2.run(ModuleContainer.java:1844)
at org.eclipse.osgi.internal.framework.EquinoxContainerAdaptor$2$1.execute(EquinoxContainerAdaptor.java:150)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1837)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1778)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1742)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1664)
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.brainwy.liclipsetext.shared_ui 4 0 2022-05-13 14:48:14.580
!MESSAGE FrameworkEvent ERROR
!STACK 0
org.osgi.framework.BundleException: Could not resolve module: org.brainwy.liclipsetext.shared_ui [95]
Unresolved requirement: Require-Capability: osgi.ee; filter:="(&(osgi.ee=JavaSE)(version=11))"
Unresolved requirement: Require-Bundle: org.brainwy.liclipsetext.shared_core; bundle-version="[2.3.0,2.3.1)"
-> Bundle-SymbolicName: org.brainwy.liclipsetext.shared_core; bundle-version="2.3.0.202104291051"
org.brainwy.liclipsetext.shared_core [94]
Unresolved requirement: Require-Capability: osgi.ee; filter:="(&(osgi.ee=JavaSE)(version=11))"
at org.eclipse.osgi.container.Module.start(Module.java:462)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel$2.run(ModuleContainer.java:1844)
at org.eclipse.osgi.internal.framework.EquinoxContainerAdaptor$2$1.execute(EquinoxContainerAdaptor.java:150)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1837)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1778)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1742)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1664)
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)
Thanks #greg-449 for your comment.
The errors say that you have installed a plug-in which requires at
least Java 11 but you are using Java 8 on Eclipse 2019-09 (4.13) which
is now 3 years and 10 releases old. Try running on the current Eclipse
2022-03 (4.23).
It resolved after uninstalling the plugin which requires at least Java 11
I am new to OSGI and I am currently stuck with following problem:
I am trying to write an OSGI module with a managed service which should return hello world strings in different languages based on configuration. I have downloaded Equinox and added it under Preferences/Plug-in Development/Target platform/Content in my Eclipse IDE. When I then try to import the packages I require in the MANIFEST.ML
Import-Package: org.osgi.framework;version="1.3.0", org.eclipse.equinox.cm, org.eclipse.osgi.services
Eclipse warns me that no available bundle exports these packages (I have ticked them under Preferences/Plug-in Development/Target platform/) even though Eclipse then recognizes classes like ManagedService.
When I try to run the project anyways I get following output:
WARNING: Using incubator modules: jdk.incubator.httpclient
Hello World
!SESSION 2018-11-11 17:34:31.981 -----------------------------------------------
eclipse.buildId=unknown
java.version=9.0.4
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=de_AT
Command-line arguments: -dev file:C:/Users/SpaceLama/eclipse-workspace/.metadata/.plugins/org.eclipse.pde.core/New_configuration/dev.properties -os win32 -ws win32 -arch x86_64 -consoleLog -console
!ENTRY HelloWorld 4 0 2018-11-11 17:34:32.505
!MESSAGE FrameworkEvent ERROR
!STACK 0
org.osgi.framework.BundleException: Could not resolve module: HelloWorld [33]
Unresolved requirement: Import-Package: translator
-> Export-Package: translator; bundle-symbolic-name="Translator"; bundle-version="1.0.0.qualifier"; version="0.0.0"
Translator [69]
Unresolved requirement: Import-Package: org.eclipse.equinox.cm
at org.eclipse.osgi.container.Module.start(Module.java:447)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1685)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1665)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1627)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1558)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1)
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:233)
at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:343)
!ENTRY org.eclipse.osgi.services 4 0 2018-11-11 17:34:32.552
!MESSAGE FrameworkEvent ERROR
!STACK 0
org.osgi.framework.BundleException: Could not resolve module: org.eclipse.osgi.services [61]
Unresolved requirement: Import-Package: javax.servlet; resolution:="optional"
Unresolved requirement: Import-Package: javax.servlet.http; resolution:="optional"
Unresolved requirement: Import-Package: org.osgi.util.function; version="[1.0.0,2.0.0)"
at org.eclipse.osgi.container.Module.start(Module.java:447)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1685)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1665)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1627)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1558)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1)
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:233)
at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:343)
!ENTRY Translator 4 0 2018-11-11 17:34:32.552
!MESSAGE FrameworkEvent ERROR
!STACK 0
org.osgi.framework.BundleException: Could not resolve module: Translator [69]
Unresolved requirement: Import-Package: org.eclipse.equinox.cm
at org.eclipse.osgi.container.Module.start(Module.java:447)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1685)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1665)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1627)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1558)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1)
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:233)
at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:343)
!ENTRY org.eclipse.osgi 4 0 2018-11-11 17:34:32.552
!MESSAGE Bundle initial#reference:file:../../eclipse-workspace/HelloWorld/ was not resolved.
!ENTRY org.eclipse.osgi 4 0 2018-11-11 17:34:32.552
!MESSAGE Bundle initial#reference:file:../../eclipse-workspace/Translator/ was not resolved.
!ENTRY org.eclipse.osgi 4 0 2018-11-11 17:34:32.552
!MESSAGE Bundle initial#reference:file:plugins/org.eclipse.osgi.services_3.7.100.v20180827-1536.jar was not resolved.
ManagedService appears to be in the org.osgi.service.cm package (not org.eclipse.equinox.cm) which the org.eclipse.osgi.services plug-in does export. So I think you are importing the wrong packages.
I've been coding a small project in Java, and don't know what changed between today and last week, but for some reason my Eclipse is not opening, and the error log is giving a huge error message, which I can't paste most of here because of the character limit. Here is the beginning of the error message:
!SESSION 2017-06-25 21:09:24.945 -----------------------------------------------
eclipse.buildId=4.4.2.M20150204-1700
java.version=1.6.0_65
java.vendor=Apple Inc.
BootLoader constants: OS=macosx, ARCH=x86, WS=cocoa, NL=en_US
Framework arguments: -product org.eclipse.epp.package.java.product -keyring /Users/meiragoldman/.eclipse_keyring -showlocation
Command-line arguments: -os macosx -ws cocoa -arch x86 -product org.eclipse.epp.package.java.product -keyring /Users/meiragoldman/.eclipse_keyring -showlocation
!ENTRY org.eclipse.equinox.ds 4 0 2017-06-25 21:09:25.660
!MESSAGE FrameworkEvent ERROR
!STACK 0
org.osgi.framework.BundleException: Could not resolve module: org.eclipse.equinox.ds [133]
Unresolved requirement: Import-Package: org.eclipse.equinox.internal.util.event; version="1.0.0"
-> Export-Package: org.eclipse.equinox.internal.util.event; bundle-version="1.0.500.v20130404-1337"; bundle-symbolic-name="org.eclipse.equinox.util"; version="1.0.0"; x-friends:="org.eclipse.equinox.ds"
org.eclipse.equinox.util [181]
Unresolved requirement: Import-Package: org.osgi.service.cm; version="1.0.0"
at org.eclipse.osgi.container.Module.start(Module.java:434)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1582)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1562)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1533)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1476)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1)
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)
!ENTRY org.eclipse.equinox.event 4 0 2017-06-25 21:09:25.663
!MESSAGE FrameworkEvent ERROR
!STACK 0
org.osgi.framework.BundleException: Could not resolve module: org.eclipse.equinox.event [134]
Unresolved requirement: Import-Package: org.osgi.service.event; version="[1.3.0,1.4.0)"
at org.eclipse.osgi.container.Module.start(Module.java:434)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1582)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1562)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1533)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1476)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1)
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)
!ENTRY org.eclipse.ant.ui 4 0 2017-06-25 21:09:25.670
!MESSAGE FrameworkEvent ERROR
!STACK 0
org.osgi.framework.BundleException: Could not resolve module: org.eclipse.ant.ui [57]
Unresolved requirement: Require-Bundle: org.eclipse.ui.externaltools; bundle-version="[3.2.0,4.0.0)"
Unresolved requirement: Require-Bundle: org.eclipse.ui.editors; bundle-version="[3.2.0,4.0.0)"; resolution:="optional"
-> Bundle-SymbolicName: org.eclipse.ui.editors; bundle-version="3.8.200.v20140401-1310"; singleton:="true"
org.eclipse.ui.editors [348]
Unresolved requirement: Require-Bundle: org.eclipse.ui.ide; bundle-version="[3.5.0,4.0.0)"
-> Bundle-SymbolicName: org.eclipse.ui.ide; bundle-version="3.10.2.v20141118-1227"; singleton:="true"
org.eclipse.ui.ide [507]
Unresolved requirement: Require-Bundle: org.eclipse.ui; bundle-version="[3.106.0,4.0.0)"
-> Bundle-SymbolicName: org.eclipse.ui; bundle-version="3.106.1.v20141002-1150"; singleton:="true"
org.eclipse.ui [506]
Unresolved requirement: Require-Bundle: org.eclipse.ui.workbench; bundle-version="[3.105.0,4.0.0)"; visibility:="reexport"
-> Bundle-SymbolicName: org.eclipse.ui.workbench; bundle-version="3.106.2.v20150204-1030"; singleton:="true"
org.eclipse.ui.workbench [511]
Unresolved requirement: Import-Package: org.eclipse.e4.ui.internal.workbench
-> Export-Package: org.eclipse.e4.ui.internal.workbench; bundle-version="1.2.2.v20141212-1259"; bundle-symbolic-name="org.eclipse.e4.ui.workbench"; version="0.0.0"; x-friends:="org.eclipse.e4.ui.workbench.fragment, org.eclipse.e4.ui.workbench.renderers.swt, org.eclipse.e4.ui.workbench.swt, org.eclipse.ui.workbench"
org.eclipse.e4.ui.workbench [471]
Unresolved requirement: Require-Bundle: org.eclipse.e4.ui.services; bundle-version="0.9.0"
-> Bundle-SymbolicName: org.eclipse.e4.ui.services; bundle-version="1.1.0.v20140328-1925"; singleton:="true"
org.eclipse.e4.ui.services [94]
Unresolved requirement: Import-Package: org.osgi.service.event; resolution:="optional"
Unresolved requirement: Require-Bundle: org.eclipse.e4.ui.di; bundle-version="0.9.0"
-> Bundle-SymbolicName: org.eclipse.e4.ui.di; bundle-version="1.0.0.v20140328-2112"
org.eclipse.e4.ui.di [92]
Unresolved requirement: Require-Bundle: org.eclipse.e4.core.di.extensions; bundle-version="0.9.0"
-> Bundle-SymbolicName: org.eclipse.e4.core.di.extensions; bundle-version="0.12.0.v20140417-2033"; singleton:="true"
org.eclipse.e4.core.di.extensions [86]
Unresolved requirement: Require-Bundle: org.eclipse.osgi.services; bundle-version="3.2.100"
Unresolved requirement: Require-Bundle: org.eclipse.ui.ide; bundle-version="[3.2.0,4.0.0)"; resolution:="optional"
-> Bundle-SymbolicName: org.eclipse.ui.ide; bundle-version="3.10.2.v20141118-1227"; singleton:="true"
Unresolved requirement: Require-Bundle: org.eclipse.ui.workbench.texteditor; bundle-version="[3.5.0,4.0.0)"; resolution:="optional"
-> Bundle-SymbolicName: org.eclipse.ui.workbench.texteditor; bundle-version="3.9.0.v20140411-1521"; singleton:="true"
org.eclipse.ui.workbench.texteditor [363]
Unresolved requirement: Require-Bundle: org.eclipse.ui; bundle-version="[3.5.0,4.0.0)"
-> Bundle-SymbolicName: org.eclipse.ui; bundle-version="3.106.1.v20141002-1150"; singleton:="true"
Unresolved requirement: Require-Bundle: org.eclipse.ui.views; bundle-version="[3.2.0,4.0.0)"; resolution:="optional"
-> Bundle-SymbolicName: org.eclipse.ui.views; bundle-version="3.7.0.v20140408-0703"; singleton:="true"
org.eclipse.ui.views [359]
Unresolved requirement: Require-Bundle: org.eclipse.ui; bundle-version="[3.5.0,4.0.0)"
-> Bundle-SymbolicName: org.eclipse.ui; bundle-version="3.106.1.v20141002-1150"; singleton:="true"
at org.eclipse.osgi.container.Module.start(Module.java:434)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1582)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1561)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1533)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1476)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1)
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)
As per this thread the answer is:
I took the first class reporting the error,
i.e. org.eclipse.osgi
and deleted the (lock) files under under configuration/org.eclipse.osgi/.manager
Files had names starting with .fileTable
I was then able to start Eclipse without a computer reboot but did have to specify the workspace when it restarted.
Just try this solution and It will work.
We are using both spring-web and spring-websocket in our RCP application, which are both converted into bundles through the p2-maven-plugin. Below is the MANIFEST.MF file of our application.
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Todo
Bundle-SymbolicName: com.example.e4.rcp.todo;singleton:=true
Bundle-Version: 1.0.0.qualifier
Bundle-Vendor: EXAMPLE
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Require-Bundle: org.apache.commons.logging;bundle-version="1.2.0",
org.springframework.spring-aop;bundle-version="4.3.3",
org.springframework.spring-beans;bundle-version="4.3.3",
org.springframework.spring-context;bundle-version="4.3.3",
org.springframework.spring-core;bundle-version="4.3.3",
org.springframework.spring-expression;bundle-version="4.3.3",
org.springframework.spring-web;bundle-version="4.3.3",
org.eclipse.e4.ui.css.swt;bundle-version="0.12.0",
org.eclipse.e4.ui.css.swt.theme;bundle-version="0.10.0",
org.eclipse.e4.ui.workbench.addons.swt;bundle-version="1.2.0",
org.eclipse.e4.ui.workbench.renderers.swt;bundle-version="0.13.0",
org.eclipse.e4.ui.workbench.swt;bundle-version="0.13.0",
org.eclipse.swt;bundle-version="3.104.1",
org.eclipse.e4.ui.di;bundle-version="1.1.0",
org.eclipse.e4.core.services;bundle-version="2.0.100",
org.eclipse.osgi.services;bundle-version="3.5.100",
org.eclipse.e4.core.di.annotations;bundle-version="1.5.0",
org.springframework.spring-websocket;bundle-version="4.3.2",
org.springframework.spring-messaging;bundle-version="4.3.2",
javax.inject;bundle-version="1.0.0",
javax.annotation;bundle-version="1.2.0",
org.apache.tomcat.embed.tomcat-embed-core;bundle-version="8.5.4",
org.apache.tomcat.embed.tomcat-embed-websocket;bundle-version="8.5.4"
When I start the application, it popups the following error:
!SESSION 2016-11-10 09:48:03.750 -----------------------------------------------
eclipse.buildId=unknown
java.version=1.8.0_101
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_US
Framework arguments: -product com.example.e4.rcp.todo.product clearPersistedState
Command-line arguments: -product com.example.e4.rcp.todo.product -data > :\Users\wangzen\Console_prototype/../runtime-todo.product -dev > ile:C:/Users/wangzen/Console_prototype/.metadata/.plugins/org.eclipse.pde.core/to> o.product/dev.properties -os win32 -ws win32 -arch x86_64 -consoleLog > clearPersistedState
!ENTRY org.eclipse.equinox.app 0 0 2016-11-10 09:48:04.703
!MESSAGE Product com.example.e4.rcp.todo.product could not be found.
!ENTRY com.example.e4.rcp.todo 2 0 2016-11-10 09:48:04.786
!MESSAGE Could not resolve module: com.example.e4.rcp.todo [491]
Bundle was not resolved because of a uses contraint violation.
org.osgi.service.resolver.ResolutionException: Uses constraint violation. nable> to resolve resource com.example.e4.rcp.todo [osgi.identity;> sgi.identity="com.example.e4.rcp.todo"; type="osgi.bundle";> ersion:Version="1.0.0.qualifier"; singleton:="true"] because it is exposed to> ackage 'javax.servlet' from resources rg.apache.tomcat.embed.tomcat-embed-core> [osgi.identity; type="osgi.bundle"; ersion:Version="8.5.4";> sgi.identity="org.apache.tomcat.embed.tomcat-embed-core"] and javax.servlet> osgi.identity; type="osgi.bundle"; version:Version="3.1.0.v201410161800";> sgi.identity="javax.servlet"] via two dependency chains.
Chain 1:
com.example.e4.rcp.todo [osgi.identity; sgi.identity="com.example.e4.rcp.todo";> type="osgi.bundle"; ersion:Version="1.0.0.qualifier"; singleton:="true"]
require:> &(osgi.wiring.bundle=org.apache.tomcat.embed.tomcat-embed-core)(bundle-versio> >=8.5.4))
|
provide: osgi.wiring.bundle: org.apache.tomcat.embed.tomcat-embed-core
org.apache.tomcat.embed.tomcat-embed-core [osgi.identity; ype="osgi.bundle";> version:Version="8.5.4";> sgi.identity="org.apache.tomcat.embed.tomcat-embed-core"]
Chain 2:
com.example.e4.rcp.todo [osgi.identity; sgi.identity="com.example.e4.rcp.todo";> type="osgi.bundle"; ersion:Version="1.0.0.qualifier"; singleton:="true"]
require:> &(osgi.wiring.bundle=org.springframework.spring-web)(bundle-version>=4.3.3))
|
provide: osgi.wiring.bundle; bundle-version:Version="4.3.3.RELEASE";> sgi.wiring.bundle="org.springframework.spring-web"
org.springframework.spring-web [osgi.identity; type="osgi.bundle";> ersion:Version="4.3.3.RELEASE"; osgi.identity="org.springframework.spring-web"]
import: (osgi.wiring.package=javax.servlet)
|
export: osgi.wiring.package: javax.servlet
javax.servlet [osgi.identity; type="osgi.bundle";> ersion:Version="3.1.0.v201410161800"; osgi.identity="javax.servlet"]
!ENTRY org.eclipse.osgi 4 0 2016-11-10 09:48:04.787
!MESSAGE Application error
!STACK 1
java.lang.RuntimeException: No application id has been found.
at org.eclipse.equinox.internal.app.EclipseAppContainer.startDefaultApp(EclipseAppContainer.java:242)
at org.eclipse.equinox.internal.app.MainApplicationLauncher.run(MainApplicationLauncher.java:29)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:673)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:610)
at org.eclipse.equinox.launcher.Main.run(Main.java:1519)
at org.eclipse.equinox.launcher.Main.main(Main.java:1492)
gogo: InterruptedException: sleep interrupted
java.lang.InterruptedException: sleep interrupted
at java.lang.Thread.sleep(Native Method)
at org.apache.felix.gogo.shell.Activator.run(Activator.java:72)
at java.lang.Thread.run(Thread.java:745)
An error has occurred. See the log file
C:\Users\wangzen\runtime-todo.product\.metadata\.log.
It seems the problem is caused by both org.apache.tomcat.embed.tomcat-embed-core and org.springframework.spring-web have dependency chain to javax.servlet. However after I removed the tomcat libraries, it tells me another error as below:
java.lang.NoClassDefFoundError: org/apache/tomcat/InstanceManagerBindings
at org.apache.tomcat.websocket.WsSession.<init>(WsSession.java:187)
at org.apache.tomcat.websocket.WsWebSocketContainer.connectToServer(WsWebSocketContainer.java:403)
at org.springframework.web.socket.client.standard.StandardWebSocketClient$1.call(StandardWebSocketClient.java:150)
at org.springframework.web.socket.client.standard.StandardWebSocketClient$1.call(StandardWebSocketClient.java:147)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.ClassNotFoundException: org.apache.tomcat.InstanceManagerBindings cannot be found by org.apache.tomcat.embed.tomcat-embed-websocket_8.5.4
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:448)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:361)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:353)
at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:161)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
UPDATE
What I've tried:
By checking the dependencies from Plug-in Dependencies tool offered by Eclipse, which shows as following screenshot, I found that org.apache.tomcat.embed.tomcat-embed-core and org.apache.tomcat.embed.tomcat-embed-websocket might not be necessary for my application, so I removed these two bundles and restart my application.
However there comes another error message as below:
java.lang.NoClassDefFoundError: org/apache/tomcat/InstanceManagerBindings
at org.apache.tomcat.websocket.WsSession.<init>(WsSession.java:187)
at org.apache.tomcat.websocket.WsWebSocketContainer.connectToServer(WsWebSocketContainer.java:403)
at org.springframework.web.socket.client.standard.StandardWebSocketClient$1.call(StandardWebSocketClient.java:150)
at org.springframework.web.socket.client.standard.StandardWebSocketClient$1.call(StandardWebSocketClient.java:147)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.ClassNotFoundException: org.apache.tomcat.InstanceManagerBindings cannot be found by org.apache.tomcat.embed.tomcat-embed-websocket_8.5.4
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:448)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:361)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:353)
at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:161)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 6 more
Also I tried replacing Require-Bundle with Import-Package when importing these third party libraries as following:
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Todo
Bundle-SymbolicName: com.example.e4.rcp.todo;singleton:=true
Bundle-Version: 1.0.0.qualifier
Bundle-Vendor: EXAMPLE
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Require-Bundle: org.eclipse.e4.ui.css.swt;bundle-version="0.12.0",
org.eclipse.e4.ui.css.swt.theme;bundle-version="0.10.0",
org.eclipse.e4.ui.workbench.addons.swt;bundle-version="1.2.0",
org.eclipse.e4.ui.workbench.renderers.swt;bundle-version="0.13.0",
org.eclipse.e4.ui.workbench.swt;bundle-version="0.13.0",
org.eclipse.swt;bundle-version="3.104.1",
org.eclipse.e4.ui.di;bundle-version="1.1.0",
org.eclipse.e4.core.services;bundle-version="2.0.100",
org.eclipse.osgi.services;bundle-version="3.5.100",
org.eclipse.e4.core.di.annotations;bundle-version="1.5.0",
javax.inject;bundle-version="1.0.0",
javax.annotation;bundle-version="1.2.0"
Import-Package: org.apache.tomcat,
org.springframework.http,
org.springframework.http.client,
org.springframework.http.client.support,
org.springframework.messaging.converter,
org.springframework.messaging.simp.stomp,
org.springframework.scheduling,
org.springframework.scheduling.concurrent,
org.springframework.util,
org.springframework.web.client,
org.springframework.web.socket.client,
org.springframework.web.socket.client.standard,
org.springframework.web.socket.messaging,
org.springframework.web.socket.sockjs.client
However it still popup the same error notify me that org.apache.tomcat.InstanceManagerBindings cannot be found by org.apache.tomcat.embed.tomcat-embed-websocket_8.5.4
You are facing several problems here. The first one is that you use require bundle all over the place. The problem with require bundle is that you are always exposed to all packages a bundle offers. This will increase the probability of uses chain contraint violations. You should try to use Import-Package instead.
The other problem is that spring does not support OSGi anymore. So using spring libraries in OSGi is very likely to create problems as they simply do not test their code in OSGi.
If you need websocket support then a better choice might be pax web. It runs with tomcat or jetty and wraps them in an OSGi compatbile way.
Unfortunately there is no example for pax-web or plain jetty in eclipse. To see what bundles you need you can start apache karaf and install the http feature. Then you can look into the bundles it installs and use the same in eclipse rcp.
Add a version info to your javax.servlet import package so OSGi can decide wich dependency chain to use.
javax.servlet;version="3.1.0"
I hava an Eclipse E4 application. I want to have a runnable exe file. The export of the exe file don't got any errors. But when I start the exported application the program doesn't start and give those errors:
!SESSION 2016-08-29 08:55:19.759 -----------------------------------------------
eclipse.buildId=unknown
java.version=1.8.0_102
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_US
Framework arguments: -clearPersistedState
Command-line arguments: -os win32 -ws win32 -arch x86_64 -clearPersistedState
!ENTRY CR-IT_client 4 0 2016-08-29 08:55:20.930
!MESSAGE FrameworkEvent ERROR
!STACK 0
org.osgi.framework.BundleException: Could not resolve module: CR-IT_client [26]
Unresolved requirement: Require-Bundle: org.eclipse.equinox.launcher; bundle-version="1.3.100"
at org.eclipse.osgi.container.Module.start(Module.java:434)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1582)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1561)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1533)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1476)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1)
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)
!ENTRY org.eclipse.equinox.app 0 0 2016-08-29 08:55:21.309
!MESSAGE Product CR-IT_client.product could not be found.
!ENTRY org.eclipse.equinox.launcher.win32.win32.x86_64 2 0 2016-08-29 08:55:21.653
!MESSAGE Could not resolve module: org.eclipse.equinox.launcher.win32.win32.x86_64 [40]
Unresolved requirement: Fragment-Host: org.eclipse.equinox.launcher; bundle-version="[1.0.0,1.4.0)"
!ENTRY CR-IT_client 2 0 2016-08-29 08:55:21.653
!MESSAGE Could not resolve module: CR-IT_client [26]
Unresolved requirement: Require-Bundle: org.eclipse.equinox.launcher; bundle-version="1.3.100"
!ENTRY org.eclipse.osgi 4 0 2016-08-29 08:55:21.654
!MESSAGE Application error
!STACK 1
java.lang.NullPointerException
at org.eclipse.emf.common.util.URI$URIPool$PlatformAccessUnit.setValue(URI.java:865)
at org.eclipse.emf.common.util.URI$URIPool.intern(URI.java:1949)
at org.eclipse.emf.common.util.URI.createPlatformPluginURI(URI.java:2718)
at org.eclipse.e4.ui.internal.workbench.swt.E4Application.determineApplicationModelURI(E4Application.java:426)
at org.eclipse.e4.ui.internal.workbench.swt.E4Application.loadApplicationModel(E4Application.java:350)
at org.eclipse.e4.ui.internal.workbench.swt.E4Application.createE4Workbench(E4Application.java:254)
at org.eclipse.e4.ui.internal.workbench.swt.E4Application.start(E4Application.java:145)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:380)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:235)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:669)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:608)
at org.eclipse.equinox.launcher.Main.run(Main.java:1515)
In Eclipse IDE it can run, but when I export it I got an error.
Someone that can help me with this?
The org.eclipse.equinox.launcher plug-in is missing from the build (or possibly it is present but has the wrong version).
The configuration of plug-ins included in the RCP is separate from the configuration for the plug-ins used when you test your RCP from within Eclipse.
If you are using a '.product' file for the RCP go to the 'Contents' tab in the .product file editor and click the 'Add Required' button to add all the required plugins to the product. For a normal RCP there should be something like 100+ plugins in the contents list. Then rebuild the RCP.
In the above I am assuming you are using a 'plug-ins based' product configuration.