Discussion:
[tycho-user] Tycho Integration Test fails
Christian Eugster
2018-06-29 08:02:34 UTC
Permalink
Hi
I am following the tycho tutorial at http://www.vogella.com/tutorials/EclipseTycho/article.html. Up to chapter 12, everything went fine. Now I struggle with chapter 13. Exercise: Tycho build for SWTBot tests. With exception to the different names I followed exactly the steps described. I added the swtbot features as in 13.1, created a new plugin project and defined its dependencies as in 13.2, created a unit test according to 13.3, added the pom.xml as in 13.4, added the extraRequirement as in 13.5 and added the test module to the tests pom.xml.

Running the test gives me the following message on the command line:

...
Launching application org.eclipse.e4.ui.workbench.swt.E4Application...
***WARNING: Display must be created on main thread due to Cocoa restrictions.
An error has occurred. See the log file
/Users/christian/Projekte/Herakles/workspace-tycho/herakles/tests/herakles-rcp-it.tests/target/work/data/.metadata/.log.
...

The respective log output in target/work/data/.metadata/.log is:

!SESSION 2018-06-29 09:44:53.250 -----------------------------------------------
eclipse.buildId=unknown
java.version=1.8.0_172
java.vendor=Oracle Corporation
BootLoader constants: OS=macosx, ARCH=x86_64, WS=cocoa, NL=de_CH
Framework arguments: -application org.eclipse.tycho.surefire.osgibooter.uitest -testproperties /Users/christian/Projekte/Herakles/workspace-tycho/herakles/tests/herakles-rcp-it.tests/target/surefire.properties -testApplication org.eclipse.e4.ui.workbench.swt.E4Application -product herakles.rcp.product -nouithread
Command-line arguments: -data /Users/christian/Projekte/Herakles/workspace-tycho/herakles/tests/herakles-rcp-it.tests/target/work/data -application org.eclipse.tycho.surefire.osgibooter.uitest -testproperties /Users/christian/Projekte/Herakles/workspace-tycho/herakles/tests/herakles-rcp-it.tests/target/surefire.properties -testApplication org.eclipse.e4.ui.workbench.swt.E4Application -product herakles.rcp.product -nouithread

!ENTRY org.eclipse.equinox.app 0 0 2018-06-29 09:44:54.588
!MESSAGE Product herakles.rcp.product could not be found.

!ENTRY org.eclipse.swt.win32.win32.x86 2 0 2018-06-29 09:44:54.829
!MESSAGE Could not resolve module: org.eclipse.swt.win32.win32.x86 [97]
Unresolved requirement: Require-Capability: eclipse.platform; filter:="(& (osgi.ws=win32) (osgi.os=win32) (osgi.arch=x86))"


!ENTRY org.eclipse.swt.gtk.linux.x86_64 2 0 2018-06-29 09:44:54.830
!MESSAGE Could not resolve module: org.eclipse.swt.gtk.linux.x86_64 [96]
Unresolved requirement: Require-Capability: eclipse.platform; filter:="(& (osgi.ws=gtk) (osgi.os=linux) (osgi.arch=x86_64))"


!ENTRY org.eclipse.swt.win32.win32.x86_64 2 0 2018-06-29 09:44:54.830
!MESSAGE Could not resolve module: org.eclipse.swt.win32.win32.x86_64 [98]
Unresolved requirement: Require-Capability: eclipse.platform; filter:="(& (osgi.ws=win32) (osgi.os=win32) (osgi.arch=x86_64))"


!ENTRY org.eclipse.swt.gtk.linux.x86 2 0 2018-06-29 09:44:54.830
!MESSAGE Could not resolve module: org.eclipse.swt.gtk.linux.x86 [85]
Unresolved requirement: Require-Capability: eclipse.platform; filter:="(& (osgi.ws=gtk) (osgi.os=linux) (osgi.arch=x86))"


!ENTRY org.eclipse.osgi 4 0 2018-06-29 09:44:54.830
!MESSAGE Application error
!STACK 1
org.eclipse.swt.SWTException: Invalid thread access
at org.eclipse.swt.SWT.error(SWT.java:4533)
at org.eclipse.swt.SWT.error(SWT.java:4448)
at org.eclipse.swt.SWT.error(SWT.java:4419)
at org.eclipse.swt.widgets.Display.error(Display.java:1090)
at org.eclipse.swt.widgets.Display.createDisplay(Display.java:840)
at org.eclipse.swt.widgets.Display.create(Display.java:823)
at org.eclipse.swt.graphics.Device.<init>(Device.java:129)
at org.eclipse.swt.widgets.Display.<init>(Display.java:722)
at org.eclipse.swt.widgets.Display.<init>(Display.java:713)
at org.eclipse.swt.widgets.Display.getDefault(Display.java:1420)
at org.eclipse.e4.ui.internal.workbench.swt.E4Application.getApplicationDisplay(E4Application.java:131)
at org.eclipse.e4.ui.internal.workbench.swt.E4Application.start(E4Application.java:146)
at org.eclipse.tycho.surefire.osgibooter.UITestApplication.runApplication(UITestApplication.java:31)
at org.eclipse.tycho.surefire.osgibooter.AbstractUITestApplication.run(AbstractUITestApplication.java:120)
at org.eclipse.tycho.surefire.osgibooter.UITestApplication.start(UITestApplication.java:37)
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:653)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590)
at org.eclipse.equinox.launcher.Main.run(Main.java:1499)
at org.eclipse.equinox.launcher.Main.main(Main.java:1472)

I must admit, that I added Eclipse SDK to the target due to an error before, that the dependency org.eclipse.ui.ide.application 0.0.0 could not be found.

Has anyone an idea, what's the problem here?

Thank you!

Christian
Birenheide, Richard
2018-06-29 08:26:11 UTC
Permalink
Hi,

<useUiThread>false</useUiThread> is likely the culprit, as the framework will try to create the Display outside the main thread. According your log below, this is not allowed on Cocoa.

Regards
Richard

-----Original Message-----
From: tycho-user-***@eclipse.org [mailto:tycho-user-***@eclipse.org] On Behalf Of Christian Eugster
Sent: Freitag, 29. Juni 2018 10:03
To: tycho-***@eclipse.org
Subject: [tycho-user] Tycho Integration Test fails

Hi
I am following the tycho tutorial at http://www.vogella.com/tutorials/EclipseTycho/article.html. Up to chapter 12, everything went fine. Now I struggle with chapter 13. Exercise: Tycho build for SWTBot tests. With exception to the different names I followed exactly the steps described. I added the swtbot features as in 13.1, created a new plugin project and defined its dependencies as in 13.2, created a unit test according to 13.3, added the pom.xml as in 13.4, added the extraRequirement as in 13.5 and added the test module to the tests pom.xml.

Running the test gives me the following message on the command line:

...
Launching application org.eclipse.e4.ui.workbench.swt.E4Application...
***WARNING: Display must be created on main thread due to Cocoa restrictions.
An error has occurred. See the log file
/Users/christian/Projekte/Herakles/workspace-tycho/herakles/tests/herakles-rcp-it.tests/target/work/data/.metadata/.log.
...

The respective log output in target/work/data/.metadata/.log is:

!SESSION 2018-06-29 09:44:53.250 -----------------------------------------------
eclipse.buildId=unknown
java.version=1.8.0_172
java.vendor=Oracle Corporation
BootLoader constants: OS=macosx, ARCH=x86_64, WS=cocoa, NL=de_CH
Framework arguments: -application org.eclipse.tycho.surefire.osgibooter.uitest -testproperties /Users/christian/Projekte/Herakles/workspace-tycho/herakles/tests/herakles-rcp-it.tests/target/surefire.properties -testApplication org.eclipse.e4.ui.workbench.swt.E4Application -product herakles.rcp.product -nouithread
Command-line arguments: -data /Users/christian/Projekte/Herakles/workspace-tycho/herakles/tests/herakles-rcp-it.tests/target/work/data -application org.eclipse.tycho.surefire.osgibooter.uitest -testproperties /Users/christian/Projekte/Herakles/workspace-tycho/herakles/tests/herakles-rcp-it.tests/target/surefire.properties -testApplication org.eclipse.e4.ui.workbench.swt.E4Application -product herakles.rcp.product -nouithread

!ENTRY org.eclipse.equinox.app 0 0 2018-06-29 09:44:54.588
!MESSAGE Product herakles.rcp.product could not be found.

!ENTRY org.eclipse.swt.win32.win32.x86 2 0 2018-06-29 09:44:54.829
!MESSAGE Could not resolve module: org.eclipse.swt.win32.win32.x86 [97]
Unresolved requirement: Require-Capability: eclipse.platform; filter:="(& (osgi.ws=win32) (osgi.os=win32) (osgi.arch=x86))"


!ENTRY org.eclipse.swt.gtk.linux.x86_64 2 0 2018-06-29 09:44:54.830
!MESSAGE Could not resolve module: org.eclipse.swt.gtk.linux.x86_64 [96]
Unresolved requirement: Require-Capability: eclipse.platform; filter:="(& (osgi.ws=gtk) (osgi.os=linux) (osgi.arch=x86_64))"


!ENTRY org.eclipse.swt.win32.win32.x86_64 2 0 2018-06-29 09:44:54.830
!MESSAGE Could not resolve module: org.eclipse.swt.win32.win32.x86_64 [98]
Unresolved requirement: Require-Capability: eclipse.platform; filter:="(& (osgi.ws=win32) (osgi.os=win32) (osgi.arch=x86_64))"


!ENTRY org.eclipse.swt.gtk.linux.x86 2 0 2018-06-29 09:44:54.830
!MESSAGE Could not resolve module: org.eclipse.swt.gtk.linux.x86 [85]
Unresolved requirement: Require-Capability: eclipse.platform; filter:="(& (osgi.ws=gtk) (osgi.os=linux) (osgi.arch=x86))"


!ENTRY org.eclipse.osgi 4 0 2018-06-29 09:44:54.830
!MESSAGE Application error
!STACK 1
org.eclipse.swt.SWTException: Invalid thread access
at org.eclipse.swt.SWT.error(SWT.java:4533)
at org.eclipse.swt.SWT.error(SWT.java:4448)
at org.eclipse.swt.SWT.error(SWT.java:4419)
at org.eclipse.swt.widgets.Display.error(Display.java:1090)
at org.eclipse.swt.widgets.Display.createDisplay(Display.java:840)
at org.eclipse.swt.widgets.Display.create(Display.java:823)
at org.eclipse.swt.graphics.Device.<init>(Device.java:129)
at org.eclipse.swt.widgets.Display.<init>(Display.java:722)
at org.eclipse.swt.widgets.Display.<init>(Display.java:713)
at org.eclipse.swt.widgets.Display.getDefault(Display.java:1420)
at org.eclipse.e4.ui.internal.workbench.swt.E4Application.getApplicationDisplay(E4Application.java:131)
at org.eclipse.e4.ui.internal.workbench.swt.E4Application.start(E4Application.java:146)
at org.eclipse.tycho.surefire.osgibooter.UITestApplication.runApplication(UITestApplication.java:31)
at org.eclipse.tycho.surefire.osgibooter.AbstractUITestApplication.run(AbstractUITestApplication.java:120)
at org.eclipse.tycho.surefire.osgibooter.UITestApplication.start(UITestApplication.java:37)
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:653)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590)
at org.eclipse.equinox.launcher.Main.run(Main.java:1499)
at org.eclipse.equinox.launcher.Main.main(Main.java:1472)

I must admit, that I added Eclipse SDK to the target due to an error before, that the dependency org.eclipse.ui.ide.application 0.0.0 could not be found.

Has anyone an idea, what's the problem here?

Thank you!

Christian
Christian Eugster
2018-06-29 13:05:34 UTC
Permalink
Hi Richard

I first set <useUiThread>true</useUiThread> but that did not help, then I commented it out, helped neither. Do you have a hint, how I can fix this?

Thank you!

Christian
Post by Birenheide, Richard
Hi,
<useUiThread>false</useUiThread> is likely the culprit, as the framework will try to create the Display outside the main thread. According your log below, this is not allowed on Cocoa.
Regards
Richard
-----Original Message-----
Sent: Freitag, 29. Juni 2018 10:03
Subject: [tycho-user] Tycho Integration Test fails
Hi
I am following the tycho tutorial at http://www.vogella.com/tutorials/EclipseTycho/article.html. Up to chapter 12, everything went fine. Now I struggle with chapter 13. Exercise: Tycho build for SWTBot tests. With exception to the different names I followed exactly the steps described. I added the swtbot features as in 13.1, created a new plugin project and defined its dependencies as in 13.2, created a unit test according to 13.3, added the pom.xml as in 13.4, added the extraRequirement as in 13.5 and added the test module to the tests pom.xml.
...
Launching application org.eclipse.e4.ui.workbench.swt.E4Application...
***WARNING: Display must be created on main thread due to Cocoa restrictions.
An error has occurred. See the log file
/Users/christian/Projekte/Herakles/workspace-tycho/herakles/tests/herakles-rcp-it.tests/target/work/data/.metadata/.log.
...
!SESSION 2018-06-29 09:44:53.250 -----------------------------------------------
eclipse.buildId=unknown
java.version=1.8.0_172
java.vendor=Oracle Corporation
BootLoader constants: OS=macosx, ARCH=x86_64, WS=cocoa, NL=de_CH
Framework arguments: -application org.eclipse.tycho.surefire.osgibooter.uitest -testproperties /Users/christian/Projekte/Herakles/workspace-tycho/herakles/tests/herakles-rcp-it.tests/target/surefire.properties -testApplication org.eclipse.e4.ui.workbench.swt.E4Application -product herakles.rcp.product -nouithread
Command-line arguments: -data /Users/christian/Projekte/Herakles/workspace-tycho/herakles/tests/herakles-rcp-it.tests/target/work/data -application org.eclipse.tycho.surefire.osgibooter.uitest -testproperties /Users/christian/Projekte/Herakles/workspace-tycho/herakles/tests/herakles-rcp-it.tests/target/surefire.properties -testApplication org.eclipse.e4.ui.workbench.swt.E4Application -product herakles.rcp.product -nouithread
!ENTRY org.eclipse.equinox.app 0 0 2018-06-29 09:44:54.588
!MESSAGE Product herakles.rcp.product could not be found.
!ENTRY org.eclipse.swt.win32.win32.x86 2 0 2018-06-29 09:44:54.829
!MESSAGE Could not resolve module: org.eclipse.swt.win32.win32.x86 [97]
Unresolved requirement: Require-Capability: eclipse.platform; filter:="(& (osgi.ws=win32) (osgi.os=win32) (osgi.arch=x86))"
!ENTRY org.eclipse.swt.gtk.linux.x86_64 2 0 2018-06-29 09:44:54.830
!MESSAGE Could not resolve module: org.eclipse.swt.gtk.linux.x86_64 [96]
Unresolved requirement: Require-Capability: eclipse.platform; filter:="(& (osgi.ws=gtk) (osgi.os=linux) (osgi.arch=x86_64))"
!ENTRY org.eclipse.swt.win32.win32.x86_64 2 0 2018-06-29 09:44:54.830
!MESSAGE Could not resolve module: org.eclipse.swt.win32.win32.x86_64 [98]
Unresolved requirement: Require-Capability: eclipse.platform; filter:="(& (osgi.ws=win32) (osgi.os=win32) (osgi.arch=x86_64))"
!ENTRY org.eclipse.swt.gtk.linux.x86 2 0 2018-06-29 09:44:54.830
!MESSAGE Could not resolve module: org.eclipse.swt.gtk.linux.x86 [85]
Unresolved requirement: Require-Capability: eclipse.platform; filter:="(& (osgi.ws=gtk) (osgi.os=linux) (osgi.arch=x86))"
!ENTRY org.eclipse.osgi 4 0 2018-06-29 09:44:54.830
!MESSAGE Application error
!STACK 1
org.eclipse.swt.SWTException: Invalid thread access
at org.eclipse.swt.SWT.error(SWT.java:4533)
at org.eclipse.swt.SWT.error(SWT.java:4448)
at org.eclipse.swt.SWT.error(SWT.java:4419)
at org.eclipse.swt.widgets.Display.error(Display.java:1090)
at org.eclipse.swt.widgets.Display.createDisplay(Display.java:840)
at org.eclipse.swt.widgets.Display.create(Display.java:823)
at org.eclipse.swt.graphics.Device.<init>(Device.java:129)
at org.eclipse.swt.widgets.Display.<init>(Display.java:722)
at org.eclipse.swt.widgets.Display.<init>(Display.java:713)
at org.eclipse.swt.widgets.Display.getDefault(Display.java:1420)
at org.eclipse.e4.ui.internal.workbench.swt.E4Application.getApplicationDisplay(E4Application.java:131)
at org.eclipse.e4.ui.internal.workbench.swt.E4Application.start(E4Application.java:146)
at org.eclipse.tycho.surefire.osgibooter.UITestApplication.runApplication(UITestApplication.java:31)
at org.eclipse.tycho.surefire.osgibooter.AbstractUITestApplication.run(AbstractUITestApplication.java:120)
at org.eclipse.tycho.surefire.osgibooter.UITestApplication.start(UITestApplication.java:37)
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:653)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590)
at org.eclipse.equinox.launcher.Main.run(Main.java:1499)
at org.eclipse.equinox.launcher.Main.main(Main.java:1472)
I must admit, that I added Eclipse SDK to the target due to an error before, that the dependency org.eclipse.ui.ide.application 0.0.0 could not be found.
Has anyone an idea, what's the problem here?
Thank you!
Christian
_______________________________________________
tycho-user mailing list
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/tycho-user
Brian de Alwis
2018-06-29 13:47:04 UTC
Permalink
On MacOS you need to start Java with '-XstartOnFirstThread'. See the following for one approach:

