weired behavior when Running SWTBot Plugin Test from Ant [message #468157] |
Tue, 04 August 2009 08:26  |
Eclipse User |
|
|
|
I created a product for my application exported the plug-in, copied the
two headless plug-in jars and tried running ant. It gave
java.lang.RuntimeException: Application
" org.eclipse.swtbot.eclipse.junit4.headless.swtbottestapplica tion " could
not be found in the registry.
I then copied all the plug-ins from eclipse install over to the plugins
directory of the exported product configuration. I exported my application
as a plug-in and copied it to the same plugin directory. I created
build.xml.
From command prompt, I then ran ant and the product came up.
I wanted to know what plugins were required for the headless ant to work?
I tried deleting one of the plug-in jars that I had copied and tried
running ant. The product would not come up and in the results folder the
txt file had few lines and the .log file said that the product was not
found.
Without doing anything when I reran ant, the product came up. I tried this
with different jars and saw the same behavior. Any idea what is happening?
Also, Can someone give me a list of plug-in jars from eclipse install that
is required to run the headless ant?
Thanks for your help in advance.
L.
|
|
|
|
|
|
Re: weired behavior when Running SWTBot Plugin Test from Ant [message #475128 is a reply to message #468187] |
Wed, 05 August 2009 18:13   |
Eclipse User |
|
|
|
Originally posted by: saleem.khan.insha.gmail.com
Hi lalitha,
I am trying to run sample application through headless swtbot framework
but it's not working. The same sample working in eclipse but not through
ant.
I have tried to run sample application through headless framework with two
eclipse
1. In which i have run sample through eclipse(copy headless framework in
plugin).
2. Fresh eclipse (copy headless framework in plugin).
In both the cases it doesn't launch application. It shows build successful
but application is not launched.
In result folder there is log file, the are...
!SESSION 2009-08-05 01:38:53.949
-----------------------------------------------
eclipse.buildId=I20080617-2000
java.version=1.6.0_14
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=workspace, NL=en_US
Framework arguments: -application
org.eclipse.swtbot.eclipse.junit4.headless.swtbottestapplica tion
-testApplication org.eclipse.ui.ide.workbench
formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJU nitResultFormatter,C:/Users/Saleem/Desktop/plugin/eclipse/co m.rcp.view.example.MyFirstTest.xml
formatter=org.apache.tools.ant.taskdefs.optional.junit.Plain JUnitResultFormatter
-testPluginName com.rcp.view.example -className
com.rcp.view.example.MyFirstTest
Command-line arguments: -application
org.eclipse.swtbot.eclipse.junit4.headless.swtbottestapplica tion
-testApplication org.eclipse.ui.ide.workbench -data workspace
formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJU nitResultFormatter,C:/Users/Saleem/Desktop/plugin/eclipse/co m.rcp.view.example.MyFirstTest.xml
formatter=org.apache.tools.ant.taskdefs.optional.junit.Plain JUnitResultFormatter
-testPluginName com.rcp.view.example -className
com.rcp.view.example.MyFirstTest -os win32 -ws workspace -arch x86
-consoleLog -debug
!ENTRY org.eclipse.equinox.preferences 4 4 2009-08-05 01:38:58.566
!MESSAGE Exception saving preferences to:
C:/Users/Saleem/Desktop/plugin/eclipse/configuration/.settin gs/org.eclipse.equinox.p2.metadata.repository.prefs.
!STACK 0
java.io.FileNotFoundException:
C:\Users\Saleem\Desktop\plugin\eclipse\configuration\.settin gs\org.eclipse.equinox.p2.metadata.repository.prefs
(The requested operation cannot be performed on a file with a user-mapped
section open)
at java.io.FileOutputStream.open(Native Method)
at java.io.FileOutputStream.<init>(FileOutputStream.java:179)
at java.io.FileOutputStream.<init>(FileOutputStream.java:102)
at
org.eclipse.core.internal.preferences.EclipsePreferences.sav e(EclipsePreferences.java:983)
at
org.eclipse.core.internal.preferences.EclipsePreferences.sav e(EclipsePreferences.java:953)
at
org.eclipse.core.internal.preferences.EclipsePreferences.flu sh(EclipsePreferences.java:352)
at
org.eclipse.core.internal.preferences.EclipsePreferences.flu sh(EclipsePreferences.java:340)
at
org.eclipse.equinox.internal.p2.metadata.repository.Metadata RepositoryManager.saveToPreferences(MetadataRepositoryManage r.java:747)
at
org.eclipse.equinox.internal.p2.metadata.repository.Metadata RepositoryManager.removeRepository(MetadataRepositoryManager .java:668)
at
org.eclipse.equinox.internal.p2.metadata.repository.Metadata RepositoryManager.loadRepository(MetadataRepositoryManager.j ava:466)
at
org.eclipse.equinox.internal.p2.metadata.repository.Metadata RepositoryManager.loadRepository(MetadataRepositoryManager.j ava:435)
at
org.eclipse.equinox.internal.p2.engine.MetadataCache.getRepo sitory(MetadataCache.java:46)
at
org.eclipse.equinox.internal.p2.engine.MetadataCache$1.notif y(MetadataCache.java:81)
at
org.eclipse.equinox.internal.p2.core.ProvisioningEventBus.di spatchEvent(ProvisioningEventBus.java:86)
at
org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEve nt(EventManager.java:211)
at
org.eclipse.osgi.framework.eventmgr.EventManager$EventThread .run(EventManager.java:321)
!ENTRY org.eclipse.equinox.p2.metadata.repository 4 0 2009-08-05
01:38:58.579
!MESSAGE Error while saving repositories in preferences
!STACK 0
org.osgi.service.prefs.BackingStoreException: Exception saving preferences
to:
C:/Users/Saleem/Desktop/plugin/eclipse/configuration/.settin gs/org.eclipse.equinox.p2.metadata.repository.prefs.
at
org.eclipse.core.internal.preferences.EclipsePreferences.sav e(EclipsePreferences.java:991)
at
org.eclipse.core.internal.preferences.EclipsePreferences.sav e(EclipsePreferences.java:953)
at
org.eclipse.core.internal.preferences.EclipsePreferences.flu sh(EclipsePreferences.java:352)
at
org.eclipse.core.internal.preferences.EclipsePreferences.flu sh(EclipsePreferences.java:340)
at
org.eclipse.equinox.internal.p2.metadata.repository.Metadata RepositoryManager.saveToPreferences(MetadataRepositoryManage r.java:747)
at
org.eclipse.equinox.internal.p2.metadata.repository.Metadata RepositoryManager.removeRepository(MetadataRepositoryManager .java:668)
at
org.eclipse.equinox.internal.p2.metadata.repository.Metadata RepositoryManager.loadRepository(MetadataRepositoryManager.j ava:466)
at
org.eclipse.equinox.internal.p2.metadata.repository.Metadata RepositoryManager.loadRepository(MetadataRepositoryManager.j ava:435)
at
org.eclipse.equinox.internal.p2.engine.MetadataCache.getRepo sitory(MetadataCache.java:46)
at
org.eclipse.equinox.internal.p2.engine.MetadataCache$1.notif y(MetadataCache.java:81)
at
org.eclipse.equinox.internal.p2.core.ProvisioningEventBus.di spatchEvent(ProvisioningEventBus.java:86)
at
org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEve nt(EventManager.java:211)
at
org.eclipse.osgi.framework.eventmgr.EventManager$EventThread .run(EventManager.java:321)
!ENTRY org.eclipse.equinox.p2.director 2 0 2009-08-05 01:38:58.678
!MESSAGE Problems resolving provisioning plan.
!SUBENTRY 1 org.eclipse.equinox.p2.director 2 0 2009-08-05 01:38:58.679
!MESSAGE Unable to satisfy dependency from com.rcp.view.example 1.0.0 to
requiredCapability: osgi.bundle/org.eclipse.swtbot.eclipse.finder/2.0.0.
!SUBENTRY 1 org.eclipse.equinox.p2.director 2 0 2009-08-05 01:38:58.680
!MESSAGE Unable to satisfy dependency from com.rcp.view.example 1.0.0 to
requiredCapability: osgi.bundle/org.eclipse.swtbot.junit4_x/2.0.0.
!SUBENTRY 1 org.eclipse.equinox.p2.director 2 0 2009-08-05 01:38:58.680
!MESSAGE Unable to satisfy dependency from com.rcp.view.example 1.0.0 to
requiredCapability: osgi.bundle/org.eclipse.swtbot.swt.finder/2.0.0.
!SUBENTRY 1 org.eclipse.equinox.p2.director 2 0 2009-08-05 01:38:58.681
!MESSAGE Unable to satisfy dependency from com.rcp.view.example 1.0.0 to
requiredCapability: osgi.bundle/org.hamcrest/1.1.0.
!ENTRY org.eclipse.osgi 2 0 2009-08-05 01:39:05.247
!MESSAGE The following is a complete list of bundles which are not
resolved, see the prior log entry for the root cause if it exists:
!SUBENTRY 1 org.eclipse.osgi 2 0 2009-08-05 01:39:05.247
!MESSAGE Bundle
reference:file:plugins/org.eclipse.equinox.launcher.win32.wi n32.x86_1.0.100.v20080509-1800/
[54] was not resolved.
!SUBENTRY 2 org.eclipse.equinox.launcher.win32.win32.x86 2 0 2009-08-05
01:39:05.248
!MESSAGE Platform filter did not match: (& (osgi.ws=win32) (osgi.os=win32)
(osgi.arch=x86))
!SUBENTRY 1 org.eclipse.osgi 2 0 2009-08-05 01:39:05.248
!MESSAGE Bundle
reference:file:plugins/org.eclipse.swt.win32.win32.x86_3.4.0 .v3448f.jar
[131] was not resolved.
!SUBENTRY 2 org.eclipse.swt.win32.win32.x86 2 0 2009-08-05 01:39:05.248
!MESSAGE Platform filter did not match: (& (osgi.ws=win32) (osgi.os=win32)
(osgi.arch=x86))
!SUBENTRY 1 org.eclipse.osgi 2 0 2009-08-05 01:39:05.248
!MESSAGE Bundle
reference:file:plugins/org.eclipse.ui.win32_3.2.100.v2008040 8-0800.jar
[157] was not resolved.
!SUBENTRY 2 org.eclipse.ui.win32 2 0 2009-08-05 01:39:05.248
!MESSAGE Platform filter did not match: (osgi.ws=win32)
!ENTRY org.eclipse.osgi 4 0 2009-08-05 01:39:05.269
!MESSAGE An error occurred while automatically activating bundle
org.eclipse.ui.workbench (158).
!STACK 0
org.osgi.framework.BundleException: The activator
org.eclipse.ui.internal.WorkbenchPlugin for bundle
org.eclipse.ui.workbench is invalid
at
org.eclipse.osgi.framework.internal.core.AbstractBundle.load BundleActivator(AbstractBundle.java:146)
at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.s tart(BundleContextImpl.java:980)
at
org.eclipse.osgi.framework.internal.core.BundleHost.startWor ker(BundleHost.java:346)
at
org.eclipse.osgi.framework.internal.core.AbstractBundle.star t(AbstractBundle.java:265)
at
org.eclipse.osgi.framework.util.SecureAction.start(SecureAct ion.java:400)
at
org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter .postFindLocalClass(EclipseLazyStarter.java:111)
at
org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLoc alClass(ClasspathManager.java:427)
at
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.fin dLocalClass(DefaultClassLoader.java:193)
at
org.eclipse.osgi.framework.internal.core.BundleLoader.findLo calClass(BundleLoader.java:368)
at
org.eclipse.osgi.framework.internal.core.BundleLoader.findCl assInternal(BundleLoader.java:444)
at
org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader.java:397)
at
org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader.java:385)
at
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loa dClass(DefaultClassLoader.java:87)
at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
at
org.eclipse.osgi.framework.internal.core.BundleLoader.loadCl ass(BundleLoader.java:313)
at
org.eclipse.osgi.framework.internal.core.BundleHost.loadClas s(BundleHost.java:227)
at
org.eclipse.osgi.framework.internal.core.AbstractBundle.load Class(AbstractBundle.java:1274)
at
org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI .createExecutableExtension(RegistryStrategyOSGI.java:160)
at
org.eclipse.core.internal.registry.ExtensionRegistry.createE xecutableExtension(ExtensionRegistry.java:867)
at
org.eclipse.core.internal.registry.ConfigurationElement.crea teExecutableExtension(ConfigurationElement.java:243)
at
org.eclipse.core.internal.registry.ConfigurationElementHandl e.createExecutableExtension(ConfigurationElementHandle.java: 51)
at
org.eclipse.equinox.internal.app.EclipseAppHandle.run(Eclips eAppHandle.java:188)
at
org.eclipse.equinox.internal.app.MainApplicationLauncher.run (MainApplicationLauncher.java:32)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .runApplication(EclipseAppLauncher.java:110)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .start(EclipseAppLauncher.java:79)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:382)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java: 549)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:504)
at org.eclipse.equinox.launcher.Main.run(Main.java:1236)
at org.eclipse.equinox.launcher.Main.main(Main.java:1212)
at org.eclipse.core.launcher.Main.main(Main.java:30)
Caused by: java.lang.NoClassDefFoundError: org/eclipse/swt/SWTError
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:23 89)
at java.lang.Class.getConstructor0(Class.java:2699)
at java.lang.Class.newInstance0(Class.java:326)
at java.lang.Class.newInstance(Class.java:308)
at
org.eclipse.osgi.framework.internal.core.AbstractBundle.load BundleActivator(AbstractBundle.java:141)
... 35 more
Caused by: java.lang.ClassNotFoundException: org.eclipse.swt.SWTError
at
org.eclipse.osgi.framework.internal.core.BundleLoader.findCl assInternal(BundleLoader.java:481)
at
org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader.java:397)
at
org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader.java:385)
at
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loa dClass(DefaultClassLoader.java:87)
at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320 )
... 41 more
Root exception:
In your post you are talking about export "product" and export application
as plugin. application is your sample application then what is product....
Please can you give the detail steps to do that.. It's very important for
me..Thanks in advance..
Thanks and Regards,
Saleem
|
|
|
|
Re: weired behavior when Running SWTBot Plugin Test from Ant [message #476971 is a reply to message #475128] |
Wed, 05 August 2009 23:15  |
Eclipse User |
|
|
|
On 6/8/09 03:43, saleem wrote:
> Command-line arguments: -application
> org.eclipse.swtbot.eclipse.junit4.headless.swtbottestapplica tion
> -testApplication org.eclipse.ui.ide.workbench -data workspace
> formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJU nitResultFormatter,C:/Users/Saleem/Desktop/plugin/eclipse/co m.rcp.view.example.MyFirstTest.xml
> formatter=org.apache.tools.ant.taskdefs.optional.junit.Plain JUnitResultFormatter
> -testPluginName com.rcp.view.example -className
> com.rcp.view.example.MyFirstTest -os win32 -ws workspace -arch x86
> -consoleLog -debug
The ws property should be win32 in your case ws stands for windowing
system and not workspace.
--
Ketan
http://studios.thoughtworks.com/twist | http://twitter.com/ketanpkr
|
|
|
Powered by
FUDForum. Page generated in 0.07156 seconds