Home » Eclipse Projects » Eclipse Scout » org.eclipse.core.runtime.CoreException: Plug-in X was unable to load class SwingApplication.
org.eclipse.core.runtime.CoreException: Plug-in X was unable to load class SwingApplication. [message #1444179] |
Mon, 13 October 2014 19:05 |
Jeremie Bresson Messages: 1252 Registered: October 2011 |
Senior Member |
|
|
I have tried to use the compiled iBug.exe (Swing) from the Scout Demo Application
When I tried to start the exe, the application was producing error like this:
And the mentioned log file was:
!SESSION 2014-10-13 19:04:13.459 -----------------------------------------------
eclipse.buildId=unknown
java.version=1.7.0_45
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US
Command-line arguments: -os win32 -ws win32 -arch x86 -console
!ENTRY org.eclipse.osgi 4 0 2014-10-13 19:04:15.131
!MESSAGE Application error
!STACK 1
org.eclipse.core.runtime.CoreException: Plug-in org.eclipse.swt was unable to load class org.eclipsescout.demo.ibug.ui.swing.SwingApplication.
at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.throwException(RegistryStrategyOSGI.java:194)
at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:176)
at org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(ExtensionRegistry.java:905)
at org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:243)
at org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(ConfigurationElementHandle.java:55)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:191)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
at org.eclipse.core.ru65ntime.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: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)
Caused by: java.lang.ClassNotFoundException: org.eclipsescout.demo.ibug.ui.swing.SwingApplication cannot be found by org.eclipse.swt_3.103.1.v20140903-1938
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:432)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:345)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:337)
at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:160)
at java.lang.ClassLoader.loadClass(Unknown Source)
at org.eclipse.osgi.internal.framework.EquinoxBundle.loadClass(EquinoxBundle.java:568)
at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:174)
... 16 more
The product was valid, and no error was shown when I tried to validate it in the product editor.
The product could be started from the Eclipse IDE.
After a long search, it turns out it was a JVM problem....
What puts me on the way was this part of the "tycho-compiler:compile" documentation, more precisely useJDK property:
Quote:Default value is SYSTEM which means the currently running JDK. If BREE is specified, MANIFEST header Bundle-RequiredExecutionEnvironment is used to define the JDK to compile against. In this case, you need to provide a toolchains.xml configuration file. The value of BREE will be matched against the id of the toolchain elements in toolchains.xml.
We have this bree entry in our manifests:
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
So I looked in my toolchains.xml file to check the java version that was used.
When I indicated the same version in the ibug.ini file (in the same folder than ibug.exe), the error was gone.
-vm
C:/Java/j2sdk1.6.0_37/jre/bin/javaw.exe
see also: eclipse.ini documentation.
The error and the stack trace tell really nothing about the real issue.
Maybe it is time we update the Demo App java version to Java 1.7
I hope this will help others.
|
|
| |
Re: org.eclipse.core.runtime.CoreException: Plug-in X was unable to load class SwingApplication. [message #1698320 is a reply to message #1444755] |
Sat, 13 June 2015 12:35 |
Marco Dörfliger Messages: 46 Registered: January 2015 |
Member |
|
|
Hi Jeremie,
Did you ever find a solution to this issue? I am experiencing the exact same problem, whereby after exporting the scout project and running the .exe, the "An error has occurred. See log file..." error message appears.
I'm using Luna (4.0.200.20150218-0841) on Windows 7, and compiling/running using jdk1.7.0_79. I am using Scout's "Export Project" function from the IDE to package the project (I have also tried the export option from the product configuration).
Unfortunately I can't say what change caused the error, since (as in your example) the error only appears when exporting the "production" product, and I made many changes before exporting the project.
The contents of the log file are:
!SESSION 2015-06-13 14:12:18.947 -----------------------------------------------
eclipse.buildId=unknown
java.version=1.7.0_79
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_NZ
Command-line arguments: -os win32 -ws win32 -arch x86
!ENTRY org.eclipse.osgi 4 0 2015-06-13 14:12:20.086
!MESSAGE Application error
!STACK 1
org.eclipse.core.runtime.CoreException: Plug-in com.omb.convergencemenu.jdbc.derby.fragment was unable to load class com.omb.convergencemenu.ui.swing.SwingApplication.
at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.throwException(RegistryStrategyOSGI.java:194)
at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:176)
at org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(ExtensionRegistry.java:905)
at org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:243)
at org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(ConfigurationElementHandle.java:55)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:191)
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(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)
Caused by: java.lang.ClassNotFoundException: Can not load a class from a fragment bundle: com.omb.convergencemenu.jdbc.derby.fragment_10.11.1.1 [9]
at org.eclipse.osgi.internal.framework.EquinoxBundle.loadClass(EquinoxBundle.java:561)
at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:174)
... 15 more
Note that com.omb.convergencemenu.jdbc.derby.fragment is just that - a fragment (using a newer version of Derby than scout provides), and contains no reference to com.omb.convergencemenu.ui.swing.SwingApplication. Also note that the reported "source" is not always the fragment bundle - I've rebuilt it to not use fragment bundles, in which case the com.omb.convergencemenu.shared bundle can't find SwingApplication. Strange messages.
Any advice would be helpful - I'm *this* close to deploying.
|
|
| |
Re: org.eclipse.core.runtime.CoreException: Plug-in X was unable to load class SwingApplication. [message #1699856 is a reply to message #1698780] |
Sat, 27 June 2015 13:21 |
Marco Dörfliger Messages: 46 Registered: January 2015 |
Member |
|
|
So I've spent some time reproducing the bug, and have the beast cornered in its cave. I believe it may have something to do with including Rayo and/or Dox4j support bundles in the project.
To summon the Wondrous error of Confusionment, one must perform the following ritual:
1. Download luna release (eclipse-scout-luna-SR2-win32.zip). Verify md5 hash to be sure.
2. Extract luna somewhere and run eclipse.exe
3. Create new workspace somewhere.
4. Create new scout project. Name it something (e.g. "test"). Select all modules (swing, swt, etc). Select "Outline Tree and Table Form". Create new RAP target. Finish.
5. From the Scout Explorer, right-click on the scout project in and choose "Export Scout Project...". Set a target directory, select "Client Application (ZIP)" only, choose the production swing product (e.g. "test-swing-client.product (production)"). Finish.
6. Unzip the client zip file and run the launcher .exe contained therein. Hold you breath.
Exhibit A: The Wondrous Error of Confusionment doth appear!
Exhibit B: Correct operation (just a normal error message because the server isn't running).
The Wondrous Error of Confusionment may already answer your summons at this point (as happened once to me during my testing of this bug). If instead you see something like Exhibit B, it's just a normal error message because the server isn't running. Do not be disheartened if the error didn't manifest - we can still coax the monster from its lair by performing the following additional steps to complicate the build a bit:
7. Select the scout project in the Scout Explorer, and then from the Scout Object Properties check 'Rayo swing Look and Feel for Eclipse Scout' to install Rayo (I have also used Docx4j to the same effect at this point). Step through the software installation wizard, agree to the terms, restart eclipse if required.
8. Repeat steps 5 and 6.
By this point you should have the error message. The error messages in the referenced log file come in several variants, depending on which plugins you have installed (see bottom of post for logs), and the clients which generate those errors can be downloaded from below that.
Now I have absolutely no idea what causes this. It's tricky to reproduce reliably, and only appears as you are on the cusp of deploying your product for production (or testing in my case). Quite a nasty piece of work, really.
As far as workarounds go, building with Maven might be an option. Fortunately I wasn't able to reproduce this issue on the Mars release which has just become available, so migration is also an option.
Variant 1 (occurs in tandem with the DocX4j Support bundles) :
!SESSION 2015-06-27 14:06:52.162 -----------------------------------------------
eclipse.buildId=unknown
java.version=1.7.0_21
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_NZ
Command-line arguments: -os win32 -ws win32 -arch x86
!ENTRY org.eclipse.osgi 4 0 2015-06-27 14:06:53.129
!MESSAGE Application error
!STACK 1
org.eclipse.core.runtime.CoreException: Plug-in org.eclipse.swt was unable to load class test.ui.swing.SwingApplication.
at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.throwException(RegistryStrategyOSGI.java:194)
at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:176)
at org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(ExtensionRegistry.java:905)
at org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:243)
at org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(ConfigurationElementHandle.java:55)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:191)
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:648)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:603)
at org.eclipse.equinox.launcher.Main.run(Main.java:1465)
Caused by: java.lang.ClassNotFoundException: test.ui.swing.SwingApplication cannot be found by org.eclipse.swt_3.103.2.v20150203-1313
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:432)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:345)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:337)
at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:160)
at java.lang.ClassLoader.loadClass(Unknown Source)
at org.eclipse.osgi.internal.framework.EquinoxBundle.loadClass(EquinoxBundle.java:568)
at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:174)
... 15 more Hm, weird. The SWT plugin is trying to load the SwingApplication? When starting the Swing app? Confusing, you are.
Variant 2 (occurrs in tandem with the Rayo look & feel) :
!SESSION 2015-06-27 14:19:05.094 -----------------------------------------------
eclipse.buildId=unknown
java.version=1.7.0_21
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_NZ
Command-line arguments: -os win32 -ws win32 -arch x86
!ENTRY org.eclipse.osgi 4 0 2015-06-27 14:19:05.984
!MESSAGE Application error
!STACK 1
org.eclipse.core.runtime.CoreException: Plug-in test.client was unable to load class test.ui.swing.SwingApplication.
at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.throwException(RegistryStrategyOSGI.java:194)
at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:176)
at org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(ExtensionRegistry.java:905)
at org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:243)
at org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(ConfigurationElementHandle.java:55)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:191)
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:648)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:603)
at org.eclipse.equinox.launcher.Main.run(Main.java:1465)
Caused by: java.lang.ClassNotFoundException: test.ui.swing.SwingApplication cannot be found by test.client_1.0.0.201506271418
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:432)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:345)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:337)
at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:160)
at java.lang.ClassLoader.loadClass(Unknown Source)
at org.eclipse.osgi.internal.framework.EquinoxBundle.loadClass(EquinoxBundle.java:568)
at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:174)
... 15 more Now the test.client plugin searches for the SwingApplication, in vain apparently.
Aaand all together now! Variant 3 (occurs in tandem with Rayo AND DocX4j at the same time) :
!SESSION 2015-06-27 14:27:35.137 -----------------------------------------------
eclipse.buildId=unknown
java.version=1.7.0_21
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_NZ
Command-line arguments: -os win32 -ws win32 -arch x86
!ENTRY org.eclipse.osgi 4 0 2015-06-27 14:27:36.166
!MESSAGE Application error
!STACK 1
org.eclipse.core.runtime.CoreException: Plug-in org.eclipse.scout.svg.ui.swing was unable to load class test.ui.swing.SwingApplication.
at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.throwException(RegistryStrategyOSGI.java:194)
at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:176)
at org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(ExtensionRegistry.java:905)
at org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:243)
at org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(ConfigurationElementHandle.java:55)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:191)
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:648)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:603)
at org.eclipse.equinox.launcher.Main.run(Main.java:1465)
Caused by: java.lang.ClassNotFoundException: test.ui.swing.SwingApplication cannot be found by org.eclipse.scout.svg.ui.swing_4.0.200.20150107-1158
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:432)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:345)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:337)
at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:160)
at java.lang.ClassLoader.loadClass(Unknown Source)
at org.eclipse.osgi.internal.framework.EquinoxBundle.loadClass(EquinoxBundle.java:568)
at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:174)
... 15 more SVG bundle? Yeah, this is just getting silly now.
The clients can be download from my dropbox if you want to see for yourself (between 12-18MB):
testClient_working.zip
testClient_not_woring_rayo.zip
testClient_not_working_docx4j.zip
testClient_not_working_docx4j_and_rayo.zip
-
Attachment: exhibitA.png
(Size: 4.26KB, Downloaded 6417 times) -
Attachment: exhibitB.png
(Size: 7.21KB, Downloaded 6481 times)
|
|
|
Goto Forum:
Current Time: Wed Apr 24 16:18:56 GMT 2024
Powered by FUDForum. Page generated in 0.04190 seconds
|