0

I am new to Java and stuck with a problem. The below exception caused in the runtime in my spring boot application.

java.lang.NoSuchFieldError: qTESLA
    at org.bouncycastle.pqc.asn1.PQCObjectIdentifiers.<clinit>(Unknown Source)
    at org.bouncycastle.jce.provider.BouncyCastleProvider.loadPQCKeys(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.security.AccessController.doPrivileged(Native Method)
    at org.bouncycastle.jce.provider.BouncyCastleProvider.<init>(Unknown Source)

This application is actually running in AWS inside a docker container. I noticed that to solve this runtime error, I need to add two jar files in the classpath. The jars are download from oracle site http://www.oracle.com/technetwork/java/javase/downloads/jce8-download-2133166.html

Question is how to add these to classpath and commit my changes to git. When I add this classpath via IntelliJ IDE -> Command+; (macos) it is not reflecting in my git diff. What am I missing here ? Kindly help.

Gokul E
  • 1,356
  • 2
  • 13
  • 28
  • would this answer your question https://stackoverflow.com/questions/65859403/how-to-add-external-jars-to-spring-application-without-restarting-jvm – sanjeevRm May 13 '21 at 11:18
  • 1
    That error won't be solved by the JCE 'unlimited' policies, and if you are using 8u151 or higher (and at this point you should be) _no_ error will be solved by them. For the long-obsolete versions of Java that did need them they _must_ be put in JRE/lib/security _NOT_ the classpath, as explained in detail in the readme file that's right there in the download. Your problem is more likely caused by multiple versions of BouncyCastle getting loaded somehow. – dave_thompson_085 May 13 '21 at 14:41

0 Answers0