Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UnsupportedClassVersionError due to fix on org.osgi.service.prefs #61

Open
adebiasi opened this issue Jun 17, 2022 · 11 comments
Open

UnsupportedClassVersionError due to fix on org.osgi.service.prefs #61

adebiasi opened this issue Jun 17, 2022 · 11 comments

Comments

@adebiasi
Copy link

The CI of CHESS fails after the fix related to #54.

The log before the issue/fix of org.osgi.service.prefs: log_ok.txt

The log after: log.txt

@adebiasi
Copy link
Author

This is the fragment of pom.xml containing the dependences:

<profile>
			<id>Eclipse-Neon-Java8-devel</id>
			<properties>
				<!-- Tycho settings -->
				<tycho.version>1.0.0</tycho.version>
				<tycho.extras.version>1.0.0</tycho.extras.version>
				<maven.compiler.source>1.8</maven.compiler.source>
				<maven.compiler.target>1.8</maven.compiler.target>
				<xtextVersion>2.12.0</xtextVersion>
				<ecore-xcore-version>1.3.1</ecore-xcore-version>
				<ecore-xcore-codegen-version>1.2.0</ecore-xcore-codegen-version>
				<ecore-xcore-lib-version>1.1.100</ecore-xcore-lib-version>
				<mwe2Version>[2.9.0,2.9.1)</mwe2Version>
				<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
				<maven.compiler.source>1.8</maven.compiler.source>
				<maven.compiler.target>1.8</maven.compiler.target>
				<emfRuntimeVersion>2.12</emfRuntimeVersion>
				<maven.build.timestamp.format>yyMMddHHmm</maven.build.timestamp.format>
				<!-- <buildNumber>${maven.build.timestamp}</buildNumber> -->
				<chessBuildNumber>devel_${maven.build.timestamp}</chessBuildNumber>
			</properties>
			<build>
				<plugins>
					<plugin>
						<groupId>org.eclipse.tycho</groupId>
						<artifactId>target-platform-configuration</artifactId>
						<version>${tycho.version}</version>
						<configuration>
							<target>
								<artifact>
									<groupId>org.polarsys.chess.target</groupId>
									<artifactId>org.polarsys.chess.target.neon</artifactId>
									<version>${project.version}</version>
								</artifact>
							</target>
						</configuration>
					</plugin>
					<plugin>
						<groupId>org.eclipse.xtend</groupId>
						<artifactId>xtend-maven-plugin</artifactId>
						<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>		
								<dependency>
									<groupId>org.eclipse.platform</groupId>
	  								<artifactId>org.eclipse.text</artifactId>
	  								<version>3.8.200</version>
	  								<exclusions>
										<exclusion>
								          <groupId>org.eclipse.platform</groupId>
								          <artifactId>org.eclipse.equinox.common</artifactId>
								        </exclusion>
									</exclusions>  																
								</dependency>
								<dependency>
									<groupId>org.eclipse.platform</groupId>
	  								<artifactId>org.eclipse.core.runtime</artifactId>
	  								<version>3.15.300</version>  								
									<exclusions>
										<exclusion>
								          <groupId>org.eclipse.platform</groupId>
								          <artifactId>org.eclipse.equinox.common</artifactId>
								        </exclusion>
									</exclusions>
								</dependency>
								<dependency>
									<groupId>org.eclipse.platform</groupId>
	  								<artifactId>org.eclipse.equinox.common</artifactId>
	  								<version>3.10.400</version>  
								</dependency>								
						</dependencies>
					</plugin>
				</plugins>
			</build>
		</profile>

@cdietrich
Copy link

cdietrich commented Jun 17, 2022

this is a problem that is there since platform moved to java 11 some time ago.
i wonder why you run into it now.
you might want to update to a never xtext version and or apply the workarounds needed for years as can be found in
eclipse-xtext/xtext#1976

i assume you need to make sure you pin/exclude both core.runtime and equinox.common
maybe they are now transitive by a different path where they were not before

@laeubi
Copy link
Member

laeubi commented Jun 17, 2022

you might want to update to a never xtext version

Maybe just update to a newer java version, never tycho version, never ... just an idea :-)

@cdietrich
Copy link

@laeubi the ~ 5 year old xtext version of course does not support java 11

@laeubi
Copy link
Member

laeubi commented Jun 17, 2022

@laeubi the ~ 5 year old xtext version of course does not support java 11

Yep but that's not the only one that is "a bit outdated" her (e.g. Tycho 1.x...)

@adebiasi
Copy link
Author

you might want to update to a never xtext version

Maybe just update to a newer java version, never tycho version, never ... just an idea :-)

We are working on the porting of CHESS, but it is not an easy job.

@cdietrich So you suggest to update the pom.xml as follows?

<dependency>
<groupId>org.eclipse.xtext</groupId>
	<artifactId>org.eclipse.xtext.xtext.generator</artifactId>
	<version>${xtextVersion}</version>
		<exclusions>
			<exclusion>
				<groupId>org.eclipse.platform</groupId>
				<artifactId>org.eclipse.equinox.common</artifactId>
			</exclusion>
			<exclusion>
				<groupId>org.eclipse.platform</groupId>
				<artifactId>org.eclipse.core.runtime</artifactId>
			</exclusion>
		</exclusions>
</dependency>

@cdietrich
Copy link

cdietrich commented Jun 17, 2022

i dont remember the linked bug is too long ago, but yes you can check if it works.
you might also have to add them explicitedy
as sibling to org.eclipse.xtext.xtext.generator

eclipse-xtext/xtext#1976 (comment)
you might also have to specify explicit versions there

@adebiasi
Copy link
Author

i dont remember the linked bug is too long ago, but yes you can check if it works. you might also have to add them explicitedy as sibling to org.eclipse.xtext.xtext.generator

Thanks.
Do you know why this issue happened just after #54?

@laeubi
Copy link
Member

laeubi commented Jun 17, 2022

As explained it can happen anytime as no one is checking for Java-8 compat any more!

@cdietrich
Copy link

no, for everybody else it it failing for a year now

@howlger
Copy link

howlger commented Jun 17, 2022

@adebiasi This Stack Overflow answer from @jmini explains very well what happened and also tells what can be done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants