My Oracle Support Banner

Error java.security.NoSuchAlgorithmException: Algorithm %s Not Available When Executing Java Stored Procedure With Encryption (Doc ID 369369.1)

Last updated on MARCH 14, 2025

Applies to:

Oracle Database - Enterprise Edition - Version 10.2.0.2 and later
Oracle Database Cloud Schema Service - Version N/A and later
Oracle Database Exadata Express Cloud Service - Version N/A and later
Oracle Database Exadata Cloud Machine - Version N/A and later
Oracle Cloud Infrastructure - Database Service - Version N/A and later
Information in this document applies to any platform.

Symptoms

When executing a java stored procedure using encryption provided by a third party provider the following error is returned:


java.security.NoSuchAlgorithmException: Cannot find any provider supporting RC4
at javax.crypto.Cipher.getInstance(DashoA6275)
at testEncrypt.testRSA(testEncrypt:46)


or , if you explicitly specify the provider in the call to KeyGenerator.getInstance (in this case BC for BouncyCastle):

java.security.NoSuchProviderException: JCE cannot authenticate the provider BC
at javax.crypto.SunJCE_b.a(DashoA6275)
at javax.crypto.SunJCE_b.a(DashoA6275)
at javax.crypto.KeyGenerator.getInstance(DashoA6275)
at TestEncryption.encrypt(TestEncryption:57)
Caused by: java.lang.NullPointerException
at javax.crypto.SunJCE_d.a(DashoA6275)
at javax.crypto.SunJCE_d.verify(DashoA6275)

Changes

You have loaded the provider's  .jar file using loadjava in order that the procedure compiles correctly and can execute the program from the command line with the provider's .jar file in the class path.

Cause

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Symptoms
Changes
Cause
Solution
References

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.