Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Buckminster » junit command fails with 'Process {0} terminated with exit status {1}' for 'Junit Plug-in Test'
junit command fails with 'Process {0} terminated with exit status {1}' for 'Junit Plug-in Test' [message #515800] Sun, 21 February 2010 02:16 Go to next message
Ralf Ebert is currently offline Ralf EbertFriend
Messages: 72
Registered: July 2009
Member
Hi,

I just tried the new 'junit' command, works perfect for plain JUnit tests. Even Hudson picks up the build results
without a problem. This is great, thanks!

But running a 'Junit Plug-in Test' configuration (which runs perfectly from the IDE) fails with:

junit '-l' '/com.example.addressbook.uitests/Address Book UI Integration Tests.launch' '-o'
'/opt/hudson/jobs/addressbook_simple/workspace//test-reports /Address Book UI Integration Tests.xml'
ERROR: The application could not start. Details can be found in the log.
WARN: Process {0} terminated with exit status {1}.

This is not very helpful, what log is meant here? There is nothing in the buckminster headless log nor the debug output
nor the workspace log. Maybe the location of that log should be printed with the error message?

I'm using Buckminster 3.6 1.2.0.r11210.

Steps to reproduce:

- Get http://github.com/ralfebert/addressbook/commit/0426d37f5f5b8 50c2ac4ecc8c167426cfcae0097 ('Download source' link to
the upper right)
- Execute the following commands:

importtargetdefinition -A ${WORKSPACE}/features/com.example.addressbook.site/rcp.targe t
import '${WORKSPACE}/features/com.example.addressbook.site/site.cqu ery'
build
junit -l '/com.example.addressbook.tests/Addressbook Unit Tests.launch' -o '${WORKSPACE}/test-reports/Addressbook Unit
Tests.xml'
junit -l '/com.example.addressbook.uitests/Address Book UI Integration Tests.launch' -o
'${WORKSPACE}/test-reports/Address Book UI Integration Tests.xml'

Greetings,

Ralf

