Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » SecurityException in Maven build
SecurityException in Maven build [message #1840276] Sun, 11 April 2021 10:21 Go to next message
Axel Guckelsberger is currently offline Axel GuckelsbergerFriend
Messages: 354
Registered: July 2009
Senior Member
Hi all,

did anything change regarding certificates used for signing Xtext bundles?

I have a Tycho/Maven build for my DSL failing today with this exception:

0   java.lang.SecurityException: class "org.eclipse.xtext.util.XtextSwitch"'s signer information does not match signer information of other classes in the same package
	at org.eclipse.emf.mwe2.launch.runtime.Mwe2Runner.run(Mwe2Runner.java:96)
	at org.eclipse.emf.mwe2.launch.runtime.Mwe2Runner.run(Mwe2Runner.java:63)
	at org.eclipse.emf.mwe2.launch.runtime.Mwe2Runner.run(Mwe2Runner.java:53)
	at org.eclipse.emf.mwe2.launch.runtime.Mwe2Launcher.run(Mwe2Launcher.java:79)
	at org.eclipse.emf.mwe2.launch.runtime.Mwe2Launcher.main(Mwe2Launcher.java:37)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:282)
	at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: org.eclipse.emf.common.util.WrappedException: java.lang.SecurityException: class "org.eclipse.xtext.util.XtextSwitch"'s signer information does not match signer information of other classes in the same package
	at org.eclipse.emf.mwe2.language.factory.Mwe2ExecutionEngine.create(Mwe2ExecutionEngine.java:161)
	at org.eclipse.emf.mwe2.language.factory.Mwe2ExecutionEngine.inCase(Mwe2ExecutionEngine.java:108)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at org.eclipse.xtext.util.PolymorphicDispatcher.invoke(PolymorphicDispatcher.java:303)
	at org.eclipse.emf.mwe2.language.factory.Mwe2ExecutionEngine.internalSwitch(Mwe2ExecutionEngine.java:70)
	at org.eclipse.emf.mwe2.language.factory.Mwe2ExecutionEngine.internalApplyAssignments(Mwe2ExecutionEngine.java:146)
	at org.eclipse.emf.mwe2.language.factory.Mwe2ExecutionEngine.inCase(Mwe2ExecutionEngine.java:118)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at org.eclipse.xtext.util.PolymorphicDispatcher.invoke(PolymorphicDispatcher.java:303)
	at org.eclipse.emf.mwe2.language.factory.Mwe2ExecutionEngine.internalSwitch(Mwe2ExecutionEngine.java:70)
	at org.eclipse.emf.mwe2.language.factory.Mwe2ExecutionEngine.inCase(Mwe2ExecutionEngine.java:84)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at org.eclipse.xtext.util.PolymorphicDispatcher.invoke(PolymorphicDispatcher.java:303)
	at org.eclipse.emf.mwe2.language.factory.Mwe2ExecutionEngine.internalSwitch(Mwe2ExecutionEngine.java:70)
	at org.eclipse.emf.mwe2.language.factory.Mwe2ExecutionEngine.create(Mwe2ExecutionEngine.java:66)
	at org.eclipse.emf.mwe2.launch.runtime.Mwe2Runner.run(Mwe2Runner.java:94)
	... 10 more
Caused by: java.lang.SecurityException: class "org.eclipse.xtext.util.XtextSwitch"'s signer information does not match signer information of other classes in the same package
	at java.base/java.lang.ClassLoader.checkCerts(ClassLoader.java:1151)
	at java.base/java.lang.ClassLoader.preDefineClass(ClassLoader.java:906)
	at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1015)
	at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:174)
	at java.base/java.net.URLClassLoader.defineClass(URLClassLoader.java:550)
	at java.base/java.net.URLClassLoader$1.run(URLClassLoader.java:458)
	at java.base/java.net.URLClassLoader$1.run(URLClassLoader.java:452)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:451)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:589)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
	at java.base/java.lang.Class.getDeclaredConstructors0(Native Method)
	at java.base/java.lang.Class.privateGetDeclaredConstructors(Class.java:3137)
	at java.base/java.lang.Class.getDeclaredConstructors(Class.java:2357)
	at com.google.inject.spi.InjectionPoint.forConstructorOf(InjectionPoint.java:243)
	at com.google.inject.internal.ConstructorBindingImpl.create(ConstructorBindingImpl.java:96)
	at com.google.inject.internal.InjectorImpl.createUninitializedBinding(InjectorImpl.java:629)
	at com.google.inject.internal.UntargettedBindingProcessor$1.visit(UntargettedBindingProcessor.java:51)
	at com.google.inject.internal.UntargettedBindingProcessor$1.visit(UntargettedBindingProcessor.java:35)
	at com.google.inject.internal.UntargettedBindingImpl.acceptTargetVisitor(UntargettedBindingImpl.java:42)
	at com.google.inject.internal.UntargettedBindingProcessor.visit(UntargettedBindingProcessor.java:35)
	at com.google.inject.internal.UntargettedBindingProcessor.visit(UntargettedBindingProcessor.java:27)
	at com.google.inject.internal.BindingImpl.acceptVisitor(BindingImpl.java:93)
	at com.google.inject.internal.AbstractProcessor.process(AbstractProcessor.java:55)
	at com.google.inject.internal.InjectorShell$Builder.build(InjectorShell.java:178)
	at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:103)
	at com.google.inject.Guice.createInjector(Guice.java:95)
	at com.google.inject.Guice.createInjector(Guice.java:72)
	at com.google.inject.Guice.createInjector(Guice.java:62)
	at org.eclipse.xtext.XtextStandaloneSetupGenerated.createInjector(XtextStandaloneSetupGenerated.java:26)
	at org.eclipse.xtext.XtextStandaloneSetupGenerated.createInjectorAndDoEMFRegistration(XtextStandaloneSetupGenerated.java:20)
	at org.eclipse.xtext.xtext.generator.XtextGenerator.<init>(XtextGenerator.java:128)
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
	at java.base/java.lang.Class.newInstance(Class.java:584)
	at org.eclipse.emf.mwe2.language.factory.Mwe2ExecutionEngine.create(Mwe2ExecutionEngine.java:159)
	... 34 more


Three things that are independent of Xtext changed recently:


  • Tycho updated to version 2.3.0, but the build still worked afterwards.
  • I renewed my own code signing certificate a week ago. I doubt this is related though because the error is happening very early when the DSL generation workflow is executed.
  • Changed Java distribution from Zulu OpenJDK to Adopt OpenJDK today. Reverting to Zulu doesn't make a difference.


Any idea what I could try next?

Axel
Re: SecurityException in Maven build [message #1840277 is a reply to message #1840276] Sun, 11 April 2021 10:33 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
Can you delete the xtext and xtext util jars from your Lokal maven repo and/or check the jars
Which Xtext version do you use ?
Are the versions the wfs classpath consistent
(-X should give a list)


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

[Updated on: Sun, 11 April 2021 10:37]

Report message to a moderator

Re: SecurityException in Maven build [message #1840279 is a reply to message #1840277] Sun, 11 April 2021 11:13 Go to previous messageGo to next message
Axel Guckelsberger is currently offline Axel GuckelsbergerFriend
Messages: 354
Registered: July 2009
Senior Member
Hello Christian,

thanks for the pointers.

I disabled the m2 cache in my GitHub action - implementation inspired from http://www.lorenzobettini.it/2020/12/caching-dependencies-in-github-actions/ - but this didn't change anything so I reenabled it again.

After checking the build with `-X` I think I possibly found something:

It adds this file to the classpath entries: /home/runner/.m2/repository/p2/osgi/bundle/org.eclipse.xtext.util/2.25.0.v20210301-0843/org.eclipse.xtext.util-2.25.0.v20210301-0843.jar

But when calling Mwe2Launcher it includes org.eclipse.xtext:org.eclipse.xtext.util:jar:2.26.0-SNAPSHOT:runtime to the pluginDependencies.

2021-04-11T11:02:03.9360026Z [DEBUG] Configuring mojo org.codehaus.mojo:exec-maven-plugin:1.6.0:java from plugin realm ClassRealm[plugin>org.codehaus.mojo:exec-maven-plugin:1.6.0, parent: jdk.internal.loader.ClassLoaders$AppClassLoader@277050dc]
2021-04-11T11:02:03.9381994Z [DEBUG] Configuring mojo 'org.codehaus.mojo:exec-maven-plugin:1.6.0:java' with basic configurator -->
2021-04-11T11:02:03.9383359Z [DEBUG]   (f) addOutputToClasspath = true
2021-04-11T11:02:03.9384375Z [DEBUG]   (f) addResourcesToClasspath = false
2021-04-11T11:02:03.9395065Z [DEBUG]   (f) arguments = [file:///home/runner/work/...mydsl/src/de/.../GenerateMyDsl.mwe2, -p, rootPath=//home/runner/work/...mydsl/../..]
2021-04-11T11:02:03.9397368Z [DEBUG]   (f) classpathScope = compile
2021-04-11T11:02:03.9398377Z [DEBUG]   (f) cleanupDaemonThreads = false
2021-04-11T11:02:03.9399425Z [DEBUG]   (f) daemonThreadJoinTimeout = 15000
2021-04-11T11:02:03.9476678Z [DEBUG]   (f) includePluginDependencies = true
2021-04-11T11:02:03.9478040Z [DEBUG]   (f) includeProjectDependencies = true
2021-04-11T11:02:03.9479039Z [DEBUG]   (f) keepAlive = false
2021-04-11T11:02:03.9480244Z [DEBUG]   (f) killAfter = -1
2021-04-11T11:02:03.9481212Z [DEBUG]   (f) localRepository =       id: local
2021-04-11T11:02:03.9482413Z       url: file:///home/runner/.m2/repository/
2021-04-11T11:02:03.9483284Z    layout: default
2021-04-11T11:02:03.9484143Z snapshots: [enabled => true, update => always]
2021-04-11T11:02:03.9485055Z  releases: [enabled => true, update => always]
2021-04-11T11:02:03.9485670Z 
2021-04-11T11:02:03.9486925Z [DEBUG]   (f) mainClass = org.eclipse.emf.mwe2.launch.runtime.Mwe2Launcher
2021-04-11T11:02:03.9649380Z [DEBUG]   (f) pluginDependencies = [org.codehaus.mojo:exec-maven-plugin:maven-plugin:1.6.0:, org.eclipse.emf:org.eclipse.emf.mwe2.launch:jar:2.11.2:runtime, org.eclipse.emf:org.eclipse.emf.mwe2.runtime:jar:2.11.2:runtime, com.google.inject:guice:jar:3.0:runtime, javax.inject:javax.inject:jar:1:runtime, aopalliance:aopalliance:jar:1.0:runtime, org.eclipse.emf:org.eclipse.emf.mwe2.language:jar:2.11.2:runtime, com.google.guava:guava:jar:27.1-jre:runtime, com.google.guava:failureaccess:jar:1.0.1:runtime, com.google.guava:listenablefuture:jar:9999.0-empty-to-avoid-conflict-with-guava:runtime, com.google.code.findbugs:jsr305:jar:3.0.2:runtime, org.checkerframework:checker-qual:jar:2.5.2:runtime, com.google.errorprone:error_prone_annotations:jar:2.2.0:runtime, com.google.j2objc:j2objc-annotations:jar:1.1:runtime, org.codehaus.mojo:animal-sniffer-annotations:jar:1.17:runtime, commons-cli:commons-cli:jar:1.2:compile, log4j:log4j:jar:1.2.16:runtime, org.eclipse.xtext:org.eclipse.xtext.common.types:jar:2.21.0:runtime, org.eclipse.xtext:org.eclipse.xtext:jar:2.21.0:runtime, org.eclipse.xtend:org.eclipse.xtend.lib:jar:2.21.0:runtime, org.eclipse.xtend:org.eclipse.xtend.lib.macro:jar:2.21.0:runtime, org.eclipse.platform:org.eclipse.osgi:jar:3.15.100:runtime, org.eclipse.emf:org.eclipse.emf.ecore.xmi:jar:2.16.0:runtime, org.ow2.asm:asm-commons:jar:7.2:runtime, org.ow2.asm:asm:jar:7.2:runtime, org.ow2.asm:asm-tree:jar:7.2:runtime, org.ow2.asm:asm-analysis:jar:7.2:runtime, io.github.classgraph:classgraph:jar:4.8.35:runtime, org.eclipse.xtext:org.eclipse.xtext.generator:jar:2.21.0:runtime, org.eclipse.xtext:org.eclipse.xtext.xtext.generator:jar:2.21.0:runtime, org.eclipse.emf:org.eclipse.emf.mwe.utils:jar:1.5.2:runtime, org.eclipse.emf:org.eclipse.emf.mwe.core:jar:1.5.2:runtime, commons-logging:commons-logging:jar:1.1.3:runtime, org.eclipse.emf:org.eclipse.emf.mwe2.lib:jar:2.11.2:runtime, com.ibm.icu:icu4j:jar:52.1:runtime, org.eclipse.xpand:org.eclipse.xpand:jar:2.0.0:runtime, org.eclipse.xpand:org.eclipse.xtend:jar:2.0.0:runtime, org.eclipse.xtext:org.eclipse.xtext.xbase:jar:2.21.0:runtime, org.eclipse.xtext:xtext-antlr-generator:jar:2.1.1:runtime, org.xtext:antlr-generator:jar:3.2.1:runtime, org.eclipse.xtext:org.eclipse.xtext.ecore:jar:2.21.0:runtime, org.eclipse.emf:org.eclipse.emf.ecore.xcore:jar:1.11.0:runtime, org.eclipse.emf:org.eclipse.emf.ecore:jar:2.23.0:runtime, org.eclipse.xtext:org.eclipse.xtext.util:jar:2.26.0-SNAPSHOT:runtime, org.antlr:antlr-runtime:jar:3.2:runtime, org.antlr:stringtemplate:jar:3.2:runtime, antlr:antlr:jar:2.7.7:runtime, org.eclipse.xtext:org.eclipse.xtext.xbase.lib:jar:2.26.0-SNAPSHOT:runtime, org.eclipse.platform:org.eclipse.core.runtime:jar:3.20.100:runtime, org.eclipse.platform:org.eclipse.equinox.common:jar:3.14.100:runtime, org.eclipse.platform:org.eclipse.core.jobs:jar:3.10.1100:runtime, org.eclipse.platform:org.eclipse.equinox.registry:jar:3.10.100:runtime, org.eclipse.platform:org.eclipse.equinox.preferences:jar:3.8.200:runtime, org.eclipse.platform:org.eclipse.core.contenttype:jar:3.7.900:runtime, org.eclipse.platform:org.eclipse.equinox.app:jar:1.5.100:runtime, org.eclipse.emf:org.eclipse.emf.codegen.ecore:jar:2.25.0:runtime, org.eclipse.platform:org.eclipse.core.resources:jar:3.14.0:runtime, org.eclipse.platform:org.eclipse.core.expressions:jar:3.7.100:runtime, org.eclipse.platform:org.eclipse.core.filesystem:jar:1.7.700:runtime, org.eclipse.jdt:org.eclipse.jdt.core:jar:3.25.0:runtime, org.eclipse.jdt:org.eclipse.jdt.launching:jar:3.19.100:runtime, org.eclipse.platform:org.eclipse.debug.core:jar:3.18.0:runtime, org.eclipse.jdt:org.eclipse.jdt.debug:jar:3.17.100:runtime, org.eclipse.platform:org.eclipse.core.variables:jar:3.4.800:runtime, org.eclipse.emf:org.eclipse.emf.codegen:jar:2.21.0:runtime, org.eclipse.platform:org.eclipse.text:jar:3.11.0:runtime, org.eclipse.platform:org.eclipse.core.commands:jar:3.9.800:runtime, org.eclipse.emf:org.eclipse.emf.ecore.xcore.lib:jar:1.4.0:runtime, org.eclipse.emf:org.eclipse.emf.common:jar:2.22.0:runtime, org.eclipse.emf:org.eclipse.emf.codegen.ecore.xtext:jar:1.4.0:runtime, org.apache.maven:maven-toolchain:jar:2.2.1:compile, org.apache.maven:maven-project:jar:2.2.1:compile, org.apache.maven:maven-settings:jar:2.2.1:compile, org.apache.maven:maven-profile:jar:2.2.1:compile, org.apache.maven:maven-plugin-registry:jar:2.2.1:compile, org.codehaus.plexus:plexus-interpolation:jar:1.11:compile, org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-9-stable-1:compile, org.apache.maven:maven-model:jar:2.2.1:compile, org.apache.maven:maven-artifact:jar:2.2.1:compile, org.apache.maven:maven-artifact-manager:jar:2.2.1:compile, org.apache.maven:maven-repository-metadata:jar:2.2.1:compile, backport-util-concurrent:backport-util-concurrent:jar:3.1:compile, org.apache.maven:maven-core:jar:2.2.1:compile, org.apache.maven:maven-plugin-parameter-documenter:jar:2.2.1:compile, org.slf4j:slf4j-jdk14:jar:1.5.6:runtime, org.slf4j:slf4j-api:jar:1.5.6:runtime, org.slf4j:jcl-over-slf4j:jar:1.5.6:runtime, org.apache.maven.reporting:maven-reporting-api:jar:2.2.1:compile, org.apache.maven.doxia:doxia-sink-api:jar:1.1:compile, org.apache.maven.doxia:doxia-logging-api:jar:1.1:compile, org.apache.maven:maven-error-diagnostics:jar:2.2.1:compile, org.apache.maven:maven-plugin-descriptor:jar:2.2.1:compile, org.codehaus.plexus:plexus-interactivity-api:jar:1.0-alpha-4:compile, org.apache.maven:maven-monitor:jar:2.2.1:compile, classworlds:classworlds:jar:1.1:compile, org.sonatype.plexus:plexus-sec-dispatcher:jar:1.3:compile, org.sonatype.plexus:plexus-cipher:jar:1.4:compile, org.apache.maven:maven-plugin-api:jar:2.2.1:compile, org.codehaus.plexus:plexus-utils:jar:3.0.20:compile, org.apache.commons:commons-exec:jar:1.3:compile]


Going to try setting these dependencies to fixed versions next.
Re: SecurityException in Maven build [message #1840284 is a reply to message #1840279] Sun, 11 April 2021 12:05 Go to previous messageGo to next message
Axel Guckelsberger is currently offline Axel GuckelsbergerFriend
Messages: 354
Registered: July 2009
Senior Member
Quote:
Going to try setting these dependencies to fixed versions next.


This did the trick. Thanks again!
Re: SecurityException in Maven build [message #1840286 is a reply to message #1840284] Sun, 11 April 2021 14:38 Go to previous message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
Du you have different versions in p2 and maven configure d

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Previous Topic:Split XText Grammar into multiple files
Next Topic:Compute offset from position (line,col)
Goto Forum:
  


Current Time: Thu Apr 18 15:14:32 GMT 2024

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

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

Back to the top