eclipse-xtext / eclipse-xtext/xtext
The error occurs when running MWE2 for the Xtext grammar, based on the Xtend model
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 831
- Forks
- 330
- Avg merge
- 3d 7h
- Merged PRs (30d)
- 12
Description
The problem occurred in eclipse package "eclipse-dsl-2023-12-R" (windows/linux x64, xtend 2.33)
MW2 is reported (exception indicating a problem):
Caused by: java.lang.NoClassDefFoundError: org/slf4j/Logger
An example of projects to reproduce the problem is available in the public repository
https://github.com/fedorov-vk/xtext-xcore-sample.git
To simplest avoid the MW2 execution error,
- it is enough to add to MANIFEST.MF of org.example.library:
Import-Package: org.slf4j - or adding as external JAR the slf4j.api_2.0.9.jar into MWE2 launch configuration.
Follows is a little investigation.
-
First sequence of calls, what is caused error.
bundle: org.eclipse.xtext.xtext.generator_2.33.0.v20231121-0955.jar
method: XtextGeneratorResourceSetInitializer.ensureResourceCanBeLoaded()
call: xcore.getDeclaredMethod("doSetup", new Class[] {} ).invoke(null); -
Next, call doSetup:
bundle: org.eclipse.emf.ecore.xcore_1.27.0.v20231007-1413.jar
method: XcoreStandaloneSetup.doSetup -
Method doSetup - uses bundle: com.google.inject_7.0.0.jar
Google.inject - generates the above exception.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the failure with the linked xtext-xcore-sample project and the eclipse-dsl-2023-12-R package. Trace XtextGeneratorResourceSetInitializer.ensureResourceCanBeLoaded() into XcoreStandaloneSetup.doSetup and the Google Guice call, then inspect how org.slf4j.Logger is resolved for the MWE2 launch. Done means the reported MWE2 generation path no longer fails with NoClassDefFoundError without relying on the documented manual workaround.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- build-system, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 38/100