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"
Related
I am trying to migrate eclipse RCP application ( Eclipse 3.7 to Eclipse 4.8). I copied all the latest required plugins from Eclipse 4.8 and updated our RCP plugins.
Could someone help me in understanding what all needs to be modified apart from updating the required plugins to latest version ( in my case , to Eclipse photon 4.8)
I am facing an error when i try to launch the application by using the existing config.ini file with the latest set of plugins in my plugins folder
PS : i am able to launch the application from the Eclipse Via Run configuration
I am getting an error when i try to launch the rcp application using the exisiting *.exe and config.ini files Error is displayed as "Ensure that the org.eclipse.core.runtime bundle is resolved and started (see config.ini)."
In Config.ini , the osgi.bundles value is specified as osgi.bundles=org.eclipse.core.runtime#start,\ org.eclipse.equinox.common#start,\ org.eclipse.update.configurator,\ org.eclipse.equinox.launcher.win32.win32.x86
Below is the detailed error log , javax.inject and org.eclipse.core.jobs relevant version jars are available in the plugin folder but still i am getting this error , any clue what could be the cause?
!ENTRY org.eclipse.core.runtime 4 0 2018-09-07 11:26:32.798
!MESSAGE FrameworkEvent ERROR
!STACK 0
org.osgi.framework.BundleException: Could not resolve module: org.eclipse.core.runtime [1]
Unresolved requirement: Require-Bundle: javax.inject; bundle-version="1.0.0"; visibility:="reexport"; resolution:="optional"
Unresolved requirement: Require-Bundle: org.eclipse.core.jobs; bundle-version="[3.2.0,4.0.0)"; visibility:="reexport"
at org.eclipse.osgi.container.Module.start(Module.java:444)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1682)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1662)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1624)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1555)
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.osgi 4 0 2018-09-07 11:26:32.807
!MESSAGE Bundle initial#reference:file:plugins/org.eclipse.core.runtime_3.14.0.v20180417-0825.jar was not resolved.
!ENTRY org.eclipse.equinox.launcher.win32.win32.x86 2 0 2018-09-07 11:26:32.811
!MESSAGE Could not resolve module: org.eclipse.equinox.launcher.win32.win32.x86 [4]
Unresolved requirement: Fragment-Host: org.eclipse.equinox.launcher; bundle-version="[1.0.0,1.6.0)"
Unresolved requirement: Fragment-Host: org.eclipse.equinox.launcher; bundle-version="[1.0.0,1.6.0)"
!ENTRY org.eclipse.core.runtime 2 0 2018-09-07 11:26:32.812
!MESSAGE Could not resolve module: org.eclipse.core.runtime [1]
Unresolved requirement: Require-Bundle: javax.inject; bundle-version="1.0.0"; visibility:="reexport"; resolution:="optional"
Unresolved requirement: Require-Bundle: org.eclipse.core.jobs; bundle-version="[3.2.0,4.0.0)"; visibility:="reexport"
!ENTRY org.eclipse.osgi 4 0 2018-09-07 11:26:32.815
!MESSAGE Application error
!STACK 1
java.lang.IllegalStateException: Unable to acquire application service. Ensure that the org.eclipse.core.runtime bundle is resolved and started (see config.ini).
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:78)
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:497)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:656)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:592)
at org.eclipse.equinox.launcher.Main.run(Main.java:1498)
That osgi.bundles doesn't look right as it is only starting two plugins.
If you are using a xxx.product file to configure the RCP select the 'generate a default config.ini' option on the 'Configuration' tab to get Eclipse PDE to build the config.ini for you.
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.
I have some problems getting JUnit plug-in tests to work using Eclipse Neon M7 and I'd really like input from anybody out there who uses tests (there has to be somebody, right?).
Whenever I start a test that works in Eclipse Luna (but didn't in Mars, which I assumed was a bug) and continues to work using Tycho I get the following exception:
!SESSION 2016-05-11 10:25:41.456 -----------------------------------------------
eclipse.buildId=unknown
java.version=1.8.0_73
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US
Framework arguments: -version 3 -port 60297 -testLoaderClass org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader -loaderpluginname org.eclipse.jdt.junit4.runtime -classNames org.acme.test.test.core.ActivatorTest -application org.eclipse.pde.junit.runtime.uitestapplication -testApplication org.eclipse.ui.ide.workbench -testpluginname test.core
Command-line arguments: -os win32 -ws win32 -arch x86 -consoleLog -version 3 -port 60297 -testLoaderClass org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader -loaderpluginname org.eclipse.jdt.junit4.runtime -classNames org.acme.test.test.core.ActivatorTest -application org.eclipse.pde.junit.runtime.uitestapplication -testApplication org.eclipse.ui.ide.workbench -data C:\workspaces\MyWorkspace/../junit-workspace -dev file:C:/workspaces/MyWorkspace/.metadata/.plugins/org.eclipse.pde.core/pde-junit/dev.properties -os win32 -ws win32 -arch x86 -consoleLog -testpluginname test.core
!ENTRY org.eclipse.pde.junit.runtime 4 0 2016-05-11 10:25:42.373
!MESSAGE FrameworkEvent ERROR
!STACK 0
org.osgi.framework.BundleException: Could not resolve module: org.eclipse.pde.junit.runtime [81]
Unresolved requirement: Require-Bundle: org.eclipse.core.runtime; bundle-version="[3.11.0,4.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: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.pde.junit.runtime 2 0 2016-05-11 10:25:42.719
!MESSAGE Could not resolve module: org.eclipse.pde.junit.runtime [81]
Unresolved requirement: Require-Bundle: org.eclipse.core.runtime; bundle-version="[3.11.0,4.0.0)"
!ENTRY org.eclipse.osgi 4 0 2016-05-11 10:25:42.720
!MESSAGE Application error
!STACK 1
java.lang.RuntimeException: Application "org.eclipse.pde.junit.runtime.uitestapplication" could not be found in the registry. The applications available are: org.eclipse.ant.core.antRunner, org.eclipse.ui.ide.workbench, org.eclipse.help.base.infocenterApplication, org.eclipse.help.base.helpApplication, org.eclipse.help.base.indexTool, org.acme.test.rxp.rxpdemo, org.eclipse.equinox.app.error.
at org.eclipse.equinox.internal.app.EclipseAppContainer.startDefaultApp(EclipseAppContainer.java:248)
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:382)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:236)
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:622)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
at org.eclipse.equinox.launcher.Main.main(Main.java:1386)
Clearly it's not a Eclipse bug at this point, but I'm doing something wrong. There is no indication what kind of plug-ins are started in the test, but judging from the version ranges I assume it's the wrong ones again - the plug-ins of the running Eclipse instance instead of the plug-ins defined in the workspace's target platform.
Still the launch configuration claims the later target platform is used.
How do I configure a plug-in unit test so that it will take the currently active target platform?
The problem here is that Eclipse 4.4 (Luna, 2014) and below had a version of org.eclipse.core.runtime that was compatible with the host Eclipse version of org.eclipse.pde.junit.runtime. That changed with 4.5 when the dependency increased.
As you have correctly concluded that the configuration is pointing at the wrong org.eclipse.pde.junit.runtime. This is probably due to uncleared configuration state. Ensure that the configuration is being cleared, so you don't run with a stale version. That is ensure that Clear the configuration area before launching is checked in the Configuration tab of launch configuration.
You can see exactly what PDE has resolved as the configured bundles by looking at ${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/pde-junit/org.eclipse.equinox.simpleconfigurator/bundles.info (location specified in Configuration tab of launch configuration)
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.
Since I have downloaded a fresh install for my Eclipse, it can't start anymore. An error message says "An error has occurred See the log file /Applications/eclipse/configuration/1323191649568.log."
I have already deleted all the files and folders about Eclipse an Java Runtime several times before installing again. And, the command ./eclipse -clean give me the same error.
Any idea?
Here the log:
!SESSION 2011-12-07 01:27:30.742 -----------------------------------------------
eclipse.buildId=M20110909-1335
java.version=1.6.0_29
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/Julien/.eclipse_keyring -showlocation
Command-line arguments: -os macosx -ws cocoa -arch x86 -product org.eclipse.epp.package.java.product -keyring /Users/Julien/.eclipse_keyring -showlocation
!ENTRY org.eclipse.equinox.p2.core 4 0 2011-12-07 01:27:31.721
!MESSAGE Provisioning exception
!STACK 1
org.eclipse.equinox.p2.core.ProvisionException: Unknown repository type at file:/Applications/eclipse/configuration/org.eclipse.osgi/bundles/126/data/listener_1925729951/.
at org.eclipse.equinox.internal.p2.repository.helpers.AbstractRepositoryManager.fail(AbstractRepositoryManager.java:393)
at org.eclipse.equinox.internal.p2.repository.helpers.AbstractRepositoryManager.doCreateRepository(AbstractRepositoryManager.java:282)
at org.eclipse.equinox.internal.p2.metadata.repository.MetadataRepositoryManager.createRepository(MetadataRepositoryManager.java:41)
at org.eclipse.equinox.internal.provisional.p2.directorywatcher.RepositoryListener.initializeMetadataRepository(RepositoryListener.java:109)
at org.eclipse.equinox.internal.provisional.p2.directorywatcher.RepositoryListener.<init>(RepositoryListener.java:59)
at org.eclipse.equinox.internal.p2.reconciler.dropins.DropinsRepositoryListener.<init>(DropinsRepositoryListener.java:82)
at org.eclipse.equinox.internal.p2.reconciler.dropins.Activator.watchDropins(Activator.java:532)
at org.eclipse.equinox.internal.p2.reconciler.dropins.Activator.start(Activator.java:172)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl$1.run(BundleContextImpl.java:711)
at java.security.AccessController.doPrivileged(Native Method)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:702)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:683)
at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:381)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.resume(AbstractBundle.java:389)
at org.eclipse.osgi.framework.internal.core.Framework.resumeBundle(Framework.java:1131)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:559)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:544)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.incFWSL(StartLevelManager.java:457)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLevel(StartLevelManager.java:243)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:438)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.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)
!SUBENTRY 1 org.eclipse.equinox.p2.metadata.repository 4 1005 2011-12-07 01:27:31.722
!MESSAGE Unknown repository type at file:/Applications/eclipse/configuration/org.eclipse.osgi/bundles/126/data/listener_1925729951/.
!ENTRY org.eclipse.equinox.p2.reconciler.dropins 4 0 2011-12-07 01:27:31.725
!MESSAGE FrameworkEvent ERROR
!STACK 0
org.osgi.framework.BundleException: Exception in org.eclipse.equinox.internal.p2.reconciler.dropins.Activator.start() of bundle org.eclipse.equinox.p2.reconciler.dropins.
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:734)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:683)
at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:381)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.resume(AbstractBundle.java:389)
at org.eclipse.osgi.framework.internal.core.Framework.resumeBundle(Framework.java:1131)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:559)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:544)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.incFWSL(StartLevelManager.java:457)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLevel(StartLevelManager.java:243)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:438)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.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)
Caused by: java.lang.IllegalStateException: Could not create metadata repository for: file:/Applications/eclipse/configuration/org.eclipse.osgi/bundles/126/data/listener_1925729951/
at org.eclipse.equinox.internal.provisional.p2.directorywatcher.RepositoryListener.initializeMetadataRepository(RepositoryListener.java:112)
at org.eclipse.equinox.internal.provisional.p2.directorywatcher.RepositoryListener.<init>(RepositoryListener.java:59)
at org.eclipse.equinox.internal.p2.reconciler.dropins.DropinsRepositoryListener.<init>(DropinsRepositoryListener.java:82)
at org.eclipse.equinox.internal.p2.reconciler.dropins.Activator.watchDropins(Activator.java:532)
at org.eclipse.equinox.internal.p2.reconciler.dropins.Activator.start(Activator.java:172)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl$1.run(BundleContextImpl.java:711)
at java.security.AccessController.doPrivileged(Native Method)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:702)
... 12 more
Root exception:
java.lang.IllegalStateException: Could not create metadata repository for: file:/Applications/eclipse/configuration/org.eclipse.osgi/bundles/126/data/listener_1925729951/
at org.eclipse.equinox.internal.provisional.p2.directorywatcher.RepositoryListener.initializeMetadataRepository(RepositoryListener.java:112)
at org.eclipse.equinox.internal.provisional.p2.directorywatcher.RepositoryListener.<init>(RepositoryListener.java:59)
at org.eclipse.equinox.internal.p2.reconciler.dropins.DropinsRepositoryListener.<init>(DropinsRepositoryListener.java:82)
at org.eclipse.equinox.internal.p2.reconciler.dropins.Activator.watchDropins(Activator.java:532)
at org.eclipse.equinox.internal.p2.reconciler.dropins.Activator.start(Activator.java:172)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl$1.run(BundleContextImpl.java:711)
at java.security.AccessController.doPrivileged(Native Method)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:702)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:683)
at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:381)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.resume(AbstractBundle.java:389)
at org.eclipse.osgi.framework.internal.core.Framework.resumeBundle(Framework.java:1131)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:559)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:544)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.incFWSL(StartLevelManager.java:457)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLevel(StartLevelManager.java:243)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:438)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.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.osgi 4 0 2011-12-07 01:27:31.810
!MESSAGE Application error
!STACK 1
org.osgi.service.application.ApplicationException: No application id has been found.
at org.eclipse.equinox.internal.app.EclipseAppContainer.startDefaultApp(EclipseAppContainer.java:262)
at org.eclipse.equinox.internal.app.MainApplicationLauncher.run(MainApplicationLauncher.java:29)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:344)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
Try deleting:
/YOUR PATH TO WORKSPACE/.metadata/.plugins/org.eclipse.core.resources
Finally, I have solved my problem by myself.
I "simply" re-installed Java. The manipulation is a bit tricky because Java is a part of OSX System and it not supposed to be uninstalled.
How to uninstall Java on OSX?
Download the last update from Apple website (Java for OS X Lion Update 1 - http://support.apple.com/kb/DL1421)
Delete /Library/Java, /System/Library/Java, Library/Caches/Java folders
Open the Terminal with root (sudo -s)
Terminal: pkgutil --packages | grep java
Terminal: pkgutil --forget com.apple.pkg.xxxxx (everything about Java)
Insert the Mac OS X DVD
Terminal: installer -verbose -pkg "/Volumes/Mac OS X Install DVD/System/Installation/Packages/Java.pkg" -target "/Volumes/Macintosh HD"
Terminal: installer -verbose -pkg "/Volumes/Mac OS X Install DVD/System/Installation/Packages/JavaTools.pkg" -target "/Volumes/Macintosh HD"
Install the Java for OS X previously downloaded
Reboot
Software update if needed.
source: http://hints.macworld.com/article.php?story=2009051215025819
try some of the suggestions here: my eclipse stopped working today
especially using terminal to run
./eclipse -clean
other potential solutions are these:
When downloading all the Eclipse/Java parts, be sure to save and unpack to an HFS+ partition. If you have, say, a FAT32 partition and save/unpack to there, that will cause installation problems (it happened to me).
Also, there may be issues with the 32-bit/64-bit installers.. be sure to pick the right one
Try deleting the entire metadata folder
/YOUR PATH TO WORKSPACE/.metadata
I faced similar issue. The eclipse was not loading in Mac system.
Referred solution provided in the link:
Eclipse Kepler crashes in a certain workspace
As per suggestion, I deleted both:
1) eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources
2) .metadata/.plugins/org.eclipse.e4.workbench/workbench.xmi
Now eclipse is loading without any issues.
Delete the hidden file titled ".lock" from the workspace directory, that should do the trick.