[jbosstools-issues] [JBoss JIRA] (JBIDE-11666) Add -XstartOnFirstThread as a command line argument for Mac

Nick Boldt (JIRA) jira-events at lists.jboss.org
Tue May 1 16:41:18 EDT 2012


    [ https://issues.jboss.org/browse/JBIDE-11666?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12689263#comment-12689263 ] 

Nick Boldt commented on JBIDE-11666:
------------------------------------

Lucia:

1. please verify that Maven thinks your java.vendor.url = "http://www.apple.com/". If it doesn't then this profile is not being enabled and we need to find another way to force the profile to be turned on.

2. If the above IS working, then try setting your own values in your test's pom:

{code}
<properties>
<systemProperties combine.children="append">${additionalSystemProperties} -d32 -Dosgi.arch=x86 -XstartOnFirstThread -Djbosstools.test.jboss-gatein.home=${jbosstools.test.jboss-gatein.home} -Djbosstools.test.jboss-seam-2.2.home=${jbosstools.test.jboss-seam-2.2.home} -Djbosstools.test.jboss-portal.home=${jbosstools.test.jboss-portal.home} -Djbosstools.test.jboss-seam-2.0.home=${jbosstools.test.jboss-seam-2.0.home} -Djbosstools.test.jboss-portlet-bridge.home=${jbosstools.test.jboss-portlet-bridge.home} -Dtest.configurations.dir=${configurations.dir}  -Dorg.eclipse.swtbot.screenshots.dir=${project.build.directory}/screenshots</systemProperties>
</properties>
{code}

Does that work? If so, what do you suggest we add to the parent pom so it's set globally instead having to set in every test plugin's pom.xml?


                
> Add -XstartOnFirstThread as a command line argument for Mac
> -----------------------------------------------------------
>
>                 Key: JBIDE-11666
>                 URL: https://issues.jboss.org/browse/JBIDE-11666
>             Project: Tools (JBoss Tools)
>          Issue Type: Feature Request
>          Components: Build/Releng
>    Affects Versions: 3.3.0.Beta3
>            Reporter: Lucia Jelinkova
>            Assignee: Nick Boldt
>
> I am trying to run SWTBot tests on Jenkins on a Mac OS slave. By default, it fails with the following error:
> {code}
> rg.eclipse.swt.SWTException: Invalid thread access
> 	at org.eclipse.swt.SWT.error(SWT.java:4282)
> 	at org.eclipse.swt.SWT.error(SWT.java:4197)
> 	at org.eclipse.swt.SWT.error(SWT.java:4168)
> 	at org.eclipse.swt.widgets.Display.error(Display.java:1065)
> 	at org.eclipse.swt.widgets.Display.createDisplay(Display.java:822)
> 	at org.eclipse.swt.widgets.Display.create(Display.java:805)
> 	at org.eclipse.swt.graphics.Device.<init>(Device.java:130)
> 	at org.eclipse.swt.widgets.Display.<init>(Display.java:696)
> 	at org.eclipse.swt.widgets.Display.<init>(Display.java:687)
> 	at org.eclipse.ui.internal.Workbench.createDisplay(Workbench.java:716)
> 	at org.eclipse.ui.PlatformUI.createDisplay(PlatformUI.java:161)
> 	at org.eclipse.ui.internal.ide.application.IDEApplication.createDisplay(IDEApplication.java:153)
> 	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:95)
> 	at org.eclipse.tycho.surefire.osgibooter.UITestApplication.runApplication(UITestApplication.java:31)
> 	at org.eclipse.tycho.surefire.osgibooter.AbstractUITestApplication.run(AbstractUITestApplication.java:114)
> 	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:110)
> 	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
> 	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:344)
> 	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:597)
> 	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622)
> 	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
> 	at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
> 	at org.eclipse.equinox.launcher.Main.main(Main.java:1386)
> {code}
> I've found out that the Display needs to be created on thread 0 - this can be accomplished by adding -XstartOnFirstThread as a VM argument. However, the VM on Linux cannot handle the parameter, so it needs to be specified only for Mac. 
> In order not to repeat the configuration in every test module. Could you please provide a new profile in parent pom activated for Mac that would add the mentioned parameter to the tycho-surefire-plugin's argLine property?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the jbosstools-issues mailing list