Java 尝试登录应用程序时发生ResourceAccessException

Java 尝试登录应用程序时发生ResourceAccessException,java,spring,web-services,jakarta-ee,Java,Spring,Web Services,Jakarta Ee,我在尝试登录应用程序时遇到以下异常 例外情况: 2016-08-11 14:06:18,698 ERROR [com.myApp.auto.servicing.UserRestClient] Unable to update user logged in information org.springframework.web.client.ResourceAccessException: I/O error: Default SSL context init failed: null; nest

我在尝试登录应用程序时遇到以下异常

例外情况:

2016-08-11 14:06:18,698 ERROR [com.myApp.auto.servicing.UserRestClient] Unable to update user logged in information
org.springframework.web.client.ResourceAccessException: I/O error: Default SSL context init failed: null; nested exception is java.net.SocketException: Default SSL context init failed: null
UserRestClient.java

void sendUserLoggedInformation(String userKey)
{
    if ("null".equals(userKey))
    {
        return;
    }
    final String url =
        AbstractDAOFactory.getDAOFactory().getAutoServicesURLDAO()
            .getAutoServiceURL(AutoServicingURLEnum.USER_LOGON_URL.getAutoServicingURLKey());
    try
    {
         getTemplate().postForLocation(url, null, userKey);
    }
    catch (RestClientException e)
    {
        logger.error("Unable to update user logged in information", e);
    }
}

我无法理解调用postForLocation(..)时,为什么会在下面提到的方法中生成异常。请建议。

您似乎在为服务器使用证书。正确配置密钥库和信任库,这应该可以解决问题。@rockcode,如何配置密钥库和信任库?建议会有帮助。感谢您为您的服务器使用证书。正确配置密钥库和信任库应该可以解决问题。@rockcode,如何配置密钥库和信任库?建议会有帮助。谢谢