[ODLPARENT-183] BouncyCastle does not work with Java 11 Created: 02/Jan/19  Updated: 04/Jan/19  Resolved: 02/Jan/19

Status: Resolved
Project: odlparent
Component/s: Karaf
Affects Version/s: 4.0.7
Fix Version/s: 4.0.8, 3.1.6

Type: Bug Priority: High
Reporter: Robert Varga Assignee: Robert Varga
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

This was encountered when testing AAA with JDK11. Our wiring of BouncyCastle in Karaf does not work, emitting an error on the console:

Apache Karaf starting up. Press Enter to open the shell now...
Unable to register security provider: java.lang.ClassNotFoundException: org.bouncycastle.jce.provider.BouncyCastleProvider
100% [========================================================================]

Karaf started in 0s. Bundle stats: 15 active, 15 total

This leads to AAA failing on SFT, because BC provider is not registered as expected, leading to a run-time failure.



 Comments   
Comment by Robert Varga [ 02/Jan/19 ]

The problem is that we are dropping BC into lib/ext, which part of JVM extension mechanism, which was removed in JDK9. Dropping them into lib/boot should be sufficient to make things work, as the provider will be activated from Main.

Generated at Wed Feb 07 20:27:51 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.