https://wiki.eclipse.org/Tycho/FAQ#How_do_I_add_OS-specific_flags.3F

Brian.
Post by Christian Eugster
Hi Richard
I first set <useUiThread>true</useUiThread> but that did not help, then I commented it out, helped neither. Do you have a hint, how I can fix this?
Thank you!
Christian
Post by Birenheide, Richard
Hi,
<useUiThread>false</useUiThread> is likely the culprit, as the framework will try to create the Display outside the main thread. According your log below, this is not allowed on Cocoa.
Regards
Richard
-----Original Message-----
Sent: Freitag, 29. Juni 2018 10:03
Subject: [tycho-user] Tycho Integration Test fails
Hi
I am following the tycho tutorial at http://www.vogella.com/tutorials/EclipseTycho/article.html. Up to chapter 12, everything went fine. Now I struggle with chapter 13. Exercise: Tycho build for SWTBot tests. With exception to the different names I followed exactly the steps described. I added the swtbot features as in 13.1, created a new plugin project and defined its dependencies as in 13.2, created a unit test according to 13.3, added the pom.xml as in 13.4, added the extraRequirement as in 13.5 and added the test module to the tests pom.xml.
...
Launching application org.eclipse.e4.ui.workbench.swt.E4Application...
***WARNING: Display must be created on main thread due to Cocoa restrictions.
An error has occurred. See the log file
/Users/christian/Projekte/Herakles/workspace-tycho/herakles/tests/herakles-rcp-it.tests/target/work/data/.metadata/.log.
...
!SESSION 2018-06-29 09:44:53.250 -----------------------------------------------
eclipse.buildId=unknown
java.version=1.8.0_172
java.vendor=Oracle Corporation
BootLoader constants: OS=macosx, ARCH=x86_64, WS=cocoa, NL=de_CH
Framework arguments: -application org.eclipse.tycho.surefire.osgibooter.uitest -testproperties /Users/christian/Projekte/Herakles/workspace-tycho/herakles/tests/herakles-rcp-it.tests/target/surefire.properties -testApplication org.eclipse.e4.ui.workbench.swt.E4Application -product herakles.rcp.product -nouithread
Command-line arguments: -data /Users/christian/Projekte/Herakles/workspace-tycho/herakles/tests/herakles-rcp-it.tests/target/work/data -application org.eclipse.tycho.surefire.osgibooter.uitest -testproperties /Users/christian/Projekte/Herakles/workspace-tycho/herakles/tests/herakles-rcp-it.tests/target/surefire.properties -testApplication org.eclipse.e4.ui.workbench.swt.E4Application -product herakles.rcp.product -nouithread
!ENTRY org.eclipse.equinox.app 0 0 2018-06-29 09:44:54.588
!MESSAGE Product herakles.rcp.product could not be found.
!ENTRY org.eclipse.swt.win32.win32.x86 2 0 2018-06-29 09:44:54.829
!MESSAGE Could not resolve module: org.eclipse.swt.win32.win32.x86 [97]
Unresolved requirement: Require-Capability: eclipse.platform; filter:="(& (osgi.ws=win32) (osgi.os=win32) (osgi.arch=x86))"
!ENTRY org.eclipse.swt.gtk.linux.x86_64 2 0 2018-06-29 09:44:54.830
!MESSAGE Could not resolve module: org.eclipse.swt.gtk.linux.x86_64 [96]
Unresolved requirement: Require-Capability: eclipse.platform; filter:="(& (osgi.ws=gtk) (osgi.os=linux) (osgi.arch=x86_64))"
!ENTRY org.eclipse.swt.win32.win32.x86_64 2 0 2018-06-29 09:44:54.830
!MESSAGE Could not resolve module: org.eclipse.swt.win32.win32.x86_64 [98]
Unresolved requirement: Require-Capability: eclipse.platform; filter:="(& (osgi.ws=win32) (osgi.os=win32) (osgi.arch=x86_64))"
!ENTRY org.eclipse.swt.gtk.linux.x86 2 0 2018-06-29 09:44:54.830
!MESSAGE Could not resolve module: org.eclipse.swt.gtk.linux.x86 [85]
Unresolved requirement: Require-Capability: eclipse.platform; filter:="(& (osgi.ws=gtk) (osgi.os=linux) (osgi.arch=x86))"
!ENTRY org.eclipse.osgi 4 0 2018-06-29 09:44:54.830
!MESSAGE Application error
!STACK 1
org.eclipse.swt.SWTException: Invalid thread access
at org.eclipse.swt.SWT.error(SWT.java:4533)
at org.eclipse.swt.SWT.error(SWT.java:4448)
at org.eclipse.swt.SWT.error(SWT.java:4419)
at org.eclipse.swt.widgets.Display.error(Display.java:1090)
at org.eclipse.swt.widgets.Display.createDisplay(Display.java:840)
at org.eclipse.swt.widgets.Display.create(Display.java:823)
at org.eclipse.swt.graphics.Device.<init>(Device.java:129)
at org.eclipse.swt.widgets.Display.<init>(Display.java:722)
at org.eclipse.swt.widgets.Display.<init>(Display.java:713)
at org.eclipse.swt.widgets.Display.getDefault(Display.java:1420)
at org.eclipse.e4.ui.internal.workbench.swt.E4Application.getApplicationDisplay(E4Application.java:131)
at org.eclipse.e4.ui.internal.workbench.swt.E4Application.start(E4Application.java:146)
at org.eclipse.tycho.surefire.osgibooter.UITestApplication.runApplication(UITestApplication.java:31)
at org.eclipse.tycho.surefire.osgibooter.AbstractUITestApplication.run(AbstractUITestApplication.java:120)
at org.eclipse.tycho.surefire.osgibooter.UITestApplication.start(UITestApplication.java:37)
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:653)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590)
at org.eclipse.equinox.launcher.Main.run(Main.java:1499)
at org.eclipse.equinox.launcher.Main.main(Main.java:1472)
I must admit, that I added Eclipse SDK to the target due to an error before, that the dependency org.eclipse.ui.ide.application 0.0.0 could not be found.
Has anyone an idea, what's the problem here?
Thank you!
Christian
_______________________________________________
tycho-user mailing list
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/tycho-user
_______________________________________________
tycho-user mailing list
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/tycho-user
Christian Eugster
2018-07-02 07:22:56 UTC
Permalink
Hi

