wsdl2java - WARNING: Default key managers cannot be initialized

混江龙づ霸主 提交于 2019-12-24 00:13:09

问题


While generating java WSDL client I am receiving these errors. Can you please help me to understand these?

C:\Users\Administrator\workspace\apache-cxf-3.0.2\bin> wsdl2java https://example.com/V1/HelpService?wsdl

*Nov 03, 2014 1:11:20 PM org.apache.cxf.configuration.jsse.SSLUtils getDefaultKeyStoreManagers WARNING: Default key managers cannot be initialized: C:\Users\Administrator.keystore (The system cannot find the file specified)

Nov 03, 2014 1:11:20 PM org.apache.cxf.configuration.jsse.SSLUtils getDefaultKeyStoreManagers WARNING: Default key managers cannot be initialized: C:\Users\Administrator.keystore (The system cannot find the file specified)

Nov 03, 2014 1:11:21 PM org.apache.cxf.configuration.jsse.SSLUtils getDefaultKeyStoreManagers WARNING: Default key managers cannot be initialized: C:\Users\Administrator.keystore (The system cannot find the file specified)*

C:\Users\Administrator\workspace\apache-cxf-3.0.2\bin>


回答1:


Your problem is that the property javax.net.ssl.keyStore is not specified and if it is not specified .keystore is used in your home directory. If .keystore does not exist you will get this error.

Snip from org.apache.cxf.configuration.jsse.SSLUtils.java :

public static String getKeystore(String keyStoreLocation, Logger log) 

...//some other code

keyStoreLocation = SystemPropertyAction.getProperty("javax.net.ssl.keyStore");
if (keyStoreLocation != null) {
    logMsg = "KEY_STORE_SYSTEM_PROPERTY_SET";
} else {
keyStoreLocation =
    SystemPropertyAction.getProperty("user.home") + "/.keystore";
    logMsg = "KEY_STORE_NOT_SET";
}


来源:https://stackoverflow.com/questions/26720402/wsdl2java-warning-default-key-managers-cannot-be-initialized

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!