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

PCT compatibility with GitHub plugin #268

Merged
merged 1 commit into from
Feb 2, 2023
Merged

Conversation

basil
Copy link
Member

@basil basil commented Feb 1, 2023

Observed the following PCT error when trying to add the github plugin to jenkinsci/bom:

SEVERE: Failed Loading plugin bouncycastle API Plugin v2.27 (bouncycastle-api)
java.io.IOException: Failed to initialize
        at hudson.ClassicPluginStrategy.load(ClassicPluginStrategy.java:409)
        at hudson.PluginManager$2$1$1.run(PluginManager.java:551)
        at org.jvnet.hudson.reactor.TaskGraphBuilder$TaskImpl.run(TaskGraphBuilder.java:177)
        at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:305)
        at jenkins.model.Jenkins$5.runTask(Jenkins.java:1164)
        at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:221)
        at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:120)
        at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:68)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
        at java.base/java.lang.Thread.run(Thread.java:833)
Caused by: java.lang.SecurityException: class "org.bouncycastle.jcajce.provider.symmetric.IDEA$Mappings"'s signer information does not match signer information of other classes in the same package
        at java.base/java.lang.ClassLoader.checkCerts(ClassLoader.java:1158)
        at java.base/java.lang.ClassLoader.preDefineClass(ClassLoader.java:902)
        at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1010)
        at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:150)
        at java.base/jdk.internal.loader.BuiltinClassLoader.defineClass(BuiltinClassLoader.java:862)
        at java.base/jdk.internal.loader.BuiltinClassLoader.findClassOnClassPathOrNull(BuiltinClassLoader.java:760)
        at java.base/jdk.internal.loader.BuiltinClassLoader.loadClassOrNull(BuiltinClassLoader.java:681)
        at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:639)
        at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188)
        at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:520)
        at org.bouncycastle.jce.provider.BouncyCastleProvider.loadAlgorithms(Unknown Source)
        at org.bouncycastle.jce.provider.BouncyCastleProvider.setup(Unknown Source)
        at org.bouncycastle.jce.provider.BouncyCastleProvider.access$000(Unknown Source)
        at org.bouncycastle.jce.provider.BouncyCastleProvider$1.run(Unknown Source)
        at java.base/java.security.AccessController.doPrivileged(AccessController.java:318)
        at org.bouncycastle.jce.provider.BouncyCastleProvider.<init>(Unknown Source)
        at jenkins.bouncycastle.api.BcProviderRegistration.register(BcProviderRegistration.java:42)
        at jenkins.bouncycastle.api.BcProviderRegistration.register(BcProviderRegistration.java:28)
        at jenkins.bouncycastle.api.SecurityProviderInitializer.addSecurityProvider(SecurityProviderInitializer.java:50)
        at jenkins.bouncycastle.api.BouncyCastlePlugin.start(BouncyCastlePlugin.java:62)
        at hudson.ClassicPluginStrategy.startPlugin(ClassicPluginStrategy.java:417)
        at hudson.ClassicPluginStrategy.load(ClassicPluginStrategy.java:406)
        ... 10 more

This is due to a conflict between the Bouncy Castle provided on the test class path and that pulled in transitively via GitHub plugin's dependency on Instance Identity. With this fix I verified that the problem no longer occurs.

@basil
Copy link
Member Author

basil commented Feb 2, 2023

Tested successfully in jenkinsci/bom#1722 and a release of this is needed to add github to jenkinsci/bom for PCT testing.

@olamy olamy merged commit d9ab127 into jenkinsci:master Feb 2, 2023
@basil basil deleted the pct-github branch February 2, 2023 03:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants