wsdl2java - WARNING: Default key managers cannot b

2019-07-19 05: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";
}


标签: cxf wsdl2java