Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Xtend IDE 2.21 editor doesn't open and can't build workspace
Xtend IDE 2.21 editor doesn't open and can't build workspace [message #1856369] Wed, 07 December 2022 16:14 Go to next message
Leo K is currently offline Leo KFriend
Messages: 4
Registered: August 2015
Junior Member
I'm trying to setup the IDE for a legacy project that I have to maintain but I can't get the Xtend IDE 2.21 plugin to work correctly in Eclipse 2018-12. The Xtend editor doesn't open and I encounter errors when building the workspace. Unfortunately I don't really have the option to use any other versions of Eclipse or Xtend due to certain important plugins that are incompatible with later versions.

I've reproduced the issue on different machines with these steps:

1. Install Eclipse 2018-12 (Eclipse for Committers, JDK 8) using the Eclipse Installer
2. Add Updatesite http://download.eclipse.org/modeling/tmf/xtext/updates/composite/releases/
3. Install 'Xtend IDE' version 2.21, restart Eclipse
4. Create a new Xtend project with an Xtend class (e.g. the Xtend Introductory Example)

When opening any .xtend files, it doesn't open the file in the Xtend editor but in the simple text editor and asks me to search for marketplace for extensions.

When building the project I get a popup dialog with following message:

> 'Building Workspace' encountered a problem.
> Errors occurred during the build.
> Error instantiating builder 'org.eclipse.xtext.ui.shared.xtextBuilder'.
> Plug-in org.eclipse.xtext.ui.shared was unable to load class org.eclipse.xtext.ui.shared.internal.ExecutableExtensionFactory.
> org/eclipse/xtext/ui/guice/AbstractGuiceAwareExecutableExtensionFactory
> Plug-in org.eclipse.xtext.ui.shared was unable to load class org.eclipse.xtext.ui.shared.internal.ExecutableExtensionFactory.
> org/eclipse/xtext/ui/guice/AbstractGuiceAwareExecutableExtensionFactory

My colleagues told me that this combination of Eclipse+Xtend versions used to work without problems. I've also tried with JDK 11 as well as with Eclipse 2018-12 for DSL developers, which has Xtend 2.16 preinstalled. The default installation works as expected but after upgrading to 2.21 I get the same errors.

The error message lead me to https://www.eclipse.org/forums/index.php/t/1073549/ and https://github.com/eclipse/xtext-eclipse/issues/12 but it seems both cases are about launching products. In my case the issue occurs in my dev environment so the suggestion to change the order in the launch configuration doesn't work for me. I've tried to change the startup order in the bundles.info file but that didn't work.

Any ideas what I can do about this?

[Updated on: Wed, 07 December 2022 16:14]

Report message to a moderator

Re: Xtend IDE 2.21 editor doesn't open and can't build workspace [message #1856371 is a reply to message #1856369] Wed, 07 December 2022 16:22 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14661
Registered: July 2009
Senior Member
you need to provide a complete stacktrace for

Plug-in org.eclipse.xtext.ui.shared was unable to load class org.eclipse.xtext.ui.shared.internal.ExecutableExtensionFactory.
> org/eclipse/xtext/ui/guice/AbstractGuiceAwareExecutableExtensionFactory

you can also check the osgi state of the different xtext bundles
using the "host osgi console"

ss xtext

and then

start <number>

for xtext stuff that is not active


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

[Updated on: Wed, 07 December 2022 16:25]

Report message to a moderator

Re: Xtend IDE 2.21 editor doesn't open and can't build workspace [message #1856376 is a reply to message #1856371] Wed, 07 December 2022 19:14 Go to previous messageGo to next message
Leo K is currently offline Leo KFriend
Messages: 4
Registered: August 2015
Junior Member
Stack trace from the workspace .log file
!ENTRY org.eclipse.jdt.core 4 2 2022-12-07 18:33:00.919
!MESSAGE Problems occurred when invoking code from plug-in: "org.eclipse.jdt.core".
!STACK 1
org.eclipse.core.runtime.CoreException: Plug-in org.eclipse.xtext.ui.shared was unable to load class org.eclipse.xtext.ui.shared.internal.ExecutableExtensionFactory.
	at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.throwException(RegistryStrategyOSGI.java:216)
	at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:200)
	at org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(ExtensionRegistry.java:934)
	at org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:246)
	at org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(ConfigurationElementHandle.java:63)
	at org.eclipse.jdt.internal.core.JavaModelManager$CompilationParticipants$1.run(JavaModelManager.java:466)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
	at org.eclipse.jdt.internal.core.JavaModelManager$CompilationParticipants.getCompilationParticipants(JavaModelManager.java:459)
	at org.eclipse.jdt.internal.core.builder.JavaBuilder.initializeBuilder(JavaBuilder.java:610)
	at org.eclipse.jdt.internal.core.builder.JavaBuilder.clean(JavaBuilder.java:303)
	at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:835)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
	at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:220)
	at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:263)
	at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:316)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
	at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:319)
	at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:371)
	at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:392)
	at org.eclipse.core.internal.resources.Workspace.buildInternal(Workspace.java:504)
	at org.eclipse.core.internal.resources.Workspace.build(Workspace.java:404)
	at org.eclipse.ui.internal.ide.dialogs.CleanDialog.doClean(CleanDialog.java:455)
	at org.eclipse.ui.internal.ide.dialogs.CleanDialog$1.runInWorkspace(CleanDialog.java:207)
	at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:42)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
Caused by: java.lang.NoClassDefFoundError: org/eclipse/xtext/ui/guice/AbstractGuiceAwareExecutableExtensionFactory
	at java.lang.ClassLoader.defineClass1(Native Method)
	at java.lang.ClassLoader.defineClass(ClassLoader.java:756)
	at org.eclipse.osgi.internal.loader.ModuleClassLoader.defineClass(ModuleClassLoader.java:279)
	at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.defineClass(ClasspathManager.java:703)
	at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findClassImpl(ClasspathManager.java:626)
	at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findLocalClassImpl(ClasspathManager.java:594)
	at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findLocalClassImpl(ClasspathManager.java:574)
	at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findLocalClass(ClasspathManager.java:553)
	at org.eclipse.osgi.internal.loader.ModuleClassLoader.findLocalClass(ModuleClassLoader.java:331)
	at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:395)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:473)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:422)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:414)
	at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:153)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
	at org.eclipse.osgi.internal.framework.EquinoxBundle.loadClass(EquinoxBundle.java:612)
	at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:196)
	... 23 more
Caused by: java.lang.ClassNotFoundException: org.eclipse.xtext.ui.guice.AbstractGuiceAwareExecutableExtensionFactory cannot be found by org.eclipse.xtext.ui.shared_2.21.0.v20200302-1241
	at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:511)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:422)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:414)
	at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:153)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
	... 40 more


Here's the osgi status. (Sorry I should have checked that before. I took a break from developing with Eclipse and OSGi and didn't remember about the console)

osgi> ss xtext
"Framework is launched."

id      State       Bundle
561     INSTALLED   org.eclipse.xtext_2.21.0.v20200302-1141
562     INSTALLED   org.eclipse.xtext.builder_2.21.0.v20200302-1241
563     INSTALLED   org.eclipse.xtext.builder.standalone_2.21.0.v20200302-1201
564     INSTALLED   org.eclipse.xtext.buildship_2.21.0.v20200302-1241
565     INSTALLED   org.eclipse.xtext.common.types_2.21.0.v20200302-1201
566     INSTALLED   org.eclipse.xtext.common.types.edit_2.21.0.v20200302-1241
567     INSTALLED   org.eclipse.xtext.common.types.shared_2.21.0.v20200302-1241
568     INSTALLED   org.eclipse.xtext.common.types.shared.jdt38_2.21.0.v20200302-1241
569     INSTALLED   org.eclipse.xtext.common.types.ui_2.21.0.v20200302-1241
570     INSTALLED   org.eclipse.xtext.ecore_2.21.0.v20200302-1201
571     INSTALLED   org.eclipse.xtext.generator_2.21.0.v20200302-1201
572     INSTALLED   org.eclipse.xtext.ide_2.21.0.v20200302-1141
573     INSTALLED   org.eclipse.xtext.java_2.21.0.v20200302-1201
574     INSTALLED   org.eclipse.xtext.junit4_2.21.0.v20200302-1241
575     RESOLVED    org.eclipse.xtext.logging_1.2.15.v20200302-1241
                    Master=49
576     INSTALLED   org.eclipse.xtext.m2e_2.21.0.v20200302-1241
577     INSTALLED   org.eclipse.xtext.smap_2.21.0.v20200302-1201
578     INSTALLED   org.eclipse.xtext.testing_2.21.0.v20200302-1141
579     INSTALLED   org.eclipse.xtext.ui_2.21.0.v20200302-1241
580     INSTALLED   org.eclipse.xtext.ui.codemining_2.21.0.v20200302-1241
581     INSTALLED   org.eclipse.xtext.ui.codetemplates_2.21.0.v20200302-1241
582     INSTALLED   org.eclipse.xtext.ui.codetemplates.ide_2.21.0.v20200302-1241
583     INSTALLED   org.eclipse.xtext.ui.codetemplates.ui_2.21.0.v20200302-1241
584     INSTALLED   org.eclipse.xtext.ui.ecore_2.21.0.v20200302-1241
585     STARTING    org.eclipse.xtext.ui.shared_2.21.0.v20200302-1241
586     INSTALLED   org.eclipse.xtext.ui.testing_2.21.0.v20200302-1241
587     INSTALLED   org.eclipse.xtext.util_2.21.0.v20200302-1141
588     INSTALLED   org.eclipse.xtext.xbase_2.29.0.v20221121-0924
589     INSTALLED   org.eclipse.xtext.xbase.ide_2.29.0.v20221121-0924
590     INSTALLED   org.eclipse.xtext.xbase.junit_2.21.0.v20200302-1241
591     INSTALLED   org.eclipse.xtext.xbase.lib_2.29.0.v20221121-0915
592     RESOLVED    org.eclipse.xtext.xbase.lib_2.21.0.v20200302-1127
593     INSTALLED   org.eclipse.xtext.xbase.testing_2.21.0.v20200302-1201
594     INSTALLED   org.eclipse.xtext.xbase.ui_2.29.0.v20221121-0943
595     INSTALLED   org.eclipse.xtext.xbase.ui.testing_2.21.0.v20200302-1241
596     INSTALLED   org.eclipse.xtext.xtext.generator_2.21.0.v20200302-1141
597     INSTALLED   org.eclipse.xtext.xtext.ide_2.21.0.v20200302-1141
598     INSTALLED   org.eclipse.xtext.xtext.wizard_2.21.0.v20200302-1141

osgi> ss xtend
"Framework is launched."

id      State       Bundle
550     INSTALLED   org.eclipse.xtend_2.2.0.v201605260315
551     INSTALLED   org.eclipse.xtend.core_2.21.0.v20200302-1428
552     STARTING    org.eclipse.xtend.doc_2.21.0.v20200302-1428
553     STARTING    org.eclipse.xtend.examples_2.21.0.v20200302-1428
554     INSTALLED   org.eclipse.xtend.ide_2.21.0.v20200302-1428
555     INSTALLED   org.eclipse.xtend.ide.common_2.21.0.v20200302-1428
556     RESOLVED    org.eclipse.xtend.lib_2.21.0.v20200302-1127
557     RESOLVED    org.eclipse.xtend.lib.macro_2.21.0.v20200302-1127
558     INSTALLED   org.eclipse.xtend.m2e_2.21.0.v20200302-1428
559     INSTALLED   org.eclipse.xtend.standalone_2.21.0.v20200302-1428
560     INSTALLED   org.eclipse.xtend.typesystem.emf_2.2.0.v201605260315

osgi> ss mwe
"Framework is launched."

id      State       Bundle
546     INSTALLED   org.eclipse.emf.mwe.core_1.8.0.v20221117-1134
547     INSTALLED   org.eclipse.emf.mwe.utils_1.8.0.v20221117-1134
548     INSTALLED   org.eclipse.emf.mwe2.runtime_2.14.0.v20221117-1134


So nothing is active. I'm wondering here about the different Xtext 2.21 and Xbase 2.29 versions. Don't they need to match?
Also according to the Xtend release notes, Xtend 2.21 uses MWE(2) 2.11.2/1.5.2 but it seems I'm running later versions.

Starting the org.eclipse.xtext bundle gives me:

osgi> start 561
org.osgi.framework.BundleException: Could not resolve module: org.eclipse.xtext [561]
  Unresolved requirement: Require-Bundle: org.eclipse.xtend; bundle-version="2.2.0"; resolution:="optional"
    -> Bundle-SymbolicName: org.eclipse.xtend; bundle-version="2.2.0.v201605260315"
       org.eclipse.xtend [550]
         Unresolved requirement: Require-Bundle: org.eclipse.emf.mwe.core; visibility:="reexport"
           -> Bundle-SymbolicName: org.eclipse.emf.mwe.core; bundle-version="1.8.0.v20221117-1134"; singleton:="true"
              org.eclipse.emf.mwe.core [546]
                Unresolved requirement: Require-Capability: osgi.ee; filter:="(&(osgi.ee=JavaSE)(version=11))"
                Unresolved requirement: Require-Bundle: org.eclipse.emf.mwe2.runtime; bundle-version="2.14.0"; visibility:="reexport"
                  -> Bundle-SymbolicName: org.eclipse.emf.mwe2.runtime; bundle-version="2.14.0.v20221117-1134"
                     org.eclipse.emf.mwe2.runtime [548]
                       Unresolved requirement: Require-Capability: osgi.ee; filter:="(&(osgi.ee=JavaSE)(version=11))"
  Unresolved requirement: Require-Bundle: org.eclipse.xtext.util; visibility:="reexport"
    -> Bundle-SymbolicName: org.eclipse.xtext.util; bundle-version="2.21.0.v20200302-1141"
       org.eclipse.xtext.util [587]
         No resolution report for the bundle.  Unresolved requirement: Require-Bundle: org.eclipse.emf.mwe.core; bundle-version="1.3.21"; visibility:="reexport"; resolution:="optional"
    -> Bundle-SymbolicName: org.eclipse.emf.mwe.core; bundle-version="1.8.0.v20221117-1134"; singleton:="true"
  Unresolved requirement: Require-Bundle: org.eclipse.xtend.typesystem.emf; bundle-version="2.2.0"; resolution:="optional"
    -> Bundle-SymbolicName: org.eclipse.xtend.typesystem.emf; bundle-version="2.2.0.v201605260315"; singleton:="true"
       org.eclipse.xtend.typesystem.emf [560]
         Unresolved requirement: Import-Package: org.eclipse.emf.mwe.utils
           -> Export-Package: org.eclipse.emf.mwe.utils; bundle-symbolic-name="org.eclipse.emf.mwe.utils"; bundle-version="1.8.0.v20221117-1134"; version="0.0.0"
              org.eclipse.emf.mwe.utils [547]
                Unresolved requirement: Require-Bundle: org.eclipse.emf.mwe.core
                  -> Bundle-SymbolicName: org.eclipse.emf.mwe.core; bundle-version="1.8.0.v20221117-1134"; singleton:="true"
  Unresolved requirement: Require-Bundle: org.eclipse.emf.mwe.utils; bundle-version="1.3.21"; visibility:="reexport"; resolution:="optional"
    -> Bundle-SymbolicName: org.eclipse.emf.mwe.utils; bundle-version="1.8.0.v20221117-1134"
  Bundle was not resolved because of a uses constraint violation.
  org.apache.felix.resolver.reason.ReasonException: Uses constraint violation. Unable to resolve resource org.eclipse.xtext [osgi.identity; type="osgi.bundle"; version:Version="2.21.0.v20200302-1141"; osgi.identity="org.eclipse.xtext"; singleton:="true"] because it is exposed to package 'com.google.common.base' from resources com.google.guava [osgi.identity; type="osgi.bundle"; version:Version="27.1.0.v20190517-1946"; osgi.identity="com.google.guava"] and com.google.guava [osgi.identity; type="osgi.bundle"; version:Version="30.1.0.v20221112-0806"; osgi.identity="com.google.guava"] via two dependency chains.

Chain 1:
  org.eclipse.xtext [osgi.identity; type="osgi.bundle"; version:Version="2.21.0.v20200302-1141"; osgi.identity="org.eclipse.xtext"; singleton:="true"]
    require: (osgi.wiring.bundle=org.eclipse.xtext.util)
     |
    provide: osgi.wiring.bundle: org.eclipse.xtext.util
  com.google.guava [osgi.identity; type="osgi.bundle"; version:Version="27.1.0.v20190517-1946"; osgi.identity="com.google.guava"]

Chain 2:
  org.eclipse.xtext [osgi.identity; type="osgi.bundle"; version:Version="2.21.0.v20200302-1141"; osgi.identity="org.eclipse.xtext"; singleton:="true"]
    require: (&(osgi.wiring.bundle=com.google.inject)(bundle-version>=3.0.0))
     |
    provide: osgi.wiring.bundle; bundle-version:Version="5.0.1.v20221112-0806"; osgi.wiring.bundle="com.google.inject"
  com.google.inject [osgi.identity; type="osgi.bundle"; version:Version="5.0.1.v20221112-0806"; osgi.identity="com.google.inject"]
    import: (&(osgi.wiring.package=com.google.common.collect)(&(version>=30.1.0)(!(version>=31.0.0))))
     |
    export: osgi.wiring.package: com.google.common.collect; uses:=com.google.common.base
    export: osgi.wiring.package=com.google.common.base
  com.google.guava [osgi.identity; type="osgi.bundle"; version:Version="30.1.0.v20221112-0806"; osgi.identity="com.google.guava"]
osgi>


So org.eclipse.emf.mwe.core and org.eclipse.emf.mwe2.runtime require Java 11? I guess I need to downgrade to stay on Java 8.

[Updated on: Wed, 07 December 2022 19:16]

Report message to a moderator

Re: Xtend IDE 2.21 editor doesn't open and can't build workspace [message #1856378 is a reply to message #1856376] Wed, 07 December 2022 20:59 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14661
Registered: July 2009
Senior Member
Yes latest greates mwe needs java 11. So there is a guava version problem took you should pick the mwe version that matches Xtext 2.21 .(2.11.2/1.5.2)
And not the latest greatest

You should not use the composite update site but the dedicated for Xtext, Xpand and mwe


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Xtend IDE 2.21 editor doesn't open and can't build workspace [message #1856412 is a reply to message #1856378] Thu, 08 December 2022 17:57 Go to previous messageGo to next message
Leo K is currently offline Leo KFriend
Messages: 4
Registered: August 2015
Junior Member
Thanks for the help! With the correct MWE versions the Xtend IDE plugin works fine now.

I had used the composite updatesite because that was linked at https://www.eclipse.org/xtend/download.html but I didn't realize that it might not work for older releases.
Re: Xtend IDE 2.21 editor doesn't open and can't build workspace [message #1856413 is a reply to message #1856412] Thu, 08 December 2022 18:55 Go to previous message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14661
Registered: July 2009
Senior Member
Using that one is only suitable when you use newest releases or use a target platform where you specify matching versions explicitly

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Previous Topic:Code completion is leading to validation execution in language server
Next Topic:Parser rule for floating points with scientific notation
Goto Forum:
  


Current Time: Thu Mar 28 17:49:46 GMT 2024

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

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

Back to the top