CyberSource / cybersource-sdk-java

Java SDK for CyberSource Simple Order API
Other
51 stars 84 forks source link

spring boot java issue #96

Closed jijeshvu07 closed 4 years ago

jijeshvu07 commented 6 years ago

Error while running the spring boot jar using 'java -jar app.jar'

2017-12-12 12:04:30.433 http-nio-4040-exec-6 INFO     > Client, End of soapWrap   16ms
2017-12-12 12:04:30.474 http-nio-4040-exec-6 INFO     > Loading the certificate from p12 file 
2017-12-12 12:04:31.261 http-nio-4040-exec-6 EXCEPTION> Exception while loading KeyStore, 'xx_xxxxxxxx_xx.p12'
2017-12-12 12:04:31.267 http-nio-4040-exec-6 EXCEPTION> 
ClientException details:
innerException: 
java.io.IOException: exception decrypting data - java.security.InvalidKeyException: Illegal key size
    at org.bouncycastle.jce.provider.JDKPKCS12KeyStore.cryptData(Unknown Source)
    at org.bouncycastle.jce.provider.JDKPKCS12KeyStore.engineLoad(Unknown Source)
    at java.security.KeyStore.load(Unknown Source)
    at com.cybersource.ws.client.SecurityUtil.readAndStoreCertificateAndPrivateKey(SecurityUtil.java:125)
    at com.cybersource.ws.client.SecurityUtil.loadMerchantP12File(SecurityUtil.java:101)
    at com.cybersource.ws.client.Client.soapWrapAndSign(Client.java:236)
xinlmain commented 5 years ago

Had the same issue. It's the JCE policy problem. You need to update JDK version, or install JCE policy files.

WThamira commented 5 years ago

I also have this same issue.

mahendya1002 commented 4 years ago

you need to install unlimited length JCE policy files.