It seems that I am a step further :) I now get the following message, when I clean install the whole configuration (it is still the tutorial of vogella about tycho build). See the bold part of the output: I do not understand e.g. how the bundle rcp is connected to the product project. As you can see, it is the integration test that fails because it does not find applicationXMI. I don't know how to connect the product to the rcp bundle. Any hints? Thank you!

[INFO] Command line:
[/Library/Java/JavaVirtualMachines/jdk1.8.0_172.jdk/Contents/Home/jre/bin/java, -Dosgi.noShutdown=false, -Dosgi.os=macosx, -Dosgi.ws=cocoa, -Dosgi.arch=x86_64, -Xms40m, -Xmx1G, -XstartOnFirstThread, -Dosgi.clean=true, -jar, /Users/christian/.m2/repository/p2/osgi/bundle/org.eclipse.equinox.launcher/1.4.0.v20161219-1356/org.eclipse.equinox.launcher-1.4.0.v20161219-1356.jar, -data, /Users/christian/Projekte/Herakles/workspace-tycho/herakles/tests/herakles-rcp-it.tests/target/work/data, -install, /Users/christian/Projekte/Herakles/workspace-tycho/herakles/tests/herakles-rcp-it.tests/target/work, -configuration, /Users/christian/Projekte/Herakles/workspace-tycho/herakles/tests/herakles-rcp-it.tests/target/work/configuration, -application, org.eclipse.tycho.surefire.osgibooter.uitest, -testproperties, /Users/christian/Projekte/Herakles/workspace-tycho/herakles/tests/herakles-rcp-it.tests/target/surefire.properties, -testApplication, org.eclipse.e4.ui.workbench.swt.E4Application, -product, herakles.product, -nouithread]
Launching application org.eclipse.e4.ui.workbench.swt.E4Application...
applicationXMI parameter not set and no branding plugin defined.
java.lang.Exception
at org.eclipse.e4.ui.internal.workbench.swt.E4Application.lambda$12(E4Application.java:397)
at java.util.Optional.orElseGet(Optional.java:267)
at org.eclipse.e4.ui.internal.workbench.swt.E4Application.determineApplicationModelURI(E4Application.java:391)
at org.eclipse.e4.ui.internal.workbench.swt.E4Application.loadApplicationModel(E4Application.java:349)
at org.eclipse.e4.ui.internal.workbench.swt.E4Application.createE4Workbench(E4Application.java:253)
at org.eclipse.e4.ui.internal.workbench.swt.E4Application.start(E4Application.java:149)
at org.eclipse.tycho.surefire.osgibooter.UITestApplication.runApplication(UITestApplication.java:31)
at org.eclipse.tycho.surefire.osgibooter.AbstractUITestApplication.run(AbstractUITestApplication.java:120)
at org.eclipse.tycho.surefire.osgibooter.UITestApplication.start(UITestApplication.java:37)
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:653)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590)
at org.eclipse.equinox.launcher.Main.run(Main.java:1499)
at org.eclipse.equinox.launcher.Main.main(Main.java:1472)
An error has occurred. See the log file
/Users/christian/Projekte/Herakles/workspace-tycho/herakles/tests/herakles-rcp-it.tests/target/work/data/.metadata/.log.
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Herakles Root Project .............................. SUCCESS [ 0.106 s]
[INFO] Herakles Bundles Module ............................ SUCCESS [ 0.008 s]
[INFO] herakles.persistence.api ........................... SUCCESS [ 1.321 s]
[INFO] herakles.persistence.jpa ........................... SUCCESS [ 0.573 s]
[INFO] herakles.rcp ....................................... SUCCESS [ 0.199 s]
[INFO] Herakles Feature Project ........................... SUCCESS [ 0.008 s]
[INFO] herakles.feature ................................... SUCCESS [ 0.100 s]
[INFO] Herakles Release Engineering Project ............... SUCCESS [ 0.006 s]
[INFO] Herakles Repository Project ........................ SUCCESS [ 1.365 s]
[INFO] Herakles Product Project ........................... SUCCESS [ 17.335 s]
[INFO] Herakles Root Project .............................. SUCCESS [ 0.013 s]
[INFO] Herakles Tests Project ............................. SUCCESS [ 0.006 s]
[INFO] herakles.persistence.api.tests ..................... SUCCESS [ 2.275 s]
[INFO] herakles.persistence.jpa.tests ..................... SUCCESS [ 5.366 s]
[INFO] Herakles Integration Test Project .................. FAILURE [ 2.728 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 54.017 s
[INFO] Finished at: 2018-07-02T09:08:59+02:00
[INFO] Final Memory: 66M/718M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.eclipse.tycho:tycho-surefire-plugin:1.2.0:test (default-test) on project herakles-rcp-it.tests: An unexpected error occured while launching the test runtime (return code 13). See log /Users/christian/Projekte/Herakles/workspace-tycho/herakles/tests/herakles-rcp-it.tests/target/work/data/.metadata/.log for details. -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <goals> -rf :herakles-rcp-it.tests
Signierter PGP-Teil
Hi Richard
I first set <useUiThread>true</useUiThread> but that did not help, then I commented it out, helped neither. Do you have a hint, how I can fix this?
Thank you!
Christian
Post by Birenheide, Richard
Hi,
<useUiThread>false</useUiThread> is likely the culprit, as the framework will try to create the Display outside the main thread. According your log below, this is not allowed on Cocoa.
Regards
Richard
-----Original Message-----
Sent: Freitag, 29. Juni 2018 10:03
Subject: [tycho-user] Tycho Integration Test fails
Hi
I am following the tycho tutorial at http://www.vogella.com/tutorials/EclipseTycho/article.html. Up to chapter 12, everything went fine. Now I struggle with chapter 13. Exercise: Tycho build for SWTBot tests. With exception to the different names I followed exactly the steps described. I added the swtbot features as in 13.1, created a new plugin project and defined its dependencies as in 13.2, created a unit test according to 13.3, added the pom.xml as in 13.4, added the extraRequirement as in 13.5 and added the test module to the tests pom.xml.
...
Launching application org.eclipse.e4.ui.workbench.swt.E4Application...
***WARNING: Display must be created on main thread due to Cocoa restrictions.
An error has occurred. See the log file
/Users/christian/Projekte/Herakles/workspace-tycho/herakles/tests/herakles-rcp-it.tests/target/work/data/.metadata/.log.
...
!SESSION 2018-06-29 09:44:53.250 -----------------------------------------------
eclipse.buildId=unknown
java.version=1.8.0_172
java.vendor=Oracle Corporation
BootLoader constants: OS=macosx, ARCH=x86_64, WS=cocoa, NL=de_CH
Framework arguments: -application org.eclipse.tycho.surefire.osgibooter.uitest -testproperties /Users/christian/Projekte/Herakles/workspace-tycho/herakles/tests/herakles-rcp-it.tests/target/surefire.properties -testApplication org.eclipse.e4.ui.workbench.swt.E4Application -product herakles.rcp.product -nouithread
Command-line arguments: -data /Users/christian/Projekte/Herakles/workspace-tycho/herakles/tests/herakles-rcp-it.tests/target/work/data -application org.eclipse.tycho.surefire.osgibooter.uitest -testproperties /Users/christian/Projekte/Herakles/workspace-tycho/herakles/tests/herakles-rcp-it.tests/target/surefire.properties -testApplication org.eclipse.e4.ui.workbench.swt.E4Application -product herakles.rcp.product -nouithread
!ENTRY org.eclipse.equinox.app 0 0 2018-06-29 09:44:54.588
!MESSAGE Product herakles.rcp.product could not be found.
!ENTRY org.eclipse.swt.win32.win32.x86 2 0 2018-06-29 09:44:54.829
!MESSAGE Could not resolve module: org.eclipse.swt.win32.win32.x86 [97]
Unresolved requirement: Require-Capability: eclipse.platform; filter:="(& (osgi.ws=win32) (osgi.os=win32) (osgi.arch=x86))"
!ENTRY org.eclipse.swt.gtk.linux.x86_64 2 0 2018-06-29 09:44:54.830
!MESSAGE Could not resolve module: org.eclipse.swt.gtk.linux.x86_64 [96]
Unresolved requirement: Require-Capability: eclipse.platform; filter:="(& (osgi.ws=gtk) (osgi.os=linux) (osgi.arch=x86_64))"
!ENTRY org.eclipse.swt.win32.win32.x86_64 2 0 2018-06-29 09:44:54.830
!MESSAGE Could not resolve module: org.eclipse.swt.win32.win32.x86_64 [98]
Unresolved requirement: Require-Capability: eclipse.platform; filter:="(& (osgi.ws=win32) (osgi.os=win32) (osgi.arch=x86_64))"
!ENTRY org.eclipse.swt.gtk.linux.x86 2 0 2018-06-29 09:44:54.830
!MESSAGE Could not resolve module: org.eclipse.swt.gtk.linux.x86 [85]
Unresolved requirement: Require-Capability: eclipse.platform; filter:="(& (osgi.ws=gtk) (osgi.os=linux) (osgi.arch=x86))"
!ENTRY org.eclipse.osgi 4 0 2018-06-29 09:44:54.830
!MESSAGE Application error
!STACK 1
org.eclipse.swt.SWTException: Invalid thread access
at org.eclipse.swt.SWT.error(SWT.java:4533)
at org.eclipse.swt.SWT.error(SWT.java:4448)
at org.eclipse.swt.SWT.error(SWT.java:4419)
at org.eclipse.swt.widgets.Display.error(Display.java:1090)
at org.eclipse.swt.widgets.Display.createDisplay(Display.java:840)
at org.eclipse.swt.widgets.Display.create(Display.java:823)
at org.eclipse.swt.graphics.Device.<init>(Device.java:129)
at org.eclipse.swt.widgets.Display.<init>(Display.java:722)
at org.eclipse.swt.widgets.Display.<init>(Display.java:713)
at org.eclipse.swt.widgets.Display.getDefault(Display.java:1420)
at org.eclipse.e4.ui.internal.workbench.swt.E4Application.getApplicationDisplay(E4Application.java:131)
at org.eclipse.e4.ui.internal.workbench.swt.E4Application.start(E4Application.java:146)
at org.eclipse.tycho.surefire.osgibooter.UITestApplication.runApplication(UITestApplication.java:31)
at org.eclipse.tycho.surefire.osgibooter.AbstractUITestApplication.run(AbstractUITestApplication.java:120)
at org.eclipse.tycho.surefire.osgibooter.UITestApplication.start(UITestApplication.java:37)
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:653)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590)
at org.eclipse.equinox.launcher.Main.run(Main.java:1499)
at org.eclipse.equinox.launcher.Main.main(Main.java:1472)
I must admit, that I added Eclipse SDK to the target due to an error before, that the dependency org.eclipse.ui.ide.application 0.0.0 could not be found.
Has anyone an idea, what's the problem here?
Thank you!
Christian
_______________________________________________
tycho-user mailing list
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/tycho-user
Loading...