How to resolve com.tibco.security.AXSecurityException: Cannot initialize BouncyCastle provider in classpath
book
Article ID: KB0074613
calendar_today
Updated On:
Products
Versions
TIBCO ActiveMatrix BusinessWorks
5.14
Description
With TIBCO Rendezvous ® (RV) 8.5.0 installed, SSL-enabled activities in TIBCO ActiveMatrix BusinessWorks™ applications fail to initialize with the following exception -
2020 Aug 28 13:41:11:473 EDT com.tibco.security.AXSecurityException: Cannot initialize BouncyCastle provider in classpath java.lang.reflect.InvocationTargetException at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ... Caused by: java.lang.NoSuchMethodError: org.bouncycastle.crypto.CryptoServicesRegistrar.isInApprovedOnlyMode()Z at org.bouncycastle.jcajce.provider.ProvSecureHash$MD5.configure(Unknown Source) at org.bouncycastle.jcajce.provider.BouncyCastleFipsProvider.<init>(Unknown Source) at org.bouncycastle.jcajce.provider.BouncyCastleFipsProvider.<init>(Unknown Source) ... 33 more 2020 Aug 28 13:41:11:481 EDT Cannot initialize security vendor com.tibco.security.AXSecurityException: Cannot initialize BouncyCastle provider in classpath at com.tibco.security.impl.OoOO.C.o00000(SecurityVendor.java:314) at com.tibco.security.impl.OoOO.C.init(SecurityVendor.java:143) at com.tibco.security.impl.OoOO.C.init(SecurityVendor.java:88) ... Caused by: java.lang.reflect.InvocationTargetException at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:423) at com.tibco.security.impl.OoOO.C.o00000(SecurityVendor.java:297) ... 28 more Caused by: java.lang.NoSuchMethodError: org.bouncycastle.crypto.CryptoServicesRegistrar.isInApprovedOnlyMode()Z at org.bouncycastle.jcajce.provider.ProvSecureHash$MD5.configure(Unknown Source) at org.bouncycastle.jcajce.provider.BouncyCastleFipsProvider.<init>(Unknown Source) at org.bouncycastle.jcajce.provider.BouncyCastleFipsProvider.<init>(Unknown Source) ... 33 more 2020 Aug 28 13:41:11:487 EDT While initializing security vendor com.tibco.security.AXSecurityException: Cannot initialize security vendor 'j2se', got: com.tibco.security.AXSecurityException: Cannot initialize BouncyCastle provider in classpath (TIBCrypt 2.19.0.023) at com.tibco.security.impl.OoOO.C.init(SecurityVendor.java:160) at com.tibco.security.impl.OoOO.C.init(SecurityVendor.java:88) at com.tibco.security.impl.OoOO.void.init(CryptoVendor.java:47) ...
The issue is caused by conflict with the BouncyCastle JAR file from RV 8.5 installation - RV_HOME/lib/bcprov-jdk15on-162.jar.
Issue/Introduction
How to resolve com.tibco.security.AXSecurityException: Cannot initialize BouncyCastle provider in classpath
To resolve the issue, add %TPCL_HOME%/lib/bc-fips-1.0.2.jar as the first entry to tibco.env.CUSTOM_EXT_PREPEND_CP in bwengine.tra file. Then redeploy the application.
Before - tibco.env.CUSTOM_EXT_PREPEND_CP=e:/tibco/bw/5.14/hotfix/lib;%TRA_HOME%/hotfix/lib;%RV_HOME%/lib/tibrvj.jar;%RV_HOME%/lib;%RV_HOME%/lib/64;%TPCL_HOME%/lib/mail.jar;%TRA_HOME%/lib/TIBCrypt.jar
After - tibco.env.CUSTOM_EXT_PREPEND_CP=%TPCL_HOME%/lib/bc-fips-1.0.2.jar;e:/tibco/bw/5.14/hotfix/lib;%TRA_HOME%/hotfix/lib;%RV_HOME%/lib/tibrvj.jar;%RV_HOME%/lib;%RV_HOME%/lib/64;%TPCL_HOME%/lib/mail.jar;%TRA_HOME%/lib/TIBCrypt.jar