--
http://www.ralfebert.de/blog/eclipsercp/
Re: junit command fails with 'Process {0} terminated with exit status {1}' for 'Junit Plug-in Test' [message #515813 is a reply to message #515800] Sun, 21 February 2010 10:46 Go to previous messageGo to next message
Achim Demelt is currently offline Achim DemeltFriend
Messages: 160
Registered: July 2009
Senior Member
Hi Ralf,

That first message "The application could not start. Details can be found in
the log." comes from PDE itself. It typically indicates that one or more
bundles could not be resolved, mostly because of unresolved dependencies or
missing platform-specific fragments. You should find more information in the
log of the runtime workspace that PDE executes the tests in (e.g.
"${workspace_loc}/../junit-workspace" in the default launch configs).

The second message "Process {0} terminated with exit status {1}." comes from
Buckminster and isn't very helpful indeed. Could you please file a bug for
this last one?

Thanks,
Achim



Ralf Ebert wrote:

> Hi,
>
> I just tried the new 'junit' command, works perfect for plain JUnit tests.
> Even Hudson picks up the build results without a problem. This is great,
> thanks!
>
> But running a 'Junit Plug-in Test' configuration (which runs perfectly
> from the IDE) fails with:
>
> junit '-l' '/com.example.addressbook.uitests/Address Book UI Integration
> Tests.launch' '-o'
> '/opt/hudson/jobs/addressbook_simple/workspace//test-reports /Address Book
> UI Integration Tests.xml' ERROR: The application could not start. Details
> can be found in the log.
> WARN: Process {0} terminated with exit status {1}.
>
> This is not very helpful, what log is meant here? There is nothing in the
> buckminster headless log nor the debug output nor the workspace log. Maybe
> the location of that log should be printed with the error message?
>
> I'm using Buckminster 3.6 1.2.0.r11210.
>
> Steps to reproduce:
>
> - Get
>
http://github.com/ralfebert/addressbook/commit/0426d37f5f5b8 50c2ac4ecc8c167426cfcae0097
> ('Download source' link to the upper right) - Execute the following
> commands:
>
> importtargetdefinition -A
> ${WORKSPACE}/features/com.example.addressbook.site/rcp.targe t import
> '${WORKSPACE}/features/com.example.addressbook.site/site.cqu ery' build
> junit -l '/com.example.addressbook.tests/Addressbook Unit Tests.launch' -o
> '${WORKSPACE}/test-reports/Addressbook Unit Tests.xml'
> junit -l '/com.example.addressbook.uitests/Address Book UI Integration
> Tests.launch' -o '${WORKSPACE}/test-reports/Address Book UI Integration
> Tests.xml'
>
> Greetings,
>
> Ralf
>
Re: junit command fails with 'Process {0} terminated with exit status {1}' for 'Junit Plug-in Test' [message #515847 is a reply to message #515813] Sun, 21 February 2010 19:32 Go to previous messageGo to next message
Ralf Ebert is currently offline Ralf EbertFriend
Messages: 72
Registered: July 2009
Member
Hi Achim,

> That first message "The application could not start. Details can be found in
> the log." comes from PDE itself. It typically indicates that one or more
> bundles could not be resolved, mostly because of unresolved dependencies or
> missing platform-specific fragments. You should find more information in the
> log of the runtime workspace that PDE executes the tests in (e.g.
> "${workspace_loc}/../junit-workspace" in the default launch configs).

thanks, I investigated this a bit more, it doesn't even get that far.
workspace/.metadata/.plugins/org.eclipse.pde.core/AddressBoo kUITests/*.log says:

!ENTRY org.eclipse.equinox.launcher 4 0 2010-02-21 20:25:48.793
!MESSAGE Exception launching the Eclipse Platform:
!STACK
java.lang.ClassNotFoundException: org.eclipse.core.runtime.adaptor.EclipseStarter
at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
at java.lang.ClassLoader.loadClass(ClassLoader.java:319)
at java.lang.ClassLoader.loadClass(ClassLoader.java:264)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java: 556)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:514)
at org.eclipse.equinox.launcher.Main.run(Main.java:1311)
at org.eclipse.equinox.launcher.Main.main(Main.java:1287)

This is odd because a JUnit test runs without problems, and this Plug-in test is running with the exact same .target
file on the same platform in the IDE. Do I need to install something special into Buckminster (besides the core and pde
headless features?) I guess it's missing some dependency, but it doesn't give me a hint what might be missing...

Greetings,

Ralf


--
http://www.ralfebert.de/blog/eclipsercp/
Re: junit command fails with 'Process {0} terminated with exit status {1}' for 'Junit Plug-in Test' [message #515851 is a reply to message #515847] Sun, 21 February 2010 20:10 Go to previous messageGo to next message
Achim Demelt is currently offline Achim DemeltFriend
Messages: 160
Registered: July 2009
Senior Member
Hi Ralf,

Apart from the core and pde headless features, there's nothing you need to
install into Buckminster for JUnit testing.

Which version of the Eclipse IDE are you using? There have been some changes
regarding JUnit in Eclipse 3.6, so if you're using Eclipse 3.5 for
development and the latest Buckminster (based on 3.6) for headless builds,
there's a slight chance that the launch config needs to be adapted. Can you
please check that with a 3.6 IDE?

Also, please make sure that the "Clear the configuration area before
launching" option is selected, especially if you're using the same launch
config from both Eclipse 3.5 and headless 3.6. Otherwise, p2 might be
tempted to load bundles from locations that don't exist.

Cheers,
Achim

Ralf Ebert wrote:

> Hi Achim,
>
>> That first message "The application could not start. Details can be found
>> in the log." comes from PDE itself. It typically indicates that one or
>> more bundles could not be resolved, mostly because of unresolved
>> dependencies or missing platform-specific fragments. You should find more
>> information in the log of the runtime workspace that PDE executes the
>> tests in (e.g. "${workspace_loc}/../junit-workspace" in the default
>> launch configs).
>
> thanks, I investigated this a bit more, it doesn't even get that far.
> workspace/.metadata/.plugins/org.eclipse.pde.core/AddressBoo kUITests/*.log
> says:
>
> !ENTRY org.eclipse.equinox.launcher 4 0 2010-02-21 20:25:48.793
> !MESSAGE Exception launching the Eclipse Platform:
> !STACK
> java.lang.ClassNotFoundException:
> org.eclipse.core.runtime.adaptor.EclipseStarter at
> java.net.URLClassLoader$1.run(URLClassLoader.java:217) at
> java.security.AccessController.doPrivileged(Native Method) at
> java.net.URLClassLoader.findClass(URLClassLoader.java:205) at
> java.lang.ClassLoader.loadClass(ClassLoader.java:319) at
> java.lang.ClassLoader.loadClass(ClassLoader.java:264) at
> org.eclipse.equinox.launcher.Main.invokeFramework(Main.java: 556) at
> org.eclipse.equinox.launcher.Main.basicRun(Main.java:514) at
> org.eclipse.equinox.launcher.Main.run(Main.java:1311) at
> org.eclipse.equinox.launcher.Main.main(Main.java:1287)
>
> This is odd because a JUnit test runs without problems, and this Plug-in
> test is running with the exact same .target file on the same platform in
> the IDE. Do I need to install something special into Buckminster (besides
> the core and pde headless features?) I guess it's missing some dependency,
> but it doesn't give me a hint what might be missing...
>
> Greetings,
>
> Ralf
>
>
Re: junit command fails with 'Process {0} terminated with exit status {1}' for 'Junit Plug-in Test' [message #515855 is a reply to message #515851] Sun, 21 February 2010 20:38 Go to previous messageGo to next message
Ralf Ebert is currently offline Ralf EbertFriend
Messages: 72
Registered: July 2009
Member
Hi Achim,

thanks for the hints. I'm running with 3.6M5 IDE and Buckminster 3.6 1.2.0.r11210, clearing the configuration area is on
as per default. Any ideas how I could get more console output from the launched test process?

Greetings,

Ralf


--
http://www.ralfebert.de/blog/eclipsercp/
Re: junit command fails with 'Process {0} terminated with exit status {1}' for 'Junit Plug-in Test' [message #515903 is a reply to message #515855] Mon, 22 February 2010 03:16 Go to previous messageGo to next message
Achim Demelt is currently offline Achim DemeltFriend
Messages: 160
Registered: July 2009
Senior Member
Hi Ralf,

I'm afraid I don't exactly know what's wrong here. I'll debug into the
launch process in the next evenings. I'll let you know as soon as I know
more.

Cheers,
Achim

Ralf Ebert wrote:

> Hi Achim,
>
> thanks for the hints. I'm running with 3.6M5 IDE and Buckminster 3.6
> 1.2.0.r11210, clearing the configuration area is on as per default. Any
> ideas how I could get more console output from the launched test process?
>
> Greetings,
>
> Ralf
>
>
Re: junit command fails with 'Process {0} terminated with exit status {1}' for 'Junit Plug-in Test' [message #516392 is a reply to message #515903] Tue, 23 February 2010 20:22 Go to previous messageGo to next message
Achim Demelt is currently offline Achim DemeltFriend
Messages: 160
Registered: July 2009
Senior Member
Hi Ralf,

I tracked the problem deep down into the PDE code used for launching. It
does not collect all bundles that are relevant for the launch and as a
consequence the application cannot start. I am still trying to find out more
about this, but here's a workaround that worked for me, and it should also
work for you:

Copy the org.eclipse.pde.launching bundle from your Eclipse 3.6M5 IDE
(should be version 3.6.0.v20100120) into the plugins folder of your
buckmister headless installation. Then change the bundles.info file in the
configuration/org.eclipse.equinox.simpleconfigurator folder of your
buckminster headless. There should be a line that refers to the
pde.launching bundle. Simply change the version and path to the one you just
copied. After that, running the tests should work. Can you verify this?

In other words: We apparently package a newer version of the pde.launching
bundle than the one that is shipped with 3.6M5 and that version happens to
be broken for UI launching. I'll investigate. Thanks for reporting this.

Cheers,
Achim

Achim Demelt wrote:

> Hi Ralf,
>
> I'm afraid I don't exactly know what's wrong here. I'll debug into the
> launch process in the next evenings. I'll let you know as soon as I know
> more.
>
> Cheers,
> Achim
>
> Ralf Ebert wrote:
>
>> Hi Achim,
>>
>> thanks for the hints. I'm running with 3.6M5 IDE and Buckminster 3.6
>> 1.2.0.r11210, clearing the configuration area is on as per default. Any
>> ideas how I could get more console output from the launched test process?
>>
>> Greetings,
>>
>> Ralf
>>
>>
Re: junit command fails with 'Process {0} terminated with exit status {1}' for 'Junit Plug-in Test' [message #516401 is a reply to message #516392] Tue, 23 February 2010 15:38 Go to previous messageGo to next message
Achim Demelt is currently offline Achim DemeltFriend
Messages: 160
Registered: July 2009
Senior Member
FYI, I found out that recent changes in PDE launching code based on this
enhancement [1] have introduced this regression. See the last couple of
comments on this bug. The good news is that the PDE team seems to be
investigating this and we can have hope that upcoming versions of
Buckminster will work out-of-the-box again.

Cheers,
Achim

[1] https://bugs.eclipse.org/bugs/show_bug.cgi?id=284885

Achim Demelt wrote:

> Hi Ralf,
>
> I tracked the problem deep down into the PDE code used for launching. It
> does not collect all bundles that are relevant for the launch and as a
> consequence the application cannot start. I am still trying to find out
> more about this, but here's a workaround that worked for me, and it should
> also work for you:
>
> Copy the org.eclipse.pde.launching bundle from your Eclipse 3.6M5 IDE
> (should be version 3.6.0.v20100120) into the plugins folder of your
> buckmister headless installation. Then change the bundles.info file in the
> configuration/org.eclipse.equinox.simpleconfigurator folder of your
> buckminster headless. There should be a line that refers to the
> pde.launching bundle. Simply change the version and path to the one you
> just copied. After that, running the tests should work. Can you verify
> this?
>
> In other words: We apparently package a newer version of the pde.launching
> bundle than the one that is shipped with 3.6M5 and that version happens to
> be broken for UI launching. I'll investigate. Thanks for reporting this.
>
> Cheers,
> Achim
>
> Achim Demelt wrote:
>
>> Hi Ralf,
>>
>> I'm afraid I don't exactly know what's wrong here. I'll debug into the
>> launch process in the next evenings. I'll let you know as soon as I know
>> more.
>>
>> Cheers,
>> Achim
>>
>> Ralf Ebert wrote:
>>
>>> Hi Achim,
>>>
>>> thanks for the hints. I'm running with 3.6M5 IDE and Buckminster 3.6
>>> 1.2.0.r11210, clearing the configuration area is on as per default. Any
>>> ideas how I could get more console output from the launched test
>>> process?
>>>
>>> Greetings,
>>>
>>> Ralf
>>>
>>>
Re: junit command fails with 'Process {0} terminated with exit status {1}' for 'Junit Plug-in Test' [message #516447 is a reply to message #516392] Tue, 23 February 2010 23:31 Go to previous message
Ralf Ebert is currently offline Ralf EbertFriend
Messages: 72
Registered: July 2009
Member
Hi Achim,

> Copy the org.eclipse.pde.launching bundle from your Eclipse 3.6M5 IDE
> (should be version 3.6.0.v20100120) into the plugins folder of your
> buckmister headless installation. Then change the bundles.info file in the
> configuration/org.eclipse.equinox.simpleconfigurator folder of your
> buckminster headless. There should be a line that refers to the
> pde.launching bundle. Simply change the version and path to the one you just
> copied. After that, running the tests should work. Can you verify this?

yes, this fixed it. Thanks a lot, finally I can run UI tests in headless fashion with acceptable amounts of
configuration work, this is really great.

After configuring Xvfb (virtual X11 server) this runs even without interfering with the main Display, very cool!

Greetings,

Ralf



--
http://www.ralfebert.de/blog/eclipsercp/
Previous Topic:headless buckminster and silent fail
Next Topic:Import-Package
Goto Forum:
  


Current Time: Thu Apr 18 22:49:47 GMT 2024

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

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

Back to the top