eclipse / xtext

Eclipse Xtext™ is a language development framework

Home Page:http://www.eclipse.org/Xtext

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

The error occurs when running MWE2 for the Xtext grammar, based on the Xtend model

fedorov-vk opened this issue · comments

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.

  1. 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);

  2. Next, call doSetup:
    bundle: org.eclipse.emf.ecore.xcore_1.27.0.v20231007-1413.jar
    method: XcoreStandaloneSetup.doSetup

  3. Method doSetup - uses bundle: com.google.inject_7.0.0.jar
    Google.inject - generates the above exception.

xcore version looks old.