Testing FXCanvas with SWTBot [message #1395801] |
Mon, 07 July 2014 08:19  |
Eclipse User |
|
|
|
Hi,
I'm currently struggling with SWTBot test for a part based on FXCanvas. If in my test method I try to open this part with:
EPartService.showPart( "foo.bar.myFXCanvasPart", PartState.ACTIVATE );
I always end up with:
org.eclipse.e4.core.di.InjectionException: java.lang.NoClassDefFoundError: org/eclipse/swt/widgets/Canvas
at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:62)
at org.eclipse.e4.core.internal.di.InjectorImpl.processAnnotated(InjectorImpl.java:888)
at org.eclipse.e4.core.internal.di.InjectorImpl.inject(InjectorImpl.java:120)
at org.eclipse.e4.core.internal.di.InjectorImpl.internalMake(InjectorImpl.java:337)
at org.eclipse.e4.core.internal.di.InjectorImpl.make(InjectorImpl.java:258)
....
Caused by: java.lang.NoClassDefFoundError: org/eclipse/swt/widgets/Canvas
at java.lang.ClassLoader.findBootstrapClass(Native Method)
at java.lang.ClassLoader.findBootstrapClassOrNull(ClassLoader.java:1012)
at java.lang.ClassLoader.loadClass(ClassLoader.java:413)
at java.lang.ClassLoader.loadClass(ClassLoader.java:411)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:411)
at java.lang.ClassLoader.loadClass(ClassLoader.java:411)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at org.eclipse.fx.osgi.fxloader.FXClassLoader$FXModuleClassloader$1.findLocalClass(FXClassLoader.java:140)
The test run configuration contains the necessary OSGi extension:
-Dosgi.framework.extensions=org.eclipse.fx.osgi
The interesting thing is that when I start the application (not a test case) everything is just fine, the fx-based part works without any problems.
Does anybody have a clue what's wrong?
|
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04497 seconds