Question

BIX setup issue + Unable to initialize Bouncy Castle JCE provider

Hi,

I am running the unix shell file to run the extract rule from the command line and getting the below error. I have ensured that the requried Jar files are placed in the lib directory. But still getting the error. 

Appreciate if any one has any thoughts

 

2016-09-01 08:34:26,642 [                main] [          ] [                    ] [                    ] (      util.crypto.PRCryptoImpl) ERROR   - Unable to initialize Bouncy Castle JCE provider
java.lang.InternalError: cannot create instance of org.bouncycastle.jcajce.provider.symmetric.IDEA$Mappings : java.lang.ClassCastException: org.bouncycastle.jcajce.provider.symmetric.IDEA$Mappings incompatible with org.bouncycastle.jcajce.provider.util.AlgorithmProvider
        at org.bouncycastle.jce.provider.BouncyCastleProvider.loadAlgorithms(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(AccessController.java:359)
        at org.bouncycastle.jce.provider.BouncyCastleProvider.<init>(Unknown Source)
        at com.pega.pegarules.exec.internal.util.crypto.PRCryptoImpl.registerProviders(PRCryptoImpl.java:265)
        at com.pega.pegarules.exec.internal.util.crypto.PRCryptoImpl.getInstance(PRCryptoImpl.java:287)
        at com.pega.pegarules.exec.internal.PRExecProviderImpl.getCrypto(PRExecProviderImpl.java:383)
        at com.pega.pegarules.deploy.internal.archive.ParUtilsImpl.<clinit>(ParUtilsImpl.java:159)
        at java.lang.J9VMInternals.initializeImpl(Native Method)
        at java.lang.J9VMInternals.initialize(J9VMInternals.java:199)
        at com.pega.pegarules.deploy.internal.PRDeployProviderImpl.getParUtils(PRDeployProviderImpl.java:96)
        at com.pega.pegarules.session.internal.engineinterface.etier.impl.EngineStartup.initEngine(EngineStartup.java:506)
        at com.pega.pegarules.session.internal.engineinterface.etier.impl.EngineImpl._initEngine_privact(EngineImpl.java:165)
        at com.pega.pegarules.session.internal.engineinterface.etier.impl.EngineImpl.doStartup(EngineImpl.java:138)
        at com.pega.pegarules.session.internal.mgmt.EngineImpl.startEngineImpl(EngineImpl.java:240)
        at com.pega.pegarules.session.internal.mgmt.EngineImpl.startEngine(EngineImpl.java:119)
        at com.pega.pegarules.session.internal.mgmt.EngineImpl.startEngine(EngineImpl.java:112)
        at com.pega.pegarules.data.internal.access.ExtractImpl.main(ExtractImpl.java:951)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
        at java.lang.reflect.Method.invoke(Method.java:611)
        at com.pega.pegarules.internal.bootstrap.PRBootstrap.invokeMethod(PRBootstrap.java:338)
        at com.pega.pegarules.internal.bootstrap.PRBootstrap.invokeMethodPropagatingThrowable(PRBootstrap.java:379)
        at com.pega.pegarules.boot.internal.extbridge.AppServerBridgeToPega.invokeMethodPropagatingThrowable(AppServerBridgeToPega.java:216)
        at com.pega.pegarules.boot.internal.extbridge.AppServerBridgeToPega.invokeMethod(AppServerBridgeToPega.java:265)

 

**Moderation Team has archived post**

This post has been archived for educational purposes. Contents and links will no longer be updated. If you have the same/similar question, please write a new post.

Correct Answer
September 1, 2016 - 1:29pm

I just looked at the screenshot of your lib directory again.  You have a file called bcprov-jdk*.jar in that directory.  Are you including that jar on your classpath?  If so please remove it.  The only jars you need on your classpath are the jsr94-1-0.jar, prbootstrap.jar, prbootstrap-api.jar, prdbcp.jar and your JDBC jars.

Comments

Keep up to date on this post and subscribe to comments

September 1, 2016 - 11:53am

Are you sure that the jars that are in your lib directory are the correct versions for the version of Pega/BIX that you are executing?  What version of Pega/BIX are you running and send a screenshot showing the size of each of the jars (ls -al on lib directory) so we can double check.

September 1, 2016 - 11:59am

Here is the screen shot

 

Pega
September 1, 2016 - 12:09pm
Response to Suman Palukuru

Can you re-post the screenshot at a higher resolution - can't quite make it out. (even with my glasses ;-) )

September 1, 2016 - 12:11pm
Response to Suman Palukuru

Even trying to enlarge that screenshot it is hard to read.  From what I can see it doesn't actually show the size of the jars.  Please run ls -al on the lib directory and  could you tell me the size of each jar and also the pega/bix version so I can compare to the right version.

September 1, 2016 - 12:38pm

We are on Pega 7.1.7 and I believe the BIX version should be BIX 7.1. Attached the new screen shot.

Thanks,

Suman

September 1, 2016 - 12:52pm

Those look like the correct size for each jar in Pega/BIX 7.1.7.  What version of Java are you running?  Please post the PegaRULES log file with this error so I can see if there is anything in the startup which would give us an idea of what the issue is.

September 1, 2016 - 1:02pm

Java version is 1.6 and please find the attached log files.

Java Version
--------------------

java version "1.6.0"
Java(TM) SE Runtime Environment (build pxa6460sr16fp7ifix-20150930_02(SR16 FP7+IV77565))
IBM J9 VM (build 2.4, JRE 1.6.0 IBM J9 2.4 Linux amd64-64 jvmxa6460sr16fp7-20150701_255724 (JIT enabled, AOT enabled)
J9VM - 20150701_255724
JIT - r9_20150630_95420
GC - GA24_Java6_SR16_20150701_1008_B255724)
JCL - 20150628_01 

-Suman

September 1, 2016 - 1:30pm

I just looked at the screenshot of your lib directory again.  You have a file called bcprov-jdk*.jar in that directory.  Are you including that jar on your classpath?  If so please remove it.  The only jars you need on your classpath are the jsr94-1-0.jar, prbootstrap.jar, prbootstrap-api.jar, prdbcp.jar and your JDBC jars.

September 1, 2016 - 3:19pm

Thanks we don't see the error now. May i know what is the usage of bcprov-jdk.jar file? I will run the sh file and let you know if any issues are faced.

Appreciate for your prompt response.

-Suman

September 1, 2016 - 3:36pm

That bcprov-jdk* jar is a bouncy castle jar file. 

The Bouncy Castle Crypto package is a Java implementation of cryptographic algorithms. This jar contains JCE provider and lightweight API for the Bouncy Castle Cryptography APIs for JDK 1.5.   It is not needed on the classpath and that version is conflicting with the version which is included with pega.