Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Upgrade Xtext to 2.27: UI tests crash
Upgrade Xtext to 2.27: UI tests crash [message #1855184] Fri, 30 September 2022 14:41 Go to next message
Simon Cockx is currently offline Simon CockxFriend
Messages: 69
Registered: October 2021
Member
We recently upgraded Xtext from 2.25 to 2.27. Since then, we can still succesfully build our project with `mvn build`, but building the UI test project fails with the following message:

[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for com.regnosys.rosetta.parent 0.0.0.master:
[INFO]
[INFO] com.company.dsl.parent ........................ SUCCESS [  0.279 s]
[INFO] com.company.dsl ............................... SUCCESS [01:08 min]
[INFO] com.company.dsl.target ........................ SUCCESS [  0.124 s]
[INFO] com.company.dsl.tests ......................... SUCCESS [ 54.585 s]
[INFO] com.company.dsl.ide ........................... SUCCESS [  4.313 s]
[INFO] com.company.dsl.ui ............................ SUCCESS [  4.399 s]
[INFO] com.company.dsl.ui.tests ...................... FAILURE [ 12.832 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  03:42 min
[INFO] Finished at: 2022-09-30T16:24:27+02:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.eclipse.tycho:tycho-surefire-plugin:2.5.0:test (default-test) on project com.company.dsl.ui.tests: An unexpected error occurred while launching the test runtime (process returned error code 13 (HRESULT Code 0xD, check for example https://www.hresult.info/ for further details)). The process logfile C:\Users\Me\Desktop\dsl-project\com.company.dsl.ui.tests\target\work\data\.metadata\.log might contain further details. Command-line used to launch the sub-process was null -Dosgi.noShutdown=false -Dosgi.os=win32 -Dosgi.ws=win32 -Dosgi.arch=x86_64 -Dosgi.clean=true -jar C:\Users\Me\.m2\repository\p2\osgi\bundle\org.eclipse.equinox.launcher\1.6.400.v20210924-0641\org.eclipse.equinox.launcher-1.6.400.v20210924-0641.jar -data C:\Users\Me\project\com.company.dsl.ui.tests\target\work\data -install C:\Users\Me\project\com.company.dsl.ui.tests\target\work -configuration C:\Users\Me\project\com.company.dsl.ui.tests\target\work\configuration -application org.eclipse.tycho.surefire.osgibooter.uitest -testproperties C:\Users\Me\project\com.company.dsl.ui.tests\target\surefire.properties in working directory C:\Users\Me\project\com.company.dsl.ui.tests -> [Help 1]


The log file referenced in the error message contains an error
java.lang.NoClassDefFoundError: org/eclipse/core/resources/IResource
(see enclosed .log file).

Any idea on the cause or how to resolve this?




Just as a reference, we also had to update two other dependencies before the DSL build was succesful, but they seem unrelated:

1. MWE2 from 2.12.1 to 2.13.0
2. antlr-runtime from 3.2.0 to 4.11.1

  • Attachment: .log
    (Size: 4.04KB, Downloaded 71 times)
Re: Upgrade Xtext to 2.27: UI tests crash [message #1855186 is a reply to message #1855184] Fri, 30 September 2022 14:45 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14695
Registered: July 2009
Senior Member
Hi, which eclipse and java versions do you use? 2022-09 if i read log correct java 11? 17? which tycho version - can you try 2.7.5, is core resources on classpath of the tests project?

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Upgrade Xtext to 2.27: UI tests crash [message #1855187 is a reply to message #1855186] Fri, 30 September 2022 14:46 Go to previous messageGo to next message
Simon Cockx is currently offline Simon CockxFriend
Messages: 69
Registered: October 2021
Member
Hi, I'm indeed using Eclipse 2022-09 (4.25.0) and Java 11. Currently Tycho is on 2.5.0. I'll try updating...
Re: Upgrade Xtext to 2.27: UI tests crash [message #1855189 is a reply to message #1855187] Fri, 30 September 2022 15:14 Go to previous messageGo to next message
Simon Cockx is currently offline Simon CockxFriend
Messages: 69
Registered: October 2021
Member
Updated Tycho, still the same
Re: Upgrade Xtext to 2.27: UI tests crash [message #1855191 is a reply to message #1855189] Fri, 30 September 2022 15:37 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14695
Registered: July 2009
Senior Member
can you please provide a reproducer?

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Upgrade Xtext to 2.27: UI tests crash [message #1855192 is a reply to message #1855191] Fri, 30 September 2022 15:53 Go to previous messageGo to next message
Simon Cockx is currently offline Simon CockxFriend
Messages: 69
Registered: October 2021
Member
It should be reproducable when cloning this repo on branch 'update-dependencies': https://github.com/REGnosys/rosetta-dsl/tree/update-dependencies

Then running a `mvn clean install` with Java 11 should do the trick.

[Updated on: Fri, 30 September 2022 15:54]

Report message to a moderator

Re: Upgrade Xtext to 2.27: UI tests crash [message #1855197 is a reply to message #1855192] Fri, 30 September 2022 16:56 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14695
Registered: July 2009
Senior Member
dont get so far
Could not resolve dependencies for project com.regnosys.rosetta:com.regnosys.rosetta:eclipse-plugin:0.0.0.master: Could not find artifact org.eclipse.xsemantics:org.eclipse.xsemantics.runtime:jar:1.22.0-SNAPSHOT

also the target file seems to be inconsitent with old xtext version


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de

[Updated on: Fri, 30 September 2022 16:59]

Report message to a moderator

Re: Upgrade Xtext to 2.27: UI tests crash [message #1855216 is a reply to message #1855197] Sun, 02 October 2022 10:26 Go to previous messageGo to next message
Simon Cockx is currently offline Simon CockxFriend
Messages: 69
Registered: October 2021
Member
Quote:
dont get so far

Sorry, my bad. I've added the necessary repository to the pom. It should work now, I hope.

Quote:
also the target file seems to be inconsitent with old xtext version

Aha, good point. Actually a bit inconvenient to have two sources of truth - both the pom and the target file. I'll take a look at it on Monday. Do you by any chance know of a robust method of making them consistent?

[Updated on: Sun, 02 October 2022 10:28]

Report message to a moderator

Re: Upgrade Xtext to 2.27: UI tests crash [message #1855218 is a reply to message #1855216] Sun, 02 October 2022 12:56 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14695
Registered: July 2009
Senior Member
i dont know a way. but you seems to have a target file and p2 repos in pom

<repository>
<id>eclipse</id>
<layout>p2</layout>
<url>https://download.eclipse.org/releases/2022-09</url>
</repository>

i assume this leads to a bad mix of 2022-09 (pom) and older deps (target files)
see ./com.regnosys.rosetta.ui.tests/target/work/configuration/config.ini
which has

org.eclipse.core.resources/3.16.0.v20211001-2032
and
bundle/org.eclipse.ui.ide/3.19.100.v20220820-0412
with
Require-Bundle: org.eclipse.core.resources;bundle-version="[3.17.0,4.0.0
)";resolution:=optional,
which are inconsistent


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de

[Updated on: Sun, 02 October 2022 14:02]

Report message to a moderator

Re: Upgrade Xtext to 2.27: UI tests crash [message #1855226 is a reply to message #1855218] Mon, 03 October 2022 07:59 Go to previous message
Simon Cockx is currently offline Simon CockxFriend
Messages: 69
Registered: October 2021
Member
You're right. Removing that repository and rebuilding did the trick. Thanks for your time, the help is much appreciated!
Previous Topic:state for support of Python-like whitespace-/newline-sensitive languages
Next Topic:Xtext 2.29.0.M1 is out
Goto Forum:
  


Current Time: Thu Jul 18 03:33:45 GMT 2024

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

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

Back to the top