2

I get java.lang.NoClassDefFoundError: org/eclipse/swt/accessibility/AccessibleObject when I start my Eclipse e4 RCP application.

I have included org.eclipse.swt and org.eclipse.swt.gtk.linux.x86_64 in my launch configuration.

What am I missing?

!ENTRY org.eclipse.equinox.app 4 2 2019-05-11 08:53:22.487
!MESSAGE Problems occurred when invoking code from plug-in: "org.eclipse.equinox.app".
!STACK 0
java.lang.NoClassDefFoundError: org/eclipse/swt/accessibility/AccessibleObject
    at org.eclipse.equinox.launcher.JNIBridge._takedown_splash(Native Method)
    at org.eclipse.equinox.launcher.JNIBridge.takeDownSplash(JNIBridge.java:173)
    at org.eclipse.equinox.launcher.Main.takeDownSplash(Main.java:2185)
    at org.eclipse.equinox.launcher.Main$SplashHandler.run(Main.java:122)
    at org.eclipse.core.runtime.internal.adaptor.DefaultStartupMonitor.applicationRunning(DefaultStartupMonitor.java:70)
    at org.eclipse.equinox.internal.app.EclipseAppHandle$1.run(EclipseAppHandle.java:279)
    at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
    at org.eclipse.equinox.internal.app.EclipseAppHandle.applicationRunning(EclipseAppHandle.java:267)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1108)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1062)
    at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:155)
    at org.eclipse.e4.ui.internal.workbench.swt.E4Application.start(E4Application.java:166)
    at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:203)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:137)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:107)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:400)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255)
    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:661)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:597)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1476)
    at org.eclipse.equinox.launcher.Main.main(Main.java:1449)
Caused by: java.lang.ClassNotFoundException: org.eclipse.swt.accessibility.AccessibleObject
    at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    ... 26 more

I used Eclipse 2019-03.

Note: When I run the code from Eclipse Oxygen it works without problems.

Launch configuration of SWT plugins:

SWT Plugins

Mihael
  • 255
  • 1
  • 5
  • Are you running this from within Eclipse or are you building and running an RCP? If you are building an RCP how are you doing that? – greg-449 May 11 '19 at 07:20
  • @greg-449 I am running this from Eclipse. (Later I will build the RCP application with tycho) – Mihael May 12 '19 at 08:34
  • It doesn't look like the SWT plugins are being picked up. Double check the launch configuration has those plug-ins selected. Use the 'Validate Plug-ins' button to check everything is ok. Look at your Target Platform and check it is for the correct 'Environment'. – greg-449 May 12 '19 at 10:00
  • What version of Java are you running this with? Your target platform is still Eclipse Oxygen which may not work with Java 11 onwards. – greg-449 May 16 '19 at 06:38
  • @greg-449 I use Java 1.8 for this one. ``` openjdk version "1.8.0_212" OpenJDK Runtime Environment (build 1.8.0_212-8u212-b03-0ubuntu1.18.04.1-b03) OpenJDK 64-Bit Server VM (build 25.212-b03, mixed mode) ``` – Mihael May 17 '19 at 16:57

0 Answers0