Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » SWTBot » Testing FXCanvas with SWTBot
Testing FXCanvas with SWTBot [message #1772656] Wed, 13 September 2017 15:31 Go to next message
Tarik CHEBAATHA is currently offline Tarik CHEBAATHAFriend
Messages: 4
Registered: August 2017
Junior Member
Hello,
I have the same problem reported in this topic :
https://www.eclipse.org/forums/index.php?t=msg&th=789821&goto=1395801&#msg_1395801
I use FXCanvas on my RCP E4application, when I start swtbot test I get this error :

java.lang.NoClassDefFoundError: org/eclipse/swt/widgets/Canvas
at java.lang.ClassLoader.findBootstrapClass(Native Method)
at java.lang.ClassLoader.findBootstrapClassOrNull(ClassLoader.java:1015)
at java.lang.ClassLoader.loadClass(ClassLoader.java:413)
at java.lang.ClassLoader.loadClass(ClassLoader.java:411)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:335)
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.postFindClass(FXClassLoader.java:62)
at org.eclipse.osgi.internal.loader.BundleLoader.searchHooks(BundleLoader.java:477)
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:440)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:372)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:364)
at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:161)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at com.abbd.exaus.eclipse.application.E4Application.start(E4Application.java:144)
at com.abbd.exaus.eclipse.application.ExausE4Application.start(ExausE4Application.java:90)
at org.eclipse.swtbot.eclipse.core.UITestApplication.start(UITestApplication.java:58)
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: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)

the log of fx hook

FXClassLoader#createJREBundledClassloader - Started
FXClassLoader#createJREBundledClassloader - Assumed location (Java 8/Java 7): C:\Program Files\Java\jdk1.8.0_131\jre\lib\ext\jfxrt.jar
FXClassLoader#createJREBundledClassloader - SWT is available use different loading strategy
FXClassLoader#createJREBundledClassloader - Searching for SWT-FX integration at C:\Program Files\Java\jdk1.8.0_131\jre\lib\jfxswt.jar
FXClassLoader#createJREBundledClassloader - Found SWT/FX
FXClassLoader#createJREBundledClassloader - Delegate to system classloader
FXClassLoader.SWTFXClassloader#init - Primary Loader sun.misc.Launcher$ExtClassLoader@74fb4435
FXClassLoader.SWTFXClassloader#init - Lastresort Loader org.eclipse.osgi.internal.loader.EquinoxClassLoader@631da7af[org.eclipse.swt:3.105.2.v20161122-0613(id=167)]
FXClassLoader#createJREBundledClassloader - Ended

I have already added jfxrt.jar and jfxswt.jar to my java build path and the osgi.framework.extensions=org.eclipse.fx.osgi to my vm arguments

Do you have any hint for me ?
Re: Testing FXCanvas with SWTBot [message #1772760 is a reply to message #1772656] Thu, 14 September 2017 20:23 Go to previous message
Patrick Tasse is currently offline Patrick TasseFriend
Messages: 56
Registered: July 2009
Member
Perhaps you also need to add swt.jar to your java build path?

https://docs.oracle.com/javase/8/javafx/interoperability-tutorial/fx-swt_interoperability.htm#A1108386
Previous Topic:Open SWTBot test Recorder with RCP application
Next Topic:How to link a Part from an RCP App to SWTBot?
Goto Forum:
  


Current Time: Mon Nov 19 01:50:53 GMT 2018

Powered by FUDForum. Page generated in 0.04063 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top