I am trying to create an Eclipse E4 RCP application that connects to a CouchDB server using the Cloudant Java API. I am able to pull in the Cloudant jar via Maven in the target-platform file, but I have 2 issues.
The annotations in com.google.code.findbugs:jsr305:3.0.2 conflict with the required #PostConstruct annotations in javax.annotation. To work around this I excluded jsr305 using the target-platform file. Without doing this, the standard E4 UI Part class would not compile with the #PostConstruct annotation.
Now I can get the GUI to run and have it set to test a connection to the DB when a button is pressed, but when I press the button and try to connect to a DB using the Cloudant API, I receive NoClassDefFoundError: okhttp3/JavaNetCookieJar Looking at the stack trace (below) the Cloudant classes are available, but not the okhttp3 JavaNetCookieJar class. This seems weird in that some of the classes pulled in via maven dependencie are available but not all of them.
Here is the relevant part of my target-platform file:
<location includeDependencyDepth="infinite" includeDependencyScopes="compile" includeSource="true" missingManifest="generate" type="Maven">
<dependencies>
<dependency>
<groupId>com.ibm.cloud</groupId>
<artifactId>cloudant</artifactId>
<version>0.2.0</version>
<type>jar</type>
</dependency>
</dependencies>
<exclude>com.google.code.findbugs:jsr305:3.0.2</exclude>
</location>
I have tried to build this using a standard "Hello World" maven project and the same example DB code, and it works fine when telling maven to bundle all the jars together.
All the classes are listed under Plug-in Dependencies, see image here.
Note that the package name okhttp3 exists in 2 jars (okhttp-4.10.0 and okhttp-urlconnection-4.10.0), It seems like eclipse (and Tycho) only pull in the first instance of the package name.
Full stack trace (with proprietary info removed):
eclipse.buildId=unknown
java.version=17.0.2
java.vendor=Eclipse Adoptium
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_US
Framework arguments: -product com.name.ui.product -clearPersistedState
Command-line arguments: -product com.name.ui.product -data C:\name/../runtime-name.product -dev file:C:/name/.metadata/.plugins/org.eclipse.pde.core/name.product/dev.properties -os win32 -ws win32 -arch x86_64 -consoleLog -clearPersistedState
!ENTRY org.eclipse.e4.ui.workbench 4 0 2022-07-26 10:33:00.794
!MESSAGE Internal Error
!STACK 0
java.lang.NoClassDefFoundError: okhttp3/JavaNetCookieJar
at com.ibm.cloud.sdk.core.http.ServiceCookieJar.<init>(ServiceCookieJar.java:37)
at com.ibm.cloud.cloudant.security.CouchDbSessionAuthenticator.<init>(CouchDbSessionAuthenticator.java:84)
at com.ibm.cloud.cloudant.security.CouchDbSessionAuthenticator.newAuthenticator(CouchDbSessionAuthenticator.java:69)
at com.ibm.cloud.cloudant.internal.DelegatingAuthenticatorFactory.createAuthenticator(DelegatingAuthenticatorFactory.java:54)
at com.ibm.cloud.cloudant.internal.DelegatingAuthenticatorFactory.getAuthenticator(DelegatingAuthenticatorFactory.java:40)
at com.ibm.cloud.cloudant.v1.Cloudant.newInstance(Cloudant.java:185)
at com.ibm.cloud.cloudant.v1.Cloudant.newInstance(Cloudant.java:174)
at com.name.db.DbTest.doTest(DbTest.java:28)
at com.name.ui.parts.ViewPart$1.widgetSelected(ViewPart.java:38)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:252)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4243)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1063)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4060)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3632)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1155)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1046)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:155)
at org.eclipse.e4.ui.internal.workbench.swt.E4Application.start(E4Application.java:168)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:203)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:136)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
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:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:659)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:596)
at org.eclipse.equinox.launcher.Main.run(Main.java:1467)
at org.eclipse.equinox.launcher.Main.main(Main.java:1440)
Caused by: java.lang.ClassNotFoundException: okhttp3.JavaNetCookieJar cannot be found by wrapped.com.ibm.cloud.sdk-core_9.17.3
at org.eclipse.osgi.internal.loader.BundleLoader.generateException(BundleLoader.java:529)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass0(BundleLoader.java:475)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:416)
at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:168)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:520)
... 33 more
Related
When Im trying create a new FXML File in Eclipse (File -> New -> Other -> JavaFX - new FXML Document -> Next) nothing happens. It doesnt create a File. Same Problem when I try to create FXGraph or JavaFX HTML Template whatever those are. After I try to create I get this Error Message :
eclipse.buildId=4.26.0.20221201-1200
java.version=17.0.5
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=de_DE
Framework arguments: -product org.eclipse.epp.package.java.product
Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.java.product
org.eclipse.ui
Error
Sun Dec 11 06:12:31 CET 2022
Unhandled event loop exception
java.lang.NoClassDefFoundError: org/eclipse/jface/databinding/swt/WidgetProperties
at org.eclipse.fx.ide.ui.wizards.AbstractJDTElementPage.createControl(AbstractJDTElementPage.java:109)
at org.eclipse.jface.wizard.Wizard.createPageControls(Wizard.java:178)
at org.eclipse.jface.wizard.WizardDialog.createPageControls(WizardDialog.java:744)
at org.eclipse.jface.wizard.WizardDialog.setWizard(WizardDialog.java:1182)
at org.eclipse.jface.wizard.WizardDialog.updateForPage(WizardDialog.java:1235)
at org.eclipse.jface.wizard.WizardDialog.lambda$3(WizardDialog.java:1223)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:74)
at org.eclipse.jface.wizard.WizardDialog.showPage(WizardDialog.java:1223)
at org.eclipse.jface.wizard.WizardDialog.nextPressed(WizardDialog.java:918)
at org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDialog.java:469)
at org.eclipse.jface.dialogs.Dialog.lambda$0(Dialog.java:619)
at org.eclipse.swt.events.SelectionListener$1.widgetSelected(SelectionListener.java:84)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:252)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4256)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1066)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4054)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3642)
at org.eclipse.jface.window.Window.runEventLoop(Window.java:823)
at org.eclipse.jface.window.Window.open(Window.java:799)
at org.eclipse.ui.internal.handlers.WizardHandler$New.executeHandler(WizardHandler.java:263)
at org.eclipse.ui.internal.handlers.WizardHandler.execute(WizardHandler.java:283)
at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:283)
at org.eclipse.ui.internal.handlers.E4HandlerProxy.execute(E4HandlerProxy.java:97)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:58)
at org.eclipse.e4.core.internal.di.InjectorImpl.invokeUsingClass(InjectorImpl.java:317)
at org.eclipse.e4.core.internal.di.InjectorImpl.invoke(InjectorImpl.java:251)
at org.eclipse.e4.core.contexts.ContextInjectionFactory.invoke(ContextInjectionFactory.java:173)
at org.eclipse.e4.core.commands.internal.HandlerServiceHandler.execute(HandlerServiceHandler.java:156)
at org.eclipse.core.commands.Command.executeWithChecks(Command.java:488)
at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:485)
at org.eclipse.e4.core.commands.internal.HandlerServiceImpl.executeHandler(HandlerServiceImpl.java:213)
at org.eclipse.ui.internal.handlers.LegacyHandlerService.executeCommand(LegacyHandlerService.java:389)
at org.eclipse.ui.internal.actions.CommandAction.runWithEvent(CommandAction.java:142)
at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:580)
at org.eclipse.jface.action.ActionContributionItem.lambda$4(ActionContributionItem.java:414)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4256)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1066)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4054)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3642)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1155)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1046)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:155)
at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:643)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:550)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:171)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:152)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:203)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:136)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:402)
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:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:659)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:596)
at org.eclipse.equinox.launcher.Main.run(Main.java:1467)
at org.eclipse.equinox.launcher.Main.main(Main.java:1440)
Caused by: java.lang.ClassNotFoundException: org.eclipse.jface.databinding.swt.WidgetProperties cannot be found by org.eclipse.fx.ide.ui_3.8.0.202204150904
... 67 more
I tried to reinstall JavaFX and SceneBuilder but it changed nothing.
Reinstalling Eclipse Software also wasnt helping.
It looks like e(fx)clipse hasn't been updated for 2022-12, which removed some DataBinding APIs.
You can open an issue at https://github.com/eclipse-efx/efxclipse-eclipse/issues, but if you can work up a pull request to fix it, that'll probably move things along far more quickly.
I found a workaround to this problem.
Create a new JavaFX Project
Eclipse Project Creation Wizard Selection Screen
Rename the FXMLDocument to something unique
JavaFX Project Navigator Display
Right-click and copy the .FXML file from the bogus project you just created
Right-click in your real project and paste the .FXML file into the actual project
New .FXML file is in the original JavaFX Project
Delete the bogus JavaFX Project to clean up
Nod sagely and pat yourself on the back
I had the same problem, it was because I was using eclipse 12-2022. Just downgrade it to eclispe 09-2022.
My project builds and tests under Eclipse, and the exported product runs fine.
The same project fails the UI tests, and the exported product also fails on running when compiled using maven.
My goal is to be able to use maven.
Source: https://github.com/magwas/zenta/tree/62066a22663d90fd6f036c9b6b5f34911f875bd1
The difference between file lists for the two generated products (DATE denotes a date-like string, which is different for the two products; when there is no .jar ending, then there is a directory with additional contents instead of a jar file. The packaged jre for the eclipse version is openjdk 8):
--- Zenta.eclipse.list 2016-01-23 22:39:30.783376017 +0100
+++ Zenta.mvn.list 2016-01-23 22:39:30.803376017 +0100
## -1,511 +1,27 ##
+./Zenta/artifacts.xml
-./Zenta/.eclipseproduct
./Zenta/icon.xpm
-./Zenta/jre
+./Zenta/p2
-./Zenta/plugins/org.eclipse.draw2d_3.9.101.201408150207.jar
+./Zenta/plugins/org.eclipse.draw2d_3.10.1.201508170204.jar
-./Zenta/plugins/org.rulez.magwas.zenta.canvas_2.4.0.DATE
-./Zenta/plugins/org.rulez.magwas.zenta.editor_2.4.0.DATE
-./Zenta/plugins/org.rulez.magwas.zenta.export_2.2.0.DATE
+./Zenta/plugins/org.rulez.magwas.zenta.canvas_2.4.0.DATE.jar
+./Zenta/plugins/org.rulez.magwas.zenta.editor_2.4.0.DATE.jar
+./Zenta/plugins/org.rulez.magwas.zenta.export_2.2.0.DATE.jar
./Zenta/plugins/org.rulez.magwas.zenta.help_2.4.0.DATE
-./Zenta/plugins/org.rulez.magwas.zenta.model_2.4.0.DATE
-./Zenta/plugins/org.rulez.magwas.zenta.templates_2.4.0.DATE
-./Zenta/plugins/org.rulez.magwas.zenta.widgets_2.4.0.DATE
+./Zenta/plugins/org.rulez.magwas.zenta.model_2.4.0.DATE.jar
+./Zenta/plugins/org.rulez.magwas.zenta.templates_2.4.0.DATE.jar
+./Zenta/plugins/org.rulez.magwas.zenta.widgets_2.4.0.DATE.jar
-./Zenta/plugins/org.w3c.dom.smil_1.0.0.v200806040011.jar
+./Zenta/plugins/org.w3c.dom.smil_1.0.1.v200903091627.jar
-./Zenta/plugins/uk.ac.bolton.jdom_1.1.1.DATE
+./Zenta/plugins/uk.ac.bolton.jdom_1.1.1.DATE.jar
+./Zenta/Zenta.ini
The log file of running the maven-built product:
!SESSION 2016-01-23 23:00:47.725 -----------------------------------------------
eclipse.buildId=unknown
java.version=1.8.0_72-internal
java.vendor=Oracle Corporation
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_US
Command-line arguments: -os linux -ws gtk -arch x86_64
!ENTRY org.eclipse.osgi 4 0 2016-01-23 23:00:48.935
!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:380)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:235)
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:648)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:603)
at org.eclipse.equinox.launcher.Main.run(Main.java:1465)
at org.eclipse.equinox.launcher.Main.main(Main.java:1438)
org.eclipse.core.runtime seems to be the same for both:
$ find |grep org.eclipse.core.runtime
./Zenta.eclipse/Zenta/plugins/org.eclipse.core.runtime_3.10.0.v20140318-2214.jar
./Zenta.eclipse/Zenta/plugins/org.eclipse.core.runtime.compatibility.registry_3.5.300.v20140128-0851
./Zenta.eclipse/Zenta/plugins/org.eclipse.core.runtime.compatibility.registry_3.5.300.v20140128-0851/.api_description
./Zenta.eclipse/Zenta/plugins/org.eclipse.core.runtime.compatibility.registry_3.5.300.v20140128-0851/META-INF
./Zenta.eclipse/Zenta/plugins/org.eclipse.core.runtime.compatibility.registry_3.5.300.v20140128-0851/META-INF/ECLIPSE_.SF
./Zenta.eclipse/Zenta/plugins/org.eclipse.core.runtime.compatibility.registry_3.5.300.v20140128-0851/META-INF/ECLIPSE_.RSA
./Zenta.eclipse/Zenta/plugins/org.eclipse.core.runtime.compatibility.registry_3.5.300.v20140128-0851/META-INF/MANIFEST.MF
./Zenta.eclipse/Zenta/plugins/org.eclipse.core.runtime.compatibility.registry_3.5.300.v20140128-0851/fragment.properties
./Zenta.eclipse/Zenta/plugins/org.eclipse.core.runtime.compatibility.registry_3.5.300.v20140128-0851/about.html
./Zenta.eclipse/Zenta/plugins/org.eclipse.core.runtime.compatibility.registry_3.5.300.v20140128-0851/runtime_registry_compatibility.jar
./Zenta.eclipse/Zenta/plugins/org.eclipse.core.runtime.compatibility_3.2.200.v20140128-0851.jar
./Zenta.eclipse/Zenta/configuration/org.eclipse.core.runtime
./Zenta.eclipse/Zenta/configuration/org.eclipse.core.runtime/.manager
./Zenta.eclipse/Zenta/configuration/org.eclipse.core.runtime/.manager/.fileTable.7
./Zenta.eclipse/Zenta/configuration/org.eclipse.core.runtime/.manager/.fileTable.8
./Zenta.eclipse/Zenta/configuration/org.eclipse.core.runtime/.manager/.fileTableLock
./Zenta.eclipse/Zenta/configuration/org.eclipse.core.runtime/.mainData.1
./Zenta.eclipse/Zenta/configuration/org.eclipse.core.runtime/.contributors.1
./Zenta.eclipse/Zenta/configuration/org.eclipse.core.runtime/.contributions.1
./Zenta.eclipse/Zenta/configuration/org.eclipse.core.runtime/.table.1
./Zenta.eclipse/Zenta/configuration/org.eclipse.core.runtime/.orphans.1
./Zenta.eclipse/Zenta/configuration/org.eclipse.core.runtime/.namespaces.1
./Zenta.eclipse/Zenta/configuration/org.eclipse.core.runtime/.extraData.1
./Zenta.mvn/Zenta/plugins/org.eclipse.core.runtime_3.10.0.v20140318-2214.jar
./Zenta.mvn/Zenta/plugins/org.eclipse.core.runtime.compatibility.registry_3.5.300.v20140128-0851
./Zenta.mvn/Zenta/plugins/org.eclipse.core.runtime.compatibility.registry_3.5.300.v20140128-0851/.api_description
./Zenta.mvn/Zenta/plugins/org.eclipse.core.runtime.compatibility.registry_3.5.300.v20140128-0851/META-INF
./Zenta.mvn/Zenta/plugins/org.eclipse.core.runtime.compatibility.registry_3.5.300.v20140128-0851/META-INF/ECLIPSE_.SF
./Zenta.mvn/Zenta/plugins/org.eclipse.core.runtime.compatibility.registry_3.5.300.v20140128-0851/META-INF/ECLIPSE_.RSA
./Zenta.mvn/Zenta/plugins/org.eclipse.core.runtime.compatibility.registry_3.5.300.v20140128-0851/META-INF/MANIFEST.MF
./Zenta.mvn/Zenta/plugins/org.eclipse.core.runtime.compatibility.registry_3.5.300.v20140128-0851/fragment.properties
./Zenta.mvn/Zenta/plugins/org.eclipse.core.runtime.compatibility.registry_3.5.300.v20140128-0851/about.html
./Zenta.mvn/Zenta/plugins/org.eclipse.core.runtime.compatibility.registry_3.5.300.v20140128-0851/runtime_registry_compatibility.jar
./Zenta.mvn/Zenta/plugins/org.eclipse.core.runtime.compatibility_3.2.200.v20140128-0851.jar
There are at least four issues:
To avoid messages "Could not acquire PlatformAdmin server" during UTs and ITs, add to the parent pom, in target-platform-configuration's configuration section:
<dependency-resolution>
<extraRequirements>
<requirement>
<type>eclipse-plugin</type>
<id>org.eclipse.osgi.compatibility.state</id>
<versionRange>0.0.0</versionRange>
</requirement>
</extraRequirements>
</dependency-resolution>
and to org.rulez.magwas.zenta.integrationtests pom, in tycho-surefire-plugin's configuration section:
<dependency>
<type>eclipse-plugin</type>
<artifactId>org.eclipse.core.runtime.compatibility.registry</artifactId>
<version>0.0.0</version>
</dependency>
To avoid messages "Event Admin service is not available, unable to publish event org.osgi.service.event.Event",
add to org.rulez.magwas.zenta.integrationtests pom, in tycho-surefire-plugin's configuration section:
<dependency>
<type>eclipse-plugin</type>
<artifactId>org.eclipse.equinox.event</artifactId>
<version>0.0.0</version>
</dependency>
Upgrade to Eclipse Mars to avoid the bug:
Bug 449485 - [QuickAccess] "Widget is disposed" exception in errorlog during shutdown due to quickaccess.SearchField.storeDialog.
Change the repositories in parent pom:
<repository>
<id>4.5</id>
<layout>p2</layout>
<url>http://download.eclipse.org/eclipse/updates/4.5</url>
</repository>
<repository>
<id>orbit</id>
<layout>p2</layout>
<url>http://download.eclipse.org/tools/orbit/downloads/drops/R20150821153341/repository/</url>
</repository>
Aftermath: since Eclipse Mars, 32 bit cocoa support was removed.
cf. http://dev.eclipse.org/mhonarc/lists/platform-swt-dev/msg07799.html
Remove support for Mac OS X 32 bits in :
org.rulez.magwas.zenta.editor.launch.macos
org.rulez.magwas.zenta.editor.fullscreen.macos
Remove mockito-core-debian.jar from org.rulez.magwas.zenta.integrationtests' .classpath
There are still 6 errors during integration tests. They seem related to the tests themselves.
I've been facing this problem for days and unfortunately I couldn't find the proper solution on the internet.
I followed the instructions on this tutorial to build a RCP application.I successfully built my application and got it running inside of the eclipse. Now, after importing my application using eclipse product export wizard in the .product file, I get a runtime error and my log file looks like this:
!SESSION 2014-09-26 20:49:27.654 -----------------------------------------------
eclipse.buildId=unknown
java.version=1.7.0_60-ea
java.vendor=Oracle Corporation
BootLoader constants: OS=macosx, ARCH=x86_64, WS=cocoa, NL=en_US
Framework arguments: -clearPersistedState -keyring /Users/mac/.eclipse_keyring -showlocation
Command-line arguments: -os macosx -ws cocoa -arch x86_64 -clearPersistedState -keyring /Users/mac/.eclipse_keyring -showlocation
!ENTRY org.eclipse.osgi 4 0 2014-09-26 20:49:32.759
!MESSAGE Application error
!STACK 1
java.lang.RuntimeException: Application "test.rcp.application" could not be found in the registry. The applications available are: org.eclipse.ant.core.antRunner, org.eclipse.e4.ui.workbench.swt.E4Application, org.eclipse.e4.ui.workbench.swt.GenTopic, org.eclipse.emf.mwe.core.WorkflowRunner, org.eclipse.equinox.app.error, org.eclipse.equinox.p2.director, org.eclipse.equinox.p2.garbagecollector.application, org.eclipse.equinox.p2.publisher.InstallPublisher, org.eclipse.equinox.p2.publisher.EclipseGenerator, org.eclipse.equinox.p2.publisher.ProductPublisher, org.eclipse.equinox.p2.publisher.FeaturesAndBundlesPublisher, org.eclipse.equinox.p2.reconciler.application, org.eclipse.equinox.p2.repository.repo2runnable, org.eclipse.equinox.p2.repository.metadataverifier, org.eclipse.equinox.p2.artifact.repository.mirrorApplication, org.eclipse.equinox.p2.metadata.repository.mirrorApplication, org.eclipse.equinox.p2.updatesite.UpdateSitePublisher, org.eclipse.equinox.p2.publisher.UpdateSitePublisher, org.eclipse.equinox.p2.publisher.CategoryPublisher, org.eclipse.help.base.infocenterApplication, org.eclipse.help.base.helpApplication, org.eclipse.help.base.indexTool, org.eclipse.jdt.core.JavaCodeFormatter, org.eclipse.jdt.core.JavaIndexer, org.eclipse.ui.ide.workbench.
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(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:648)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:603)
at org.eclipse.equinox.launcher.Main.run(Main.java:1465)
Can anyone suggest a way to fix this issue?
Any help would be appreciated, thanks
I have eclipse Juno and the IBM Worklight studio plugin v5.0.5 installed. The worklight documentation specific that eclipse Juno is supported, but if I create a worklight project and then close eclipse, and then try to start it up again a thread hangs on startup loading things from com.worklight.studio.plugin and I end up having to kill eclipse since it just hangs on the loading screen. It is not the same package loaded everytime either that it hangs on, it seems to be random. Here is a stacktrace from when it happened once:
!MESSAGE While loading class "com.worklight.studio.plugin.classpaths.ServerAPIContainer", thread "Thread[org.eclipse.wst.sse.ui.internal.reconcile.StructuredRegionProcessor,1,main]" timed out waiting (5000ms) for thread "Thread[Worker-0,5,main]" to finish starting bundle "com.worklight.studio.plugin_5.0.5.20121129-1027 [882]". To avoid deadlock, thread "Thread[org.eclipse.wst.sse.ui.internal.reconcile.StructuredRegionProcessor,1,main]" is proceeding but "com.worklight.studio.plugin.classpaths.ServerAPIContainer" may not be fully initialized.
!STACK 0
org.osgi.framework.BundleException: State change in progress for bundle "reference:file:plugins/com.worklight.studio.plugin_5.0.5.20121129-1027/" by thread "Worker-0".
at org.eclipse.osgi.framework.internal.core.AbstractBundle.beginStateChange(AbstractBundle.java:1088)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:298)
at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:440)
at org.eclipse.osgi.internal.loader.BundleLoader.setLazyTrigger(BundleLoader.java:263)
at org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:107)
at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:469)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(DefaultClassLoader.java:216)
at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:395)
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:464)
...
Caused by: org.eclipse.osgi.framework.internal.core.AbstractBundle$BundleStatusException
... 45 more
Root exception:
org.eclipse.osgi.framework.internal.core.AbstractBundle$BundleStatusException
at org.eclipse.osgi.framework.internal.core.AbstractBundle.beginStateChange(AbstractBundle.java:1088)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:298)
at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:440)
at org.eclipse.osgi.internal.loader.BundleLoader.setLazyTrigger(BundleLoader.java:263)
at org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:107)
at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:469)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(DefaultClassLoader.java:216)
at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:395)
...
eclipse.buildId=M20130204-1200
java.version=1.7.0_15
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_US
Framework arguments: -product org.eclipse.epp.package.jee.product
Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product
It's a very long stack trace so I just included the parts I thought were relevant above. I can start eclipse again by deleting the worklight projects from my workspace, but this means I can only ever work on a project for a single session. I've seen other posts about this issue, but they all give the same solution of just deleting the projects. Is there any more permanent solution to this issue?
Thanks,
Alex
Uninstall it and try the latest version, 5.0.6.1, however also make sure to delete from the Eclipse-workspace the WorklightServerHome folder (due to schema changes between 5.0.5 and 5.0.6.x).
I get the following error when I try to launch my Eclipse RPC application:
!SESSION 2011-05-05 17:07:38.649 -----------------------------------------------
eclipse.buildId=unknown
java.version=1.6.0_24
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_IE
Framework arguments: -application org.eclipse.ui.ide.workbench
Command-line arguments: -application org.eclipse.ui.ide.workbench -data C:\Users\eramkoh\PCI Workspace/../runtime-EclipseApplication -dev file:C:/Users/eramkoh/PCI Workspace/.metadata/.plugins/org.eclipse.pde.core/Eclipse Application/dev.properties -os win32 -ws win32 -arch x86 -consoleLog
!ENTRY org.eclipse.equinox.simpleconfigurator 4 0 2011-05-05 17:07:39.492
!MESSAGE
!STACK 0
org.osgi.framework.BundleException: Exception in org.eclipse.equinox.internal.simpleconfigurator.Activator.start() of bundle org.eclipse.equinox.simpleconfigurator.
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:806)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:755)
at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:370)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.resume(AbstractBundle.java:374)
at org.eclipse.osgi.framework.internal.core.Framework.resumeBundle(Framework.java:1067)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:561)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:546)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.incFWSL(StartLevelManager.java:459)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLevel(StartLevelManager.java:243)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:440)
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:227)
at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:337)
Caused by: java.lang.IllegalStateException: The System Bundle was updated. The framework must be restarted to finalize the configuration change
at org.eclipse.equinox.internal.simpleconfigurator.ConfigApplier.install(ConfigApplier.java:71)
at org.eclipse.equinox.internal.simpleconfigurator.SimpleConfiguratorImpl.applyConfiguration(SimpleConfiguratorImpl.java:129)
at org.eclipse.equinox.internal.simpleconfigurator.SimpleConfiguratorImpl.applyConfiguration(SimpleConfiguratorImpl.java:143)
at org.eclipse.equinox.internal.simpleconfigurator.Activator.start(Activator.java:48)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl$1.run(BundleContextImpl.java:783)
at java.security.AccessController.doPrivileged(Native Method)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:774)
... 11 more
Root exception:
java.lang.IllegalStateException: The System Bundle was updated. The framework must be restarted to finalize the configuration change
at org.eclipse.equinox.internal.simpleconfigurator.ConfigApplier.install(ConfigApplier.java:71)
at org.eclipse.equinox.internal.simpleconfigurator.SimpleConfiguratorImpl.applyConfiguration(SimpleConfiguratorImpl.java:129)
at org.eclipse.equinox.internal.simpleconfigurator.SimpleConfiguratorImpl.applyConfiguration(SimpleConfiguratorImpl.java:143)
at org.eclipse.equinox.internal.simpleconfigurator.Activator.start(Activator.java:48)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl$1.run(BundleContextImpl.java:783)
at java.security.AccessController.doPrivileged(Native Method)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:774)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:755)
at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:370)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.resume(AbstractBundle.java:374)
at org.eclipse.osgi.framework.internal.core.Framework.resumeBundle(Framework.java:1067)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:561)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:546)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.incFWSL(StartLevelManager.java:459)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLevel(StartLevelManager.java:243)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:440)
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:227)
at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:337)
!ENTRY org.eclipse.osgi 4 0 2011-05-05 17:07:39.492
!MESSAGE Bundle org.eclipse.equinox.simpleconfigurator_1.0.101.R35x_v20090807-1100 [127] is not active.
!ENTRY org.eclipse.osgi 4 0 2011-05-05 17:07:39.523
!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:74)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:369)
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:619)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:574)
at org.eclipse.equinox.launcher.Main.run(Main.java:1407)
at org.eclipse.equinox.launcher.Main.main(Main.java:1383)
What should I do to resolve it?
I had exactly the same problem and I realized what causes it. If you have some system related bundle more than once (org.eclipse.osgi for example) in your target file, then if you let your application running, then by default Eclipse adds all of the bundles to the launch configuration. So steps to take:
Open launch config and go to plugins tab
click on validate
See which plugin is duplicated
Leave only one checked, which is appropiate
See the picture below for details:
I've got a similar problem when trying to launch Eclipse CDT 4.1.1 (with couple 4.2.2 and several own plug-ins) from Eclipse SDK 4.2.2 on 32bit Java 7 VM in 32bit Windows Vista. I'm not sure what the root cause is, but I can reliably reproduce and solve it using the following steps.
Set a new target platform definition, or reload an existing one.
Try running JUnit4 plug-in tests in debug mode (Ctrl+F11), and observe everything working well.
Restart Eclipse.
Repeat step 2 and get the same java.lang.IllegalStateException as the topic starter.
Reload the target platform definition, and click OK on "Target Definition Out Of Synch: The active target platform is out of synch with the file system. Pressing ok on the preference page will update the target platform"
Repeat step 2 and observe that the error is gone again.
Since I don't get this error in a similar scenario with Eclipse 3.6, I would guess that the target platform code in Eclipse Juno does not handle NTFS file timestamps well enough. So, when an Eclipse instance is actually loaded, a changed bundle is erroneously detected and an attempt to reinstall it is made, leading to this error later.
Summary: try reloading the target platform if you get this error.
Try adding org.eclipse.core.runtime on the configuration tab of your product, and set it to a default start level (0) and auto start set to true.