Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » SWTBot » SWTBot headless problem(my osgi does not init bundle .swtbot..headless...)
SWTBot headless problem [message #705206] Fri, 29 July 2011 15:09 Go to next message
Bernhard Anzeletti is currently offline Bernhard Anzeletti
Messages: 10
Registered: July 2011
Location: Austria
Junior Member
Dear friends of RCP,

Currently I am trying to get SWTBot headless tests running using my Windows7 / Indigo / x86 (32bit) installation. I have a nice .cmd file (which can actually start my product in the target), but when I try with swtbottestapplication, things go terribly awry. The clue seems to be that the headless plugin asks for import package org.eclipse.ui (NOT Required Bundle), which osgi obviously does not want to provide.
Any help highly appreciated.

Kind regards,
Bernhard


Start Command
C:\ANBInstall\Sun\jdk32_6_23\bin\java ^
-Xms256m -Xmx768m -XX:MaxPermSize=512m ^
-classpath c:\ANBWork\ANBERNCommander.wip\test\eclipse\plugins\org.eclipse.equinox.launcher_1.2.0.v20110502.jar ^
org.eclipse.core.launcher.Main ^
-install C:/ANBWork/ANBERNCommander.wip/test/eclipse ^
-application org.eclipse.swtbot.eclipse.junit4.headless.swtbottestapplication ^
-testApplication com.anbern.commander.application ^
-product com.anbern.commander.product ^
-data C:/ANBWork/ANBERNCommander.wip/test/workspace ^
formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter,C:/ANBWork/ANBERNCommander.wip/test/result/TestResult.xml ^
-testPluginName com.anbern.commander.test ^
-className com.anbern.commander.test.CommanderUITest ^
-arch x86 ^
-debug ^
-consoleLog


Config.ini
(located in eclipse/configuration)
#Product Runtime Configuration File
osgi.bundles.defaultStartLevel=4
osgi.install.area=C:\ANBWork\ANBERNCommander.wip\test\eclipse
osgi.bundles=com.anbern.commander,\
  com.ibm.icu,\
  org.eclipse.core.commands,\
  org.eclipse.core.contenttype,\
  org.eclipse.core.databinding,\
  org.eclipse.core.databinding.beans,\
  org.eclipse.core.databinding.observable,\
  org.eclipse.core.databinding.property,\
  org.eclipse.core.expressions,\
  org.eclipse.core.jobs,\
  org.eclipse.core.runtime@start,\
  org.eclipse.core.runtime.compatibility.auth,\
  org.eclipse.equinox.common@2:start,\
  org.eclipse.equinox.preferences,\
  org.eclipse.equinox.registry,\
  org.eclipse.equinox.app,\
  org.eclipse.equinox.ds,\
  org.eclipse.equinox.launcher,\
  org.eclipse.equinox.simpleconfigurator,\
  org.eclipse.equinox.util,\
  org.eclipse.rcp,\
  org.eclipse.update.configurator,\
  org.eclipse.jface,\
  org.eclipse.jface.databinding,\
  org.eclipse.osgi.services,\
  org.eclipse.swt,\
  org.eclipse.swt.win32.win32.x86,\
  org.eclipse.ui,\
  org.eclipse.ui.workbench,\
  org.eclipse.help,\
  org.eclipse.core.runtime.compatibility,\
  org.apache.log4j,\
  org.hamcrest,\
  org.hamcrest.text,\
  org.hamcrest.library,\
  org.hamcrest.integration,\
  org.hamcrest.core,\
  org.apache.ant,\
  org.junit,\
  org.junit4,\
  org.eclipse.jdt.junit.runtime,\
  org.eclipse.swtbot.swt.finder,\
  org.eclipse.swtbot.junit4_x,\
  org.eclipse.swtbot.eclipse.finder,\
  org.eclipse.swtbot.eclipse.core,\
  org.eclipse.swtbot.ant.optional.junit4,\
  org.eclipse.swtbot.eclipse.junit4.headless


Result
Sadly, when I run all this I receive:
!ENTRY org.eclipse.osgi 2 0 2011-07-29 16:54:55.249
!MESSAGE One or more bundles are not resolved because the following root constraints are not resolved:
!SUBENTRY 1 org.eclipse.osgi 2 0 2011-07-29 16:54:55.249
!MESSAGE Bundle initial@reference:file:plugins/org.eclipse.swtbot.eclipse.junit4.headless_2.0.4.20110304_0338-e5aff47-dev-e36/ was not resolved.
!SUBENTRY 2 org.eclipse.swtbot.eclipse.junit4.headless 2 0 2011-07-29 16:54:55.249
!MESSAGE Missing imported package org.eclipse.ui_0.0.0.

!ENTRY org.eclipse.osgi 2 0 2011-07-29 16:54:55.265
!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 2011-07-29 16:54:55.265
!MESSAGE Bundle org.eclipse.swtbot.eclipse.junit4.headless_2.0.4.20110304_0338-e5aff47-dev-e36 [141] was not resolved.
!SUBENTRY 2 org.eclipse.swtbot.eclipse.junit4.headless 2 0 2011-07-29 16:54:55.265
!MESSAGE Missing imported package org.eclipse.ui_0.0.0.

!ENTRY org.eclipse.osgi 4 0 2011-07-29 16:54:55.265
!MESSAGE Application error
!STACK 1
java.lang.RuntimeException: Application "org.eclipse.swtbot.eclipse.junit4.headless.swtbottestapplication" could not be found in the registry. The applications available are: com.anbern.commander.application, org.eclipse.equinox.app.error, org.eclipse.swtbot.eclipse.core.swtbottestapplication.

[Updated on: Mon, 01 August 2011 07:00]

Report message to a moderator

Re: SWTBot headless problem [message #710871 is a reply to message #705206] Fri, 05 August 2011 14:13 Go to previous message
Ketan Padegaonkar is currently offline Ketan Padegaonkar
Messages: 873
Registered: July 2009
Senior Member
The org.eclipse.ui is contributed by a couple of plugins including the
org.eclipse.ui.workbench and org.eclipse.ui.ide plugins. I noticed that
the ide plugin is missing from your plugin list, perhaps that could be a
reason why.

There's also a troubleshooting guide for diagnosing headless startup
problems here on the wiki at http://wiki.eclipse.org/SWTBot/OSGi_Console
should you need to poke around which dependencies are missing.

-- Ketan

On 7/29/11 8:09 AM, Bernhard Anzeletti wrote:
> Dear friends of RCP,
>
> Currently I am trying to get SWTBot headless tests running using my
> Windows7 / Indigo / x86 (32bit) installation. I have a nice .cmd file
> (which can actually start my product in the target), but when I try with
> swtbottestapplication, things go terribly awry. The clue seems to be
> that the headless plugin asks for import package org.eclipse.ui (NOT
> Required Bundle), which osgi obviously does not want to provide.
> Any help highly appreciated.
>
> Kind regards,
> Bernhard
>
> Start Command
>
> C:\ANBInstall\Sun\jdk32_6_23\bin\java ^
> -Xms256m -Xmx768m -XX:MaxPermSize=512m ^
> -classpath
> c:\ANBWork\ANBERNCommander.wip\test\eclipse\plugins\org.eclipse.equinox.launcher_1.2.0.v20110502.jar
> ^
> org.eclipse.core.launcher.Main ^
> -install C:/ANBWork/ANBERNCommander.wip/test/eclipse ^
> -application
> org.eclipse.swtbot.eclipse.junit4.headless.swtbottestapplication ^
> -testApplication com.anbern.commander.application ^
> -product com.anbern.commander.product ^
> -data C:/ANBWork/ANBERNCommander.wip/test/workspace ^
> formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter,C:/ANBWork/ANBERNCommander.wip/test/result/TestResult.xml
> ^
> -testPluginName com.anbern.commander.test ^
> -className com.anbern.commander.test.CommanderUITest ^
> -arch x86 ^
> -debug ^
> -consoleLog
>
>
> Config.ini
> (located in eclipse/configuration)
>
> #Product Runtime Configuration File
> osgi.bundles.defaultStartLevel=4
> osgi.install.area=C:\ANBWork\ANBERNCommander.wip\test\eclipse
> osgi.bundles=com.anbern.commander,\
> com.ibm.icu,\
> org.eclipse.core.commands,\
> org.eclipse.core.contenttype,\
> org.eclipse.core.databinding,\
> org.eclipse.core.databinding.beans,\
> org.eclipse.core.databinding.observable,\
> org.eclipse.core.databinding.property,\
> org.eclipse.core.expressions,\
> org.eclipse.core.jobs,\
> org.eclipse.core.runtime@start,\
> org.eclipse.core.runtime.compatibility.auth,\
> org.eclipse.equinox.common@2:start,\
> org.eclipse.equinox.preferences,\
> org.eclipse.equinox.registry,\
> org.eclipse.equinox.app,\
> org.eclipse.equinox.ds,\
> org.eclipse.equinox.launcher,\
> org.eclipse.equinox.simpleconfigurator,\
> org.eclipse.equinox.util,\
> org.eclipse.rcp,\
> org.eclipse.update.configurator,\
> org.eclipse.jface,\
> org.eclipse.jface.databinding,\
> org.eclipse.osgi.services,\
> org.eclipse.swt,\
> org.eclipse.swt.win32.win32.x86,\
> org.eclipse.ui,\
> org.eclipse.ui.workbench,\
> org.eclipse.help,\
> org.eclipse.core.runtime.compatibility,\
> org.apache.log4j,\
> org.hamcrest,\
> org.hamcrest.text,\
> org.hamcrest.library,\
> org.hamcrest.integration,\
> org.hamcrest.core,\
> org.apache.ant,\
> org.junit,\
> org.junit4,\
> org.eclipse.jdt.junit.runtime,\
> org.eclipse.swtbot.swt.finder,\
> org.eclipse.swtbot.junit4_x,\
> org.eclipse.swtbot.eclipse.finder,\
> org.eclipse.swtbot.eclipse.core,\
> org.eclipse.swtbot.ant.optional.junit4,\
> org.eclipse.swtbot.eclipse.junit4.headless
>
>
> Result
> Sadly, when I run all this I receive:
>
> !ENTRY org.eclipse.osgi 2 0 2011-07-29 16:54:55.249
> !MESSAGE One or more bundles are not resolved because the following root
> constraints are not resolved:
> !SUBENTRY 1 org.eclipse.osgi 2 0 2011-07-29 16:54:55.249
> !MESSAGE Bundle
> initial@reference:file:plugins/org.eclipse.swtbot.eclipse.junit4.headless_2.0.4.20110304_0338-e5aff47-dev-e36/
> was not resolved.
> !SUBENTRY 2 org.eclipse.swtbot.eclipse.junit4.headless 2 0 2011-07-29
> 16:54:55.249
> !MESSAGE Missing imported package org.eclipse.ui_0.0.0.
>
> !ENTRY org.eclipse.osgi 2 0 2011-07-29 16:54:55.265
> !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 2011-07-29 16:54:55.265
> !MESSAGE Bundle
> org.eclipse.swtbot.eclipse.junit4.headless_2.0.4.20110304_0338-e5aff47-dev-e36
> [141] was not resolved.
> !SUBENTRY 2 org.eclipse.swtbot.eclipse.junit4.headless 2 0 2011-07-29
> 16:54:55.265
> !MESSAGE Missing imported package org.eclipse.ui_0.0.0.
>
> !ENTRY org.eclipse.osgi 4 0 2011-07-29 16:54:55.265
> !MESSAGE Application error
> !STACK 1
> java.lang.RuntimeException: Application
> "org.eclipse.swtbot.eclipse.junit4.headless.swtbottestapplication" could
> not be found in the registry. The applications available are:
> com.anbern.commander.application, org.eclipse.equinox.app.error,
> org.eclipse.swtbot.eclipse.core.swtbottestapplication.
>
Previous Topic:how to use multiple @RunWith annotations
Next Topic:Getting the Wizard member variables of One Page in other Wizard Page.
Goto Forum:
  


Current Time: Sun Sep 21 00:10:49 GMT 2014

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

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