简体   繁体   English

将应用程序从ibm jdk 6迁移到oracle jdk7时出现问题

[英]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. 我正在将应用程序从ibm jdk 1.6 + geronimo服务器迁移到oracle jdk1.7 + jboss。

I have a working version of jks configuration in previous version which is not working in new configuration. 我在以前的版本中有jks配置的工作版本,但在新配置中不起作用。

I am loading jks file like: 我正在加载jks文件,如:

            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. 我验证了jks的路径是正确的。 Do I need to create new jks depending on new jdk? 我是否需要根据新的jdk创建新的jk?

please help. 请帮忙。

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. 因为我们从API获取jks的路径,而该API返回的文件路径为:协议,因为jboss不支持此jks未加载。 i modified the string to remove the "file:" and it is working fine now. 我修改了字符串以删除“文件:”,它现在可以正常工作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM