Jenkins, Java 11, and BouncyCastle

I’m trying to update a plugin and with the update I’ll be setting min Java version to 11. However, in all my tests i’m starting to see this error in the log, which didn’t happen on Java8.

Does anyone have any guidance on how to fix the test setup to resolve it? I’m having test failures with the update, which I don’t think are related, but I’d like to eliminate this so I can pin down what’s actually failing.

   4.784 [id=33]	WARNING	h.ExtensionFinder$GuiceFinder$FaultTolerantScope$1#error: Failed to instantiate Key[type=org.jenkinsci.main.modules.instance_identity.PageDecoratorImpl, annotation=[none]]; skipping this component
java.lang.IllegalStateException: Couldn't locate either of bouncy castle FIPS or non fips provider, available providers areSUN,SunRsaSign,SunEC,SunJSSE,SunJCE,SunJGSS,SunSASL,XMLDSig,SunPCSC,JdkLDAP,JdkSASL,Apple,SunPKCS11.
	at jenkins.bouncycastle.api.PEMEncodable.<clinit>(
Caused: java.lang.ExceptionInInitializerError

Hello @stopp and welcome to this community :wave:

What is your parent pom version?

The latest i could find: 4.62

What does

mvn dependency:tree -Dincludes=org.bouncycastle

give you?

Before my changes - nothing.

stopp@paladin adobe-cloud-manager-plugin % mvn dependency:tree -Dincludes=org.bouncycastle
[INFO] Scanning for projects...
[WARNING] The POM for is missing, no dependency information available
[WARNING] Failed to build parent project for io.jenkins.plugins:adobe-cloud-manager:hpi:999999-SNAPSHOT
[INFO] ---------------< io.jenkins.plugins:adobe-cloud-manager >---------------
[INFO] Building Adobe Cloud Manager Plugin 999999-SNAPSHOT
[INFO] --------------------------------[ hpi ]---------------------------------
[INFO] --- maven-dependency-plugin:3.1.2:tree (default-cli) @ adobe-cloud-manager ---
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  0.994 s
[INFO] Finished at: 2023-05-03T10:18:14-05:00
[INFO] ------------------------------------------------------------------------

After my changes:

INFO] io.jenkins.plugins:adobe-cloud-manager:hpi:999999-SNAPSHOT
[INFO] \- org.jenkins-ci.plugins:git:jar:5.0.0:compile
[INFO]    \- org.jenkins-ci.plugins:mailer:jar:448.v5b_97805e3767:compile
[INFO]       \- org.jenkins-ci.modules:instance-identity:jar:142.v04572ca_5b_265:compile
[INFO]          \- org.jenkins-ci.plugins:bouncycastle-api:jar:2.27:compile
[INFO]             +- org.bouncycastle:bcpkix-jdk18on:jar:1.72:compile
[INFO]             +- org.bouncycastle:bcprov-jdk18on:jar:1.72:compile
[INFO]             \- org.bouncycastle:bcutil-jdk18on:jar:1.72:compile

So between my last post and this one, the problem has gone away…? This really makes no sense. I’m not seeing the original error message anymore.

There’s some new changes with the updated deps i need to resolve but that’s a different issue.

Project URL for reference: GitHub - bstopp/adobe-cloud-manager-plugin: A Jenkins Plugin to Trigger Cloud Manager Pipelines

1 Like