Bug 536445 - Error injecting: org.eclipse.xtend.maven.XtendCompile - signer information does not match signer information of other classes in the same package
Summary: Error injecting: org.eclipse.xtend.maven.XtendCompile - signer information do...
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Runtime (show other bugs)
Version: 4.8   Edit
Hardware: PC All
: P3 blocker (vote)
Target Milestone: 4.9 M2   Edit
Assignee: Dani Megert CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 536600 (view as bug list)
Depends on:
Blocks:
 
Reported: 2018-06-29 00:16 EDT by Robert Hilbrich CLA
Modified: 2018-07-24 04:16 EDT (History)
7 users (show)

See Also:


Attachments
Sample Priject with main showing the error (3.05 KB, application/zip)
2018-06-29 00:59 EDT, Christian Dietrich CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Hilbrich CLA 2018-06-29 00:16:29 EDT
I just migrated my RCP application from Oxygen to Photon. Everything worked fine on Photon. All of a sudden, my build on travis stopped working. It complains about "signer information does not match signer information of other classes in the same package". You can see the full log of the travis build here [1]. The code is here [2]. I do not think that the issue is within my code. Seems to be related to the repository?

[1]: https://travis-ci.org/RobertHilbrich/assist-public/builds/397952071
[2]: https://github.com/roberthilbrich/assist-public

Any ideas or pointer are greatly appreciated.
Comment 1 Robert Hilbrich CLA 2018-06-29 00:22:48 EDT
Downloaded from central: https://repo.maven.apache.org/maven2/org/eclipse/emf/org.eclipse.emf.codegen/maven-metadata.xml (737 B at 26 kB/s)
[WARNING] Error injecting: org.eclipse.xtend.maven.XtendCompile
com.google.inject.ProvisionException: Unable to provision, see the following errors:
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
  at org.eclipse.xtend.maven.XtendCompile.<init>(Unknown Source)
  while locating org.eclipse.xtend.maven.XtendCompile
1 error
    at com.google.inject.internal.InjectorImpl$2.get (InjectorImpl.java:1025)
    at com.google.inject.internal.InjectorImpl.getInstance (InjectorImpl.java:1051)
    at org.eclipse.sisu.space.AbstractDeferredClass.get (AbstractDeferredClass.java:48)
    at com.google.inject.internal.ProviderInternalFactory.provision (ProviderInternalFactory.java:81)
    at com.google.inject.internal.InternalFactoryToInitializableAdapter.provision (InternalFactoryToInitializableAdapter.java:53)
    at com.google.inject.internal.ProviderInternalFactory$1.call (ProviderInternalFactory.java:65)
    at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision (ProvisionListenerStackCallback.java:115)
    at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision (ProvisionListenerStackCallback.java:133)
    at com.google.inject.internal.ProvisionListenerStackCallback.provision (ProvisionListenerStackCallback.java:68)
    at com.google.inject.internal.ProviderInternalFactory.circularGet (ProviderInternalFactory.java:63)
    at com.google.inject.internal.InternalFactoryToInitializableAdapter.get (InternalFactoryToInitializableAdapter.java:45)
    at com.google.inject.internal.InjectorImpl$2$1.call (InjectorImpl.java:1016)
    at com.google.inject.internal.InjectorImpl.callInContext (InjectorImpl.java:1092)
    at com.google.inject.internal.InjectorImpl$2.get (InjectorImpl.java:1012)
    at org.eclipse.sisu.inject.Guice4$1.get (Guice4.java:162)
    at org.eclipse.sisu.inject.LazyBeanEntry.getValue (LazyBeanEntry.java:81)
    at org.eclipse.sisu.plexus.LazyPlexusBean.getValue (LazyPlexusBean.java:51)
    at org.codehaus.plexus.DefaultPlexusContainer.lookup (DefaultPlexusContainer.java:263)
    at org.codehaus.plexus.DefaultPlexusContainer.lookup (DefaultPlexusContainer.java:255)
    at org.apache.maven.plugin.internal.DefaultMavenPluginManager.getConfiguredMojo (DefaultMavenPluginManager.java:519)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:121)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:208)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:154)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:146)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:51)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:309)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:194)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:107)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:955)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:290)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:194)
    at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:498)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:289)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:229)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:415)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:356)
Caused by: 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
Comment 2 Christian Dietrich CLA 2018-06-29 00:31:51 EDT
Already reported as https://github.com/eclipse/xtext/issues/1231

Workaround is described there too
Comment 3 Christian Dietrich CLA 2018-06-29 00:59:21 EDT
Created attachment 274683 [details]
Sample Priject with main showing the error

Problem is:

the platform metadata allow to use this combination

	<dependencies>
		<dependency>
			<groupId>org.eclipse.platform</groupId>
			<artifactId>org.eclipse.core.runtime</artifactId>
			<version>3.14.0</version>
		</dependency>
		<dependency>
			<groupId>org.eclipse.platform</groupId>
			<artifactId>org.eclipse.equinox.common</artifactId>
			<version>3.8.0</version>
		</dependency>
	</dependencies>

caus core.runtime specifies

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

but at runtime equinox.common is needed.

Exception in thread "main" java.lang.SecurityException: class "org.eclipse.core.runtime.ILog"'s signer information does not match signer information of other classes in the same package
	at java.lang.ClassLoader.checkCerts(ClassLoader.java:898)
	at java.lang.ClassLoader.preDefineClass(ClassLoader.java:668)
	at java.lang.ClassLoader.defineClass(ClassLoader.java:761)
	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
	at java.net.URLClassLoader.defineClass(URLClassLoader.java:467)
	at java.net.URLClassLoader.access$100(URLClassLoader.java:73)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:368)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:362)
Comment 4 Christian Dietrich CLA 2018-06-29 01:00:38 EDT
but at runtime equinox.common 3.10 is needed.
Comment 5 Ed Willink CLA 2018-07-02 03:22:24 EDT
"signer information does not match signer information" is a sure indication of a mix-and-match installation, possibly due to crazy user dependencies, more commonly due to a bad platform build.

There was a bad platform build at this time: See Bug 531640
Comment 6 Christian Dietrich CLA 2018-07-02 03:25:14 EDT
no in this case the problem is
bad dependency ranges
that allow older and newer jars
that are split packages to be used together.
imho the ranges should have been updated
with the signing change
Comment 7 Ed Willink CLA 2018-07-02 03:34:15 EDT
Ouch! IMHO the 'master' consumer should have accurate version ranges so that everyone else can be open. Certainly those who use split packages must be very careful to guarantee the quality to their consumers.

Further comment on the need for better platform testing added to Bug 466991.
Comment 8 Eclipse Genie CLA 2018-07-02 04:19:53 EDT
New Gerrit change created: https://git.eclipse.org/r/125314
Comment 10 Christian Dietrich CLA 2018-07-03 05:27:52 EDT
*** Bug 536600 has been marked as a duplicate of this bug. ***
Comment 11 Michael Vorburger CLA 2018-07-03 11:24:43 EDT
> but at runtime equinox.common 3.10 is needed.

just FYI to anyone else hitting this problem, as noted on https://github.com/eclipse/xtext/issues/1231#issuecomment-402193047, for use in https://jira.opendaylight.org/browse/ODLPARENT-156 the solution was to slap a dependency to org.eclipse.jdt.core:3.13.102 (and not just org.eclipse.equinox.common:3.10.0) on the xtend-maven-plugin:2.14.0.
Comment 12 Dani Megert CLA 2018-07-22 11:32:41 EDT
(In reply to Eclipse Genie from comment #9)
> Gerrit change https://git.eclipse.org/r/125314 was merged to [master].
> Commit:
> http://git.eclipse.org/c/viatra/org.eclipse.viatra.git/commit/?id=8b43b496d4d16e736b4cc2b90acf9a2900f8483f
> 

So, is this fixed? Also, please move to the correct component.
Comment 13 Christian Dietrich CLA 2018-07-22 11:36:57 EDT
there is nothing fixed.
https://github.com/eclipse/eclipse.platform.runtime/blob/master/bundles/org.eclipse.core.runtime/META-INF/MANIFEST.MF
still has the range that allows the bad combinations
of the platform maven artifacts
Comment 14 Christian Dietrich CLA 2018-07-22 11:37:43 EDT
all the "fixes" in other components are just mitigations
Comment 15 Andrey Loskutov CLA 2018-07-22 11:37:57 EDT
(In reply to Christian Dietrich from comment #13)
> there is nothing fixed.
> https://github.com/eclipse/eclipse.platform.runtime/blob/master/bundles/org.
> eclipse.core.runtime/META-INF/MANIFEST.MF
> still has the range that allows the bad combinations
> of the platform maven artifacts

Do you have a proposal for "good" range?
Comment 16 Dani Megert CLA 2018-07-22 11:40:38 EDT
(In reply to Christian Dietrich from comment #13)
> there is nothing fixed.
> https://github.com/eclipse/eclipse.platform.runtime/blob/master/bundles/org.eclipse.core.runtime/META-INF/MANIFEST.MF
> 
> still has the range that allows the bad combinations
> of the platform maven artifacts

OK. Can you provide a Gerrit change.
Comment 17 Christian Dietrich CLA 2018-07-22 11:40:47 EDT
if the maven artifact needs 3.10 to be fine with the signatures then it should start there. i am not sure when and how signatures change so when the problem will occur again in a different form for other dependencies.

we will fix that on xtext side by beeing more restrictive in that platform and jdt versions we use to avoid future problems but others might be affected too.
Comment 18 Ed Willink CLA 2018-07-22 14:01:50 EDT
(In reply to Christian Dietrich from comment #17)
> we will fix that on xtext side by beeing more restrictive in that platform

This seems very undesirable. Xtext is not synchronized with SimRel and makes occasional (accidental) breaking API changes. It is therefore very desirable to continue the prevailing practice of allowing an Xtext developer to use their favourite version of Xtext.

I'm not clear why this an Xtext problem at all; conventional Xtext bounds should mean that it picks up the latest, which should be consistent and good.

Unless Xtext is actually adding a fragment to a platform package, how is a bad platform signing an Xtext problem? The platform fragments should surely be tightly and unambiguously coupled to what they apply to. Also any plausible build repo should only offer a compatible set of top versions.

(Perhaps the erroneous default ordering fixed by Bug 535509 is relevant)
Comment 19 Christian Dietrich CLA 2018-07-22 14:05:50 EDT
This affects the maven and gradle part of Xtext.
E.g. if you use the gradle part of Xtext
With photon jdt it will be a factor 1000 slower and memory hungrier than with oxygen 3a. Since we use some internal api too we cannot take the latest greatest of everything
In the particular problem the problem is that we partially take the latest and partially not.
The ranges in jdt allow that. But the signatures do not.
Comment 20 Andrey Loskutov CLA 2018-07-22 14:07:42 EDT
Christian, once again: can you propose *better* ranges for platform plugins? If not: why?
Comment 21 Christian Dietrich CLA 2018-07-22 14:10:30 EDT
It is for me mainly a i don’t have time and a we dont have solved this on Xtext side yet problem
Comment 23 Andrey Loskutov CLA 2018-07-24 03:35:00 EDT
(In reply to Dani Megert from comment #22)
> Fixed with
> http://git.eclipse.org/c/platform/eclipse.platform.runtime.git/commit/
> ?id=635f01ccfe1d762c88d6108199bfecda3e47894b

This caused API error: The minor version should be incremented in version 3.14.100, because the modification of the version range for the re-exported bundle org.eclipse.equinox.app requires a minor version change

I will try to fix this now.
Comment 24 Eclipse Genie CLA 2018-07-24 03:38:02 EDT
New Gerrit change created: https://git.eclipse.org/r/126523
Comment 26 Andrey Loskutov CLA 2018-07-24 04:08:27 EDT
(In reply to Eclipse Genie from comment #25)
> Gerrit change https://git.eclipse.org/r/126523 was merged to [master].
> Commit:
> http://git.eclipse.org/c/platform/eclipse.platform.runtime.git/commit/
> ?id=fe47fe209e1606499f30c88595e60b8c3028b223

In master. The error was reported also here:
http://download.eclipse.org/eclipse/downloads/drops4/I20180723-2000/apitools/analysis/html/org.eclipse.core.runtime/report.html
Comment 27 Dani Megert CLA 2018-07-24 04:16:17 EDT
(In reply to Andrey Loskutov from comment #23)
> (In reply to Dani Megert from comment #22)
> > Fixed with
> > http://git.eclipse.org/c/platform/eclipse.platform.runtime.git/commit/
> > ?id=635f01ccfe1d762c88d6108199bfecda3e47894b
> 
> This caused API error: The minor version should be incremented in version
> 3.14.100, because the modification of the version range for the re-exported
> bundle org.eclipse.equinox.app requires a minor version change
> 
> I will try to fix this now.

Thanks for fixing this. I will have to check why no error or warning appears in my workspace.