xtext: ava.lang.NoSuchMethodError: org.eclipse.jdt.internal.compiler.batch.FileSystem.getClasspath

This error is happening with Xtext projects with 2.14 and earlier from today on:

[ERROR] Failed to execute goal org.eclipse.xtend:xtend-maven-plugin:2.14.0:compile (default) on project com.bshg.plc.common: Execution default of goal org.eclipse.xtend:xtend-maven-plugin:2.14.0:compile failed: An API incompatibility was encountered while executing org.eclipse.xtend:xtend-maven-plugin:2.14.0:compile: 
java.lang.NoSuchMethodError: org.eclipse.jdt.internal.compiler.batch.FileSystem.getClasspath(Ljava/lang/String;Ljava/lang/String;ZLorg/eclipse/jdt/internal/compiler/env/AccessRuleSet;Ljava/lang/String;Ljava/util/Map;)Lorg/eclipse/jdt/internal/compiler/batch/FileSystem$Classpath;

[ERROR] -----------------------------------------------------
[ERROR] realm =    plugin>org.eclipse.xtend:xtend-maven-plugin:2.14.0
[ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
[ERROR] urls[0] = file:/XXXXXXXXXXX/.repository/org/eclipse/xtend/xtend-maven-plugin/2.14.0/xtend-maven-plugin-2.14.0.jar
[ERROR] urls[1] = file:/XXXXXXXXXXX/.repository/org/eclipse/jdt/org.eclipse.jdt.compiler.apt/1.3.110/org.eclipse.jdt.compiler.apt-1.3.110.jar
[ERROR] urls[2] = file:/XXXXXXXXXXX/.repository/org/eclipse/jdt/org.eclipse.jdt.core/3.16.0/org.eclipse.jdt.core-3.16.0.jar
[ERROR] urls[3] = file:/XXXXXXXXXXX/.repository/org/eclipse/platform/org.eclipse.core.filesystem/1.7.200/org.eclipse.core.filesystem-1.7.200.jar
[ERROR] urls[4] = file:/XXXXXXXXXXX/.repository/org/eclipse/jdt/org.eclipse.jdt.compiler.tool/1.2.101/org.eclipse.jdt.compiler.tool-1.2.101.jar
[ERROR] urls[5] = file:/XXXXXXXXXXX/.repository/com/google/guava/guava/22.0-rc1-android/guava-22.0-rc1-android.jar
[ERROR] urls[6] = file:/XXXXXXXXXXX/.repository/com/google/code/findbugs/jsr305/1.3.9/jsr305-1.3.9.jar
[ERROR] urls[7] = file:/XXXXXXXXXXX/.repository/com/google/errorprone/error_prone_annotations/2.0.18/error_prone_annotations-2.0.18.jar
[ERROR] urls[8] = file:/XXXXXXXXXXX/.repository/com/google/j2objc/j2objc-annotations/1.1/j2objc-annotations-1.1.jar
[ERROR] urls[9] = file:/XXXXXXXXXXX/.repository/org/codehaus/mojo/animal-sniffer-annotations/1.14/animal-sniffer-annotations-1.14.jar
[ERROR] urls[10] = file:/XXXXXXXXXXX/.repository/org/eclipse/xtend/org.eclipse.xtend.core/2.14.0/org.eclipse.xtend.core-2.14.0.jar
[ERROR] urls[11] = file:/XXXXXXXXXXX/.repository/org/eclipse/xtext/org.eclipse.xtext.xbase/2.14.0/org.eclipse.xtext.xbase-2.14.0.jar
[ERROR] urls[12] = file:/XXXXXXXXXXX/.repository/org/eclipse/xtext/org.eclipse.xtext.common.types/2.14.0/org.eclipse.xtext.common.types-2.14.0.jar
[ERROR] urls[13] = file:/XXXXXXXXXXX/.repository/org/eclipse/xtext/org.eclipse.xtext.xbase.lib/2.14.0/org.eclipse.xtext.xbase.lib-2.14.0.jar
[ERROR] urls[14] = file:/XXXXXXXXXXX/.repository/org/eclipse/xtext/org.eclipse.xtext.util/2.14.0/org.eclipse.xtext.util-2.14.0.jar
[ERROR] urls[15] = file:/XXXXXXXXXXX/.repository/org/eclipse/xtext/org.eclipse.xtext.smap/2.14.0/org.eclipse.xtext.smap-2.14.0.jar
[ERROR] urls[16] = file:/XXXXXXXXXXX/.repository/org/eclipse/xtext/org.eclipse.xtext/2.14.0/org.eclipse.xtext-2.14.0.jar
[ERROR] urls[17] = file:/XXXXXXXXXXX/.repository/org/eclipse/xtend/org.eclipse.xtend.lib/2.14.0/org.eclipse.xtend.lib-2.14.0.jar
[ERROR] urls[18] = file:/XXXXXXXXXXX/.repository/org/eclipse/xtend/org.eclipse.xtend.lib.macro/2.14.0/org.eclipse.xtend.lib.macro-2.14.0.jar
[ERROR] urls[19] = file:/XXXXXXXXXXX/.repository/org/eclipse/emf/org.eclipse.emf.common/2.15.0/org.eclipse.emf.common-2.15.0.jar
[ERROR] urls[20] = file:/XXXXXXXXXXX/.repository/org/eclipse/emf/org.eclipse.emf.ecore/2.15.0/org.eclipse.emf.ecore-2.15.0.jar
[ERROR] urls[21] = file:/XXXXXXXXXXX/.repository/com/google/inject/guice/3.0/guice-3.0.jar
[ERROR] urls[22] = file:/XXXXXXXXXXX/.repository/aopalliance/aopalliance/1.0/aopalliance-1.0.jar
[ERROR] urls[23] = file:/XXXXXXXXXXX/.repository/log4j/log4j/1.2.16/log4j-1.2.16.jar
[ERROR] urls[24] = file:/XXXXXXXXXXX/.repository/org/ow2/asm/asm-commons/6.1.1/asm-commons-6.1.1.jar
[ERROR] urls[25] = file:/XXXXXXXXXXX/.repository/org/ow2/asm/asm/6.1.1/asm-6.1.1.jar
[ERROR] urls[26] = file:/XXXXXXXXXXX/.repository/org/ow2/asm/asm-tree/6.1.1/asm-tree-6.1.1.jar
[ERROR] urls[27] = file:/XXXXXXXXXXX/.repository/org/ow2/asm/asm-analysis/6.1.1/asm-analysis-6.1.1.jar
[ERROR] urls[28] = file:/XXXXXXXXXXX/.repository/org/apache/maven/maven-aether-provider/3.2.5/maven-aether-provider-3.2.5.jar
[ERROR] urls[29] = file:/XXXXXXXXXXX/.repository/org/eclipse/aether/aether-util/1.0.0.v20140518/aether-util-1.0.0.v20140518.jar
[ERROR] urls[30] = file:/XXXXXXXXXXX/.repository/javax/enterprise/cdi-api/1.0/cdi-api-1.0.jar
[ERROR] urls[31] = file:/XXXXXXXXXXX/.repository/javax/annotation/jsr250-api/1.0/jsr250-api-1.0.jar
[ERROR] urls[32] = file:/XXXXXXXXXXX/.repository/org/eclipse/sisu/org.eclipse.sisu.inject/0.3.0.M1/org.eclipse.sisu.inject-0.3.0.M1.jar
[ERROR] urls[33] = file:/XXXXXXXXXXX/.repository/org/sonatype/sisu/sisu-guice/3.2.3/sisu-guice-3.2.3-no_aop.jar
[ERROR] urls[34] = file:/XXXXXXXXXXX/.repository/org/codehaus/plexus/plexus-interpolation/1.21/plexus-interpolation-1.21.jar
[ERROR] urls[35] = file:/XXXXXXXXXXX/.repository/org/codehaus/plexus/plexus-utils/3.0.20/plexus-utils-3.0.20.jar
[ERROR] urls[36] = file:/XXXXXXXXXXX/.repository/org/codehaus/plexus/plexus-component-annotations/1.5.5/plexus-component-annotations-1.5.5.jar
[ERROR] urls[37] = file:/XXXXXXXXXXX/.repository/org/sonatype/plexus/plexus-sec-dispatcher/1.3/plexus-sec-dispatcher-1.3.jar
[ERROR] urls[38] = file:/XXXXXXXXXXX/.repository/org/sonatype/plexus/plexus-cipher/1.4/plexus-cipher-1.4.jar
[ERROR] urls[39] = file:/XXXXXXXXXXX/.repository/org/eclipse/emf/org.eclipse.emf.ecore.xmi/2.15.0/org.eclipse.emf.ecore.xmi-2.15.0.jar
[ERROR] urls[40] = file:/XXXXXXXXXXX/.repository/org/antlr/antlr-runtime/3.2/antlr-runtime-3.2.jar
[ERROR] urls[41] = file:/XXXXXXXXXXX/.repository/org/eclipse/emf/org.eclipse.emf.codegen/2.14.0/org.eclipse.emf.codegen-2.14.0.jar
[ERROR] urls[42] = file:/XXXXXXXXXXX/.repository/org/eclipse/platform/org.eclipse.core.runtime/3.15.100/org.eclipse.core.runtime-3.15.100.jar
[ERROR] urls[43] = file:/XXXXXXXXXXX/.repository/org/eclipse/platform/org.eclipse.osgi/3.13.200/org.eclipse.osgi-3.13.200.jar
[ERROR] urls[44] = file:/XXXXXXXXXXX/.repository/org/eclipse/platform/org.eclipse.equinox.common/3.10.200/org.eclipse.equinox.common-3.10.200.jar
[ERROR] urls[45] = file:/XXXXXXXXXXX/.repository/org/eclipse/platform/org.eclipse.core.jobs/3.10.200/org.eclipse.core.jobs-3.10.200.jar
[ERROR] urls[46] = file:/XXXXXXXXXXX/.repository/org/eclipse/platform/org.eclipse.equinox.registry/3.8.200/org.eclipse.equinox.registry-3.8.200.jar
[ERROR] urls[47] = file:/XXXXXXXXXXX/.repository/org/eclipse/platform/org.eclipse.equinox.preferences/3.7.200/org.eclipse.equinox.preferences-3.7.200.jar
[ERROR] urls[48] = file:/XXXXXXXXXXX/.repository/org/eclipse/platform/org.eclipse.core.contenttype/3.7.200/org.eclipse.core.contenttype-3.7.200.jar
[ERROR] urls[49] = file:/XXXXXXXXXXX/.repository/org/eclipse/platform/org.eclipse.equinox.app/1.4.0/org.eclipse.equinox.app-1.4.0.jar
[ERROR] urls[50] = file:/XXXXXXXXXXX/.repository/org/eclipse/platform/org.eclipse.core.resources/3.13.200/org.eclipse.core.resources-3.13.200.jar
[ERROR] urls[51] = file:/XXXXXXXXXXX/.repository/org/eclipse/platform/org.eclipse.core.expressions/3.6.200/org.eclipse.core.expressions-3.6.200.jar
[ERROR] urls[52] = file:/XXXXXXXXXXX/.repository/org/eclipse/jdt/org.eclipse.jdt.launching/3.12.0/org.eclipse.jdt.launching-3.12.0.jar
[ERROR] urls[53] = file:/XXXXXXXXXXX/.repository/org/eclipse/jdt/org.eclipse.jdt.debug/3.12.100/org.eclipse.jdt.debug-3.12.100.jar
[ERROR] urls[54] = file:/XXXXXXXXXXX/.repository/org/eclipse/platform/org.eclipse.core.variables/3.4.300/org.eclipse.core.variables-3.4.300.jar
[ERROR] urls[55] = file:/XXXXXXXXXXX/.repository/org/eclipse/platform/org.eclipse.debug.core/3.13.100/org.eclipse.debug.core-3.13.100.jar
[ERROR] urls[56] = file:/XXXXXXXXXXX/.repository/org/eclipse/platform/org.eclipse.text/3.8.0/org.eclipse.text-3.8.0.jar
[ERROR] urls[57] = file:/XXXXXXXXXXX/.repository/org/eclipse/platform/org.eclipse.core.commands/3.9.200/org.eclipse.core.commands-3.9.200.jar
[ERROR] Number of foreign imports: 1
[ERROR] import: Entry[import  from realm ClassRealm[project>com.bshg.plc:com.bshg.plc.parent:2.11.8-SNAPSHOT, parent: ClassRealm[maven.api, parent: null]]]

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 18 (9 by maintainers)

Commits related to this issue

Most upvoted comments

@cdietrich found out that version pinning of org.eclipse.emf.codegen to 2.11.0 does help (not any newer version!)

<plugin>
	<groupId>org.eclipse.xtend</groupId>
	<artifactId>xtend-maven-plugin</artifactId>
	<version>${xtext.version}</version>
	<executions>
		<execution>
			<goals>
				<goal>compile</goal>
				<goal>xtend-install-debug-info</goal>
				<goal>testCompile</goal>
				<goal>xtend-test-install-debug-info</goal>
			</goals>
		</execution>
	</executions>
	<configuration>
		<outputDirectory>${basedir}/xtend-gen</outputDirectory>
		<testOutputDirectory>${basedir}/xtend-gen</testOutputDirectory>
	</configuration>
	<!-- Workaround for https://github.com/eclipse/xtext/issues/1231 -->
	<!-- Remove with upgrade to Xtext 2.15 -->
	<dependencies>
		<dependency>
			<groupId>org.eclipse.jdt</groupId>
			<artifactId>org.eclipse.jdt.core</artifactId>
			<version>3.13.102</version>
		</dependency>
		<dependency>
			<groupId>org.eclipse.jdt</groupId>
			<artifactId>org.eclipse.jdt.compiler.apt</artifactId>
			<version>1.3.110</version>
		</dependency>
		<dependency>
			<groupId>org.eclipse.jdt</groupId>
			<artifactId>org.eclipse.jdt.compiler.tool</artifactId>
			<version>1.2.101</version>
		</dependency>
		<dependency>
			<groupId>org.eclipse.emf</groupId>
			<artifactId>org.eclipse.emf.codegen</artifactId>
			<version>2.11.0</version>
		</dependency>
	</dependencies>
</plugin>

Since a workaround exists now and upgrading to Xtext >= 2.15 helps also we are closing this issue now.

@cdietrich found out that version pinning of org.eclipse.emf.codegen to 2.11.0 does help (not any newer version!)

<plugin>
	<groupId>org.eclipse.xtend</groupId>
	<artifactId>xtend-maven-plugin</artifactId>
	<version>${xtext.version}</version>
	<executions>
		<execution>
			<goals>
				<goal>compile</goal>
				<goal>xtend-install-debug-info</goal>
				<goal>testCompile</goal>
				<goal>xtend-test-install-debug-info</goal>
			</goals>
		</execution>
	</executions>
	<configuration>
		<outputDirectory>${basedir}/xtend-gen</outputDirectory>
		<testOutputDirectory>${basedir}/xtend-gen</testOutputDirectory>
	</configuration>
	<!-- Workaround for https://github.com/eclipse/xtext/issues/1231 -->
	<!-- Remove with upgrade to Xtext 2.15 -->
	<dependencies>
		<dependency>
			<groupId>org.eclipse.jdt</groupId>
			<artifactId>org.eclipse.jdt.core</artifactId>
			<version>3.13.102</version>
		</dependency>
		<dependency>
			<groupId>org.eclipse.jdt</groupId>
			<artifactId>org.eclipse.jdt.compiler.apt</artifactId>
			<version>1.3.110</version>
		</dependency>
		<dependency>
			<groupId>org.eclipse.jdt</groupId>
			<artifactId>org.eclipse.jdt.compiler.tool</artifactId>
			<version>1.2.101</version>
		</dependency>
		<dependency>
			<groupId>org.eclipse.emf</groupId>
			<artifactId>org.eclipse.emf.codegen</artifactId>
			<version>2.11.0</version>
		</dependency>
	</dependencies>
</plugin>

Since a workaround exists now and upgrading to Xtext >= 2.15 helps also we are closing this issue now.

@kthoms How does this work? Why did you choose to add “emf.codegen” above? Did you choose to do it after going through the dependency:tree of xtend-maven plugin ? Secondly, if I change emf.codegen to 2.14.0 (which is the latest), I see jdt.core 3.16 in the dependency tree, even if I have 3.13.102 defined at the top. Changing it back to 2.11.0 shows the correct version of jdt.core (i.e. 3.13.102).