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

Open
karypid opened this Issue Jun 28, 2018 · 101 comments

Comments

Projects
None yet
@karypid

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

This comment has been minimized.

karypid commented Jun 28, 2018

This is on the back of this forum post.

@cdietrich

This comment has been minimized.

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

This comment has been minimized.

Member

cdietrich commented Jun 28, 2018

/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

This comment has been minimized.

Member

cdietrich commented Jun 28, 2018

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

@cdietrich

This comment has been minimized.

Member

cdietrich commented Jun 28, 2018

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

@cdietrich

This comment has been minimized.

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

This comment has been minimized.

Member

cdietrich commented Jun 28, 2018

@karypid can you please give the workaround a try

@cdietrich

This comment has been minimized.

Member

cdietrich commented Jun 28, 2018

bildschirmfoto_2018-06-28_20-19-00

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

@cdietrich

This comment has been minimized.

Member

cdietrich commented Jun 28, 2018

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

This comment has been minimized.

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

This comment has been minimized.

stephan-herrmann commented Jun 28, 2018

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

This comment has been minimized.

Member

cdietrich commented Jun 28, 2018

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

@stephan-herrmann

This comment has been minimized.

stephan-herrmann commented Jun 28, 2018

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

This comment has been minimized.

Member

cdietrich commented Jun 28, 2018

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

@karypid

This comment has been minimized.

karypid commented Jun 28, 2018

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

@cdietrich

This comment has been minimized.

Member

cdietrich commented Jun 28, 2018

issue1231b.zip

more minimal example

cdietrich added a commit to eclipse/xtext-xtend that referenced this issue Jun 28, 2018

[eclipse/xtext#1231] added workaround
Signed-off-by: Christian Dietrich <christian.dietrich@itemis.de>

cdietrich added a commit to eclipse/xtext-eclipse that referenced this issue Jun 28, 2018

[eclipse/xtext#1231] added workaround
Signed-off-by: Christian Dietrich <christian.dietrich@itemis.de>
@cdietrich

This comment has been minimized.

Member

cdietrich commented Jun 28, 2018

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

@cdietrich cdietrich added the releng label Jun 28, 2018

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

This comment has been minimized.

@Guite

This comment has been minimized.

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

@ldebello

This comment has been minimized.

ldebello commented Sep 14, 2018

Hi we are using xtext 2.8.3 and we are also facing this issue.

@cdietrich

This comment has been minimized.

Member

cdietrich commented Sep 14, 2018

Can you Share a dependeny hierarchy to the Both Core.runtime and equinox.common Jars

@ldebello

This comment has been minimized.

ldebello commented Sep 14, 2018

yes of course,

here is the debug output of the xtend-maven-plugin

[DEBUG] org.eclipse.xtend:xtend-maven-plugin:jar:2.8.3:
[DEBUG]    com.google.guava:guava:jar:14.0.1:compile
[DEBUG]    org.eclipse.xtend:org.eclipse.xtend.core:jar:2.8.3:compile
[DEBUG]       org.eclipse.xtext:org.eclipse.xtext.xbase:jar:2.8.3:compile
[DEBUG]          org.eclipse.xtext:org.eclipse.xtext:jar:2.8.3:compile
[DEBUG]             com.ibm.icu:icu4j:jar:52.1:compile
[DEBUG]          org.eclipse.xtext:org.eclipse.xtext.common.types:jar:2.8.3:compile
[DEBUG]       org.eclipse.equinox:common:jar:3.6.200-v20130402-1505:compile
[DEBUG]    org.eclipse.xtext:org.eclipse.xtext.xbase.lib:jar:2.8.3:compile
[DEBUG]    org.eclipse.xtext:org.eclipse.xtext.util:jar:2.8.3:compile
[DEBUG]       org.eclipse.xtext:org.eclipse.xtext.dependencies:pom:2.8.3:compile
[DEBUG]          org.eclipse.tycho:org.eclipse.jdt.core:jar:3.10.0.v20140604-1726:compile
[DEBUG]    org.eclipse.xtend:org.eclipse.xtend.lib:jar:2.8.3:compile
[DEBUG]       org.eclipse.xtend:org.eclipse.xtend.lib.macro:jar:2.8.3:compile
[DEBUG]    org.eclipse.emf:org.eclipse.emf.common:jar:2.15.0:compile
[DEBUG]    org.eclipse.emf:org.eclipse.emf.ecore:jar:2.15.0:compile
[DEBUG]    com.google.inject:guice:jar:3.0:compile
[DEBUG]       javax.inject:javax.inject:jar:1:compile
[DEBUG]       aopalliance:aopalliance:jar:1.0:compile
[DEBUG]    log4j:log4j:jar:1.2.16:compile
[DEBUG]    org.ow2.asm:asm-commons:jar:5.0.1:compile
[DEBUG]       org.ow2.asm:asm-tree:jar:5.0.1:compile
[DEBUG]          org.ow2.asm:asm:jar:5.0.1:compile
[DEBUG]    org.apache.maven:maven-core:jar:3.2.1:compile
[DEBUG]       org.apache.maven:maven-model:jar:3.2.1:compile
[DEBUG]       org.apache.maven:maven-settings:jar:3.2.1:compile
[DEBUG]       org.apache.maven:maven-settings-builder:jar:3.2.1:compile
[DEBUG]       org.apache.maven:maven-repository-metadata:jar:3.2.1:compile
[DEBUG]       org.apache.maven:maven-artifact:jar:3.2.1:compile
[DEBUG]       org.apache.maven:maven-plugin-api:jar:3.2.1:compile
[DEBUG]       org.apache.maven:maven-model-builder:jar:3.2.1:compile
[DEBUG]       org.apache.maven:maven-aether-provider:jar:3.2.1:compile
[DEBUG]          org.eclipse.aether:aether-spi:jar:0.9.0.M2:compile
[DEBUG]       org.eclipse.aether:aether-impl:jar:0.9.0.M2:compile
[DEBUG]       org.eclipse.aether:aether-api:jar:0.9.0.M2:compile
[DEBUG]       org.eclipse.aether:aether-util:jar:0.9.0.M2:compile
[DEBUG]       org.eclipse.sisu:org.eclipse.sisu.plexus:jar:0.0.0.M5:compile
[DEBUG]          javax.enterprise:cdi-api:jar:1.0:compile
[DEBUG]             javax.annotation:jsr250-api:jar:1.0:compile
[DEBUG]          org.sonatype.sisu:sisu-guice:jar:no_aop:3.1.0:compile
[DEBUG]          org.eclipse.sisu:org.eclipse.sisu.inject:jar:0.0.0.M5:compile
[DEBUG]       org.codehaus.plexus:plexus-interpolation:jar:1.19:compile
[DEBUG]       org.codehaus.plexus:plexus-utils:jar:3.0.17:compile
[DEBUG]       org.codehaus.plexus:plexus-classworlds:jar:2.5.1:compile
[DEBUG]       org.codehaus.plexus:plexus-component-annotations:jar:1.5.5:compile
[DEBUG]       org.sonatype.plexus:plexus-sec-dispatcher:jar:1.3:compile
[DEBUG]          org.sonatype.plexus:plexus-cipher:jar:1.4:compile
[DEBUG]    org.eclipse.emf:org.eclipse.emf.ecore.xmi:jar:2.15.0:runtime
[DEBUG]    org.antlr:antlr-runtime:jar:3.2:runtime
[DEBUG]    org.eclipse.emf:org.eclipse.emf.codegen:jar:2.14.0:runtime
[DEBUG]       org.eclipse.platform:org.eclipse.core.runtime:jar:3.14.0:runtime
[DEBUG]          org.eclipse.platform:org.eclipse.osgi:jar:3.13.0:runtime
[DEBUG]          org.eclipse.platform:org.eclipse.equinox.common:jar:3.10.0:runtime
[DEBUG]          org.eclipse.platform:org.eclipse.core.jobs:jar:3.10.0:runtime
[DEBUG]          org.eclipse.platform:org.eclipse.equinox.registry:jar:3.8.0:runtime
[DEBUG]          org.eclipse.platform:org.eclipse.equinox.preferences:jar:3.7.100:runtime
[DEBUG]          org.eclipse.platform:org.eclipse.core.contenttype:jar:3.7.0:runtime
[DEBUG]          org.eclipse.platform:org.eclipse.equinox.app:jar:1.3.500:runtime
[DEBUG]       org.eclipse.platform:org.eclipse.core.resources:jar:3.13.0:runtime
[DEBUG]          org.eclipse.platform:org.eclipse.core.expressions:jar:3.6.100:runtime
[DEBUG]          org.eclipse.platform:org.eclipse.core.filesystem:jar:1.7.100:runtime
[DEBUG]       org.eclipse.jdt:org.eclipse.jdt.core:jar:3.14.0:runtime
[DEBUG]       org.eclipse.jdt:org.eclipse.jdt.launching:jar:3.10.0:runtime
[DEBUG]          org.eclipse.jdt:org.eclipse.jdt.debug:jar:3.11.100:runtime
[DEBUG]          org.eclipse.platform:org.eclipse.core.variables:jar:3.4.100:runtime
[DEBUG]       org.eclipse.platform:org.eclipse.debug.core:jar:3.12.0:runtime
[DEBUG]       org.eclipse.platform:org.eclipse.text:jar:3.6.300:runtime
[DEBUG]          org.eclipse.platform:org.eclipse.core.commands:jar:3.9.100:runtime```
@cdietrich

This comment has been minimized.

Member

cdietrich commented Sep 14, 2018

So the Problem is Claused by the freshly published emf 2.15 so you should go back to emf 2.12 explicitly

@cdietrich

This comment has been minimized.

Member

cdietrich commented Sep 14, 2018

The problem will be solved in Xtext 2.15 by having a fixed dependency to emf and jdt and platform

@newrock

This comment has been minimized.

newrock commented Sep 14, 2018

Thanks for the work around posted above, I randomly came into this issue as well and it resolved it saving me a major headache!

@ldebello

This comment has been minimized.

ldebello commented Sep 17, 2018

Thanks after changing to 2.12 it works great

@OLibutzki

This comment has been minimized.

OLibutzki commented Sep 17, 2018

So the Problem is Claused by the freshly published emf 2.15 so you should go back to emf 2.12 explicitly

Do I have to consider any other dependencies beside these ones?

                    <dependency>
                        <groupId>org.eclipse.emf</groupId>
                        <artifactId>org.eclipse.emf.common</artifactId>
                        <version>2.12.0</version>
                    </dependency>
                    <dependency>
                        <groupId>org.eclipse.emf</groupId>
                        <artifactId>org.eclipse.emf.ecore</artifactId>
                        <version>2.12.0</version>
                    </dependency>
                    <dependency>
                        <groupId>org.eclipse.emf</groupId>
                        <artifactId>org.eclipse.emf.ecore.xmi</artifactId>
                        <version>2.12.0</version>
                    </dependency>
                    <dependency>
                        <groupId>org.eclipse.emf</groupId>
                        <artifactId>org.eclipse.emf.codegen</artifactId>
                        <version>2.11.0</version>
                    </dependency>

mchlrch added a commit to mchlrch/experimental-rmdsl that referenced this issue Sep 17, 2018

@chamisf

This comment has been minimized.

chamisf commented Sep 18, 2018

            <dependency>
              <groupId>org.eclipse.emf</groupId>
              <artifactId>org.eclipse.emf.codegen.ecore</artifactId>
              <version>2.12.0</version>
            </dependency>

You should add above as well.

rolve added a commit to rolve/rolez that referenced this issue Sep 18, 2018

rolve added a commit to rolve/rolez that referenced this issue Sep 18, 2018

gdaniel added a commit to SOM-Research/jarvis that referenced this issue Sep 19, 2018

@Guite

This comment has been minimized.

Guite commented Sep 20, 2018

The xtend-maven-plugin works fine using Eclipse 4.9 and Xtext 2.15 without any workarounds now.

I still got the signer error for the xtext-maven-plugin though which includes EMF generation from Xcore. To fix this I updated the dependencies based on this example pom.

rstpv added a commit to rstpv/xtend-gradle-plugin that referenced this issue Sep 20, 2018

szarnyasg added a commit to FTSRG/ingraph that referenced this issue Sep 21, 2018

Bump Xtext version
See related issue: eclipse/xtext#1231

kthoms added a commit to itemis/xtext-reference-projects that referenced this issue Sep 23, 2018

[#8] Workaround for eclipse/xtext#1231
Also updated to EMF 2.15

Signed-off-by: Karsten Thoms <karsten.thoms@itemis.de>

gdaniel added a commit to SOM-Research/jarvis that referenced this issue Sep 26, 2018

@skitt

This comment has been minimized.

skitt commented Oct 1, 2018

The problem will be solved in Xtext 2.15 by having a fixed dependency to emf and jdt and platform

With version 2.15.0 of the Maven plugin, I needed

                    <dependency>
                        <groupId>org.eclipse.platform</groupId>
                        <artifactId>org.eclipse.core.runtime</artifactId>
                        <version>3.13.0</version>
                    </dependency>
                    <dependency>
                        <groupId>org.eclipse.platform</groupId>
                        <artifactId>org.eclipse.equinox.common</artifactId>
                        <version>3.9.0</version>
                    </dependency>
                    <dependency>
                        <groupId>org.eclipse.platform</groupId>
                        <artifactId>org.eclipse.equinox.registry</artifactId>
                        <version>3.7.0</version>
                    </dependency>

to match the dependencies specified in xtend.core. Does that make sense?

@cdietrich

This comment has been minimized.

Member

cdietrich commented Oct 1, 2018

Yes see https://github.com/eclipse/xtext-core/blob/master/gradle/versions.gradle

But you don’t need explicit stuff unless you have something that pulls newer stuff

@skitt

This comment has been minimized.

skitt commented Oct 1, 2018

Yes see https://github.com/eclipse/xtext-core/blob/master/gradle/versions.gradle

But you don’t need explicit stuff unless you have something that pulls newer stuff

My bad, we did indeed have a org.eclipse.equinox.common override lying around :-(.

This looks like it could be closed now, couldn’t it?

@cdietrich

This comment has been minimized.

Member

cdietrich commented Oct 1, 2018

No we are still working on a better solution

@MarkusAmshove

This comment has been minimized.

MarkusAmshove commented Nov 13, 2018

I'm not quite sure how to work around this issue in Gradle, since this thread talks about Maven.

We're using Xtext 2.9.1 with Gradle

@cdietrich

This comment has been minimized.

Member

cdietrich commented Nov 13, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment