Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[wtp-dev] "Workbench has not been created yet." error when running unit test by Ant

Sorry for the double posting.

I am running into an error when executing jsf unit test driven by Ant. It fails at calling PlatformUI.getWorkbench(). I.e., Workbench has not been created yet and see the attached error stack at end.
Tried to create a Workbench before calling getWorkbench.
       if(!PlatformUI.isWorkbenchRunning()) {
PlatformUI.createAndRunWorkbench(PlatformUI.createDisplay(), new MyWorkbenchAdvisor());
       }

It moved forwarded but again fail to getShell() from the ActiveWorkBenchWindow. There are probably more to try. I am wondering if this is direction to go before I go down to this path and why this error occurred.

Thank you very much,
Justin
Oracle

-------------------------------------------------
Workbench has not been created yet.| |java.lang.IllegalStateException: Workbench has not been created yet.
at org.eclipse.ui.PlatformUI.getWorkbench(PlatformUI.java:92)
at org.eclipse.wtp.jsf.ui.tests.classpath.JSFLibraryWizardTestCases.testWizardDialog(JSFLibraryWizardTestCases.java:61)
at org.eclipse.test.EclipseTestRunner.run(EclipseTestRunner.java:313)
at org.eclipse.test.EclipseTestRunner.run(EclipseTestRunner.java:199)
at org.eclipse.test.CoreTestApplication.runTests(CoreTestApplication.java:35)
at org.eclipse.test.CoreTestApplication.run(CoreTestApplication.java:31)
at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:226) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:376) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:163)
at org.eclipse.core.launcher.Main.invokeFramework(Main.java:334)
at org.eclipse.core.launcher.Main.basicRun(Main.java:278)
at org.eclipse.core.launcher.Main.run(Main.java:973)
at org.eclipse.core.launcher.Main.main(Main.java:948)
---------------------------------


Back to the top