javajava-7jksibm-jdk

issue while migrating application from ibm jdk 6 to oracle jdk7


I am migrating my application from ibm jdk 1.6+geronimo server to oracle jdk1.7+jboss.

I have a working version of jks configuration in previous version which is not working in new configuration.

I am loading jks file like:

            System.setProperty("javax.net.ssl.trustStore", path_jks);
            System.setProperty("javax.net.ssl.trustStorePassword",jks_password);

But this is not working. I am getting below error:

Caused by: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty

    at java.security.cert.PKIXParameters.setTrustAnchors(PKIXParameters.java:200)

    at java.security.cert.PKIXParameters.<init>(PKIXParameters.java:120)

    at java.security.cert.PKIXBuilderParameters.<init>(PKIXBuilderParameters.java:104)

    at sun.security.validator.PKIXValidator.<init>(PKIXValidator.java:88)

I verified the path of jks is correct. Do I need to create new jks depending on new jdk?

please help.


Solution

  • I resolved the issue..

    because we were getting the path of jks from API which was returning the path with file: protocol as jboss does not support this jks was not getting loaded. i modified the string to remove the "file:" and it is working fine now.