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

java.lang.SecurityException: class "org.eclipse.core.runtime.OperationCanceledException"'s signer information does not match signer information of other classes in the same package #1231

Closed
karypid opened this issue Jun 28, 2018 · 116 comments
Assignees
Labels
Milestone

Comments

@karypid
Copy link

karypid commented Jun 28, 2018

Using xtext 2.14 and Eclipse Oxygen.

Running "mvn install" from projects the xtext wizards creates fails with a security error:

[ERROR] Failed to execute goal org.eclipse.xtend:xtend-maven-plugin:2.14.0:compile (default) on project org.sbelang.dsl: Execution default of goal org.eclipse.xtend:xtend-maven-plugin:2.14.0:compile failed: Unable to load the mojo 'compile' (or one of its required components) from the plugin 'org.eclipse.xtend:xtend-maven-plugin:2.14.0': com.google.inject.ProvisionException: Unable to provision, see the following errors:
[ERROR] 
[ERROR] 1) Error injecting constructor, com.google.inject.internal.util.$ComputationException: com.google.inject.internal.util.$ComputationException: java.lang.SecurityException: class "org.eclipse.core.runtime.OperationCanceledException"'s signer information does not match signer information of other classes in the same package
[ERROR]   at org.eclipse.xtend.maven.XtendCompile.<init>(Unknown Source)
[ERROR]   while locating org.eclipse.xtend.maven.XtendCompile
[ERROR]   at ClassRealm[plugin>org.eclipse.xtend:xtend-maven-plugin:2.14.0, parent: sun.misc.Launcher$AppClassLoader@3d4eac69] (via modules: org.eclipse.sisu.wire.WireModule -> org.eclipse.sisu.plexus.PlexusBindingModule)
[ERROR]   while locating org.apache.maven.plugin.Mojo annotated with @com.google.inject.name.Named(value=org.eclipse.xtend:xtend-maven-plugin:2.14.0:compile)
[ERROR] 
[ERROR] 1 error
[ERROR]       role: org.apache.maven.plugin.Mojo
[ERROR]   roleHint: org.eclipse.xtend:xtend-maven-plugin:2.14.0:compile

To reproduce, just create a new xtext project using the wizard and all-defaults EXCEP for the preferred build system option which should be set to maven.

@karypid
Copy link
Author

karypid commented Jun 28, 2018

This is on the back of this forum post.

@cdietrich
Copy link
Member

cdietrich commented Jun 28, 2018

this affects
xtext 2.14, xtext 2.13, 2.12, 2.11
not affected
xtext 2.10 and older

@kthoms do you know if new platform maven stuff is already out?

here is a minimal reproducing java project showing the problem (java main)

issue1231.zip

@cdietrich
Copy link
Member

/home/dietrich/.m2/repository/org/eclipse/platform/org.eclipse.core.runtime/3.14.0/org.eclipse.core.runtime-3.14.0.jar
/home/dietrich/.m2/repository/org/eclipse/platform/org.eclipse.equinox.common/3.8.0/org.eclipse.equinox.common-3.8.0.jar

http://search.maven.org/#artifactdetails%7Corg.eclipse.platform%7Corg.eclipse.equinox.common%7C3.10.0%7Cjar
http://search.maven.org/#artifactdetails%7Corg.eclipse.platform%7Corg.eclipse.core.runtime%7C3.14.0%7Cjar

=> the org.eclipse.equinox.common is too old. needs to by analyzed why that one is used

@cdietrich
Copy link
Member

=> maybe the publishing of platform to maven central happens right now and the new version is not yet visible?

@cdietrich
Copy link
Member

@szarnekow do you have any idea why the plugin does not pick the newer equinox version but the new core.runtime version?

@cdietrich
Copy link
Member

cdietrich commented Jun 28, 2018

workaround

				<plugin>
					<groupId>org.eclipse.xtend</groupId>
					<artifactId>xtend-maven-plugin</artifactId>
					<version>${xtextVersion}</version>
					<dependencies>
						<dependency>
						    <groupId>org.eclipse.platform</groupId>
						    <artifactId>org.eclipse.equinox.common</artifactId>
						    <version>3.10.0</version>
						</dependency>
					</dependencies>

alternatively you can pin the jdt version of your xtext release e.g.

				<plugin>
					<groupId>org.eclipse.xtend</groupId>
					<artifactId>xtend-maven-plugin</artifactId>
					<version>${xtextVersion}</version>
				<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>
				</dependencies>

@cdietrich
Copy link
Member

@karypid can you please give the workaround a try

@cdietrich
Copy link
Member

bildschirmfoto_2018-06-28_20-19-00

=> there is a upgrade for core.runtime happen somewhy

@cdietrich
Copy link
Member

from jdt.core

    <dependency>
      <groupId>org.eclipse.platform</groupId>
      <artifactId>org.eclipse.core.runtime</artifactId>
      <version>[3.13.0,4.0.0)</version>
    </dependency>

@stephan-herrmann is there a reason jdt does specify this dependency but not one to equinox.common

@cdietrich
Copy link
Member

cdietrich commented Jun 28, 2018

from core.runtime

   <dependency>
      <groupId>org.eclipse.platform</groupId>
      <artifactId>org.eclipse.equinox.registry</artifactId>
      <version>[3.8.0,4.0.0)</version>
    </dependency>
 <dependency>
      <groupId>org.eclipse.platform</groupId>
      <artifactId>org.eclipse.equinox.common</artifactId>
      <version>[3.8.0,4.0.0)</version>
    </dependency>

=> the minimal version seems bogus

@stephan-herrmann
Copy link
Contributor

is there a reason jdt does specify this dependency but not one to equinox.common

Yes, at least this: the dependency pre-dates the creation of equinox.common :)

@cdietrich
Copy link
Member

but for split packages this wont work right?
they always have to be used "in sync"

@stephan-herrmann
Copy link
Contributor

do you know if new platform maven stuff is already out?

Photon versions of Platform, JDT, and PDE have been released to Maven central today.

@cdietrich
Copy link
Member

yes but thr ranges allow to use core.runtime 2.12 with equinox.common 2.8 which will does not fit together

@karypid
Copy link
Author

karypid commented Jun 28, 2018

Hello! Just confirming that the workaround above works fine for me.

@cdietrich
Copy link
Member

issue1231b.zip

more minimal example

cdietrich added a commit to eclipse/xtext-xtend that referenced this issue Jun 28, 2018
Signed-off-by: Christian Dietrich <christian.dietrich@itemis.de>
cdietrich added a commit to eclipse/xtext-eclipse that referenced this issue Jun 28, 2018
Signed-off-by: Christian Dietrich <christian.dietrich@itemis.de>
@cdietrich
Copy link
Member

created workaround for xtext build.
general solution still needs to be found

jachinte added a commit to RigiResearch/jachinte-DevOps2018-evaluation that referenced this issue Jun 29, 2018
jachinte added a commit to RigiResearch/jachinte-DevOps2018-evaluation that referenced this issue Jun 29, 2018
@cdietrich
Copy link
Member

@Guite
Copy link

Guite commented Jun 29, 2018

workaround

Thanks!

cdietrich added a commit to eclipse/xtext-xtend that referenced this issue Jun 29, 2018
cdietrich added a commit to eclipse/xtext-eclipse that referenced this issue Jun 29, 2018
@cdietrich
Copy link
Member

you can do a gradle scan --scan to get a dependency report if it is ok for you to use that service from gradle

@cdietrich
Copy link
Member

and the question would be which core.runtime version appears.
and what is the complete stacktrace

@cdietrich
Copy link
Member

is this in the tests?
if yes how does the build scan look like there?

@Mehmetcanss
Copy link

No this is just a client project, with a main class, which calls the StandaloneSetup, it also happens in the tests as well

@Mehmetcanss
Copy link

I will check the build scan out

@Mehmetcanss
Copy link

Mehmetcanss commented Jan 22, 2019

Fixed the issue after analysing the build scan, was caused by an older eclipse.core.resources jar dependency which did not have anything to do with xtend (it was an explicit dependency in build.gradle)

@Mehmetcanss
Copy link

thanks for the tip @cdietrich

fcoulon added a commit to gemoc/ale-lang that referenced this issue Jan 22, 2019
@cdietrich
Copy link
Member

we now have the bom. this will prevent this issue from occurring again

Pascal-Verdier added a commit to tango-controls/pogo that referenced this issue May 10, 2019
mrubanov pushed a commit to mrubanov/dsl-devkit that referenced this issue Jun 21, 2019
mrubanov added a commit to dsldevkit/dsl-devkit that referenced this issue Jun 21, 2019
gregdyke pushed a commit to dsldevkit/dsl-devkit that referenced this issue Jul 30, 2019
dvdkruk pushed a commit to dvdkruk/avroclipse that referenced this issue Sep 9, 2020
dvdkruk pushed a commit to dvdkruk/avroclipse that referenced this issue Sep 9, 2020
marc-christian-schulze added a commit to marc-christian-schulze/structs4java that referenced this issue Jun 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests