通过https“无X509TrustManager实现可用”丢失与Web服务的连接

时间:2009-11-11 17:06:09

标签: java ssl

我有一个非常奇怪的Java和SSL证书问题。希望有人能提供帮助。

  • 网络正在3个相同服务器的群集中运行
  • 所有服务器都包含“Application A”,它是一个JSR-168 portlet。
  • “应用程序A”使用在
  • 上运行的Web服务
  • “应用程序B”也使用
  • 上的Web服务
  • 所有3台服务器都在密钥库中拥有来自webservices.domain.com的SSL证书。

当我启动服务器时。申请A& B在所有服务器上运行良好。过了一会儿(没有具体的时间)应用程序A坚持一台服务器,并不总是相同的服务器,并停止工作。

服务器#1 应用程序A失去与Web服务的连接,说“没有X509TrustManager实现可用”(请参阅​​下面的转储),但应用程序B与同一服务器通话仍在继续。

服务器#2 申请A& B工作得很好。

服务器#3 申请A& B工作得很好。

重新启动Server#1后,一切都恢复正常,直到应用程序A(或B)再次失去连接。

任何人都知道解决方案吗?

13.10.2009 17:21:45 org.apache.cxf.transport.https.SSLUtils getCiphersuites
INFO: The cipher suites have not been configured, falling back to cipher suite filters.
13.10.2009 17:21:45 org.apache.cxf.transport.https.SSLUtils getCiphersuites
INFO: The cipher suite filters have not been configured, falling back to default filters.
13.10.2009 17:21:45 org.apache.cxf.transport.https.SSLUtils getCiphersFromList
INFO: The cipher suites have been set to SSL_RSA_WITH_RC4_128_MD5, SSL_RSA_WITH_RC4_128_SHA, TLS_RSA_WITH_AES_128_CBC_SHA, TLS_DHE_RSA_WITH_AES_128_CBC_SHA, TLS_DHE_DSS_WITH_AES_128_CBC_SHA, SSL_RSA_WITH_3DES_EDE_CBC_SHA, SSL_DHE_RSA_WITH_3DES_EDE_CBC_SHA, SSL_DHE_DSS_WITH_3DES_EDE_CBC_SHA, SSL_RSA_WITH_DES_CBC_SHA, SSL_DHE_RSA_WITH_DES_CBC_SHA, SSL_DHE_DSS_WITH_DES_CBC_SHA, SSL_RSA_EXPORT_WITH_RC4_40_MD5, SSL_RSA_EXPORT_WITH_DES40_CBC_SHA, SSL_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA, SSL_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA, TLS_KRB5_WITH_RC4_128_SHA, TLS_KRB5_WITH_RC4_128_MD5, TLS_KRB5_WITH_3DES_EDE_CBC_SHA, TLS_KRB5_WITH_3DES_EDE_CBC_MD5, TLS_KRB5_WITH_DES_CBC_SHA, TLS_KRB5_WITH_DES_CBC_MD5, TLS_KRB5_EXPORT_WITH_RC4_40_SHA, TLS_KRB5_EXPORT_WITH_RC4_40_MD5, TLS_KRB5_EXPORT_WITH_DES_CBC_40_SHA, TLS_KRB5_EXPORT_WITH_DES_CBC_40_MD5.  
13.10.2009 17:21:46 org.apache.cxf.phase.PhaseInterceptorChain doIntercept
INFO: Interceptor has thrown exception, unwinding now
org.apache.cxf.interceptor.Fault: Could not send Message.
 at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:64)
 at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:220)
 at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:466)
 at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:299)
 at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:251)
 at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
 at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:124)
 at $Proxy406.getRobbaPlanFree(Unknown Source)
 at is.somestuff.companyx.ut.radgjafar.radgjafi.services.GSMRobbiServiceManager.getRobbaPlanFree(GSMRobbiServiceManager.java:153)
 at is.somestuff.companyx.ut.radgjafar.radgjafi.controller.radgjafiController.populatePreferences(radgjafiController.java:179)
 at is.somestuff.companyx.ut.radgjafar.radgjafi.controller.radgjafiController.view(radgjafiController.java:76)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:585)
 at org.springframework.web.bind.annotation.support.HandlerMethodInvoker.doInvokeMethod(HandlerMethodInvoker.java:421)
 at org.springframework.web.bind.annotation.support.HandlerMethodInvoker.invokeHandlerMethod(HandlerMethodInvoker.java:136)
 at org.springframework.web.portlet.mvc.annotation.AnnotationMethodHandlerAdapter.invokeHandlerMethod(AnnotationMethodHandlerAdapter.java:271)
 at org.springframework.web.portlet.mvc.annotation.AnnotationMethodHandlerAdapter.doHandle(AnnotationMethodHandlerAdapter.java:259)
 at org.springframework.web.portlet.mvc.annotation.AnnotationMethodHandlerAdapter.handleRender(AnnotationMethodHandlerAdapter.java:218)
 at org.springframework.web.portlet.DispatcherPortlet.doRenderService(DispatcherPortlet.java:811)
 at org.springframework.web.portlet.FrameworkPortlet.processRequest(FrameworkPortlet.java:483)
 at org.springframework.web.portlet.FrameworkPortlet.doDispatch(FrameworkPortlet.java:453)
 at javax.portlet.GenericPortlet.render(GenericPortlet.java:175)
 at org.exoplatform.services.portletcontainer.impl.aop.PortletMethodCommand.render(PortletMethodCommand.java:15)
 at org.exoplatform.services.portletcontainer.impl.aop.BaseCommandUnit.execute(BaseCommandUnit.java:24)
 at org.exoplatform.container.component.ExecutionContext.executeNextUnit(ExecutionContext.java:26)
 at org.exoplatform.services.portletcontainer.impl.aop.PortletContentCommand.render(PortletContentCommand.java:19)
 at org.exoplatform.services.portletcontainer.impl.aop.BaseCommandUnit.execute(BaseCommandUnit.java:24)
 at org.exoplatform.container.component.ExecutionContext.executeNextUnit(ExecutionContext.java:26)
 at org.exoplatform.services.portletcontainer.impl.aop.PortletCacheCommand.render(PortletCacheCommand.java:35)
 at org.exoplatform.services.portletcontainer.impl.aop.BaseCommandUnit.execute(BaseCommandUnit.java:24)
 at org.exoplatform.container.component.ExecutionContext.executeNextUnit(ExecutionContext.java:26)
 at org.exoplatform.services.portletcontainer.impl.aop.PortletSecurityCommand.render(PortletSecurityCommand.java:27)
 at org.exoplatform.services.portletcontainer.impl.aop.BaseCommandUnit.execute(BaseCommandUnit.java:24)
 at org.exoplatform.container.component.ExecutionContext.executeNextUnit(ExecutionContext.java:26)
 at org.exoplatform.services.portletcontainer.impl.aop.BaseCommandUnit.render(BaseCommandUnit.java:31)
 at org.exoplatform.services.portletcontainer.impl.aop.BaseCommandUnit.execute(BaseCommandUnit.java:24)
 at org.exoplatform.container.component.ExecutionContext.execute(ExecutionContext.java:20)
 at org.exoplatform.services.portletcontainer.impl.aop.PortletCommandChain.doRender(PortletCommandChain.java:29)
 at org.exoplatform.services.portletcontainer.impl.PortletApplicationHandler.process(PortletApplicationHandler.java:234)
 at org.exoplatform.services.portletcontainer.impl.servlet.ServletWrapper.service(ServletWrapper.java:91)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
 at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:679)
 at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:584)
 at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:497)
 at org.exoplatform.services.portletcontainer.impl.PortletContainerDispatcher.dispatch(PortletContainerDispatcher.java:390)
 at org.exoplatform.services.portletcontainer.impl.PortletContainerDispatcher.process(PortletContainerDispatcher.java:329)
 at org.exoplatform.services.portletcontainer.impl.PortletContainerDispatcher.render(PortletContainerDispatcher.java:276)
 at org.exoplatform.services.portletcontainer.impl.PortletContainerServiceImpl.render(PortletContainerServiceImpl.java:122)
 at vyre.publishing.portal.Portal.renderPortlet(Portal.java:413)
 at vyre.publishing.PortletInstance.render(PortletInstance.java:221)
 at org.apache.jsp.WEB_002dINF.generated_005ffiles.pub_005fmodule.page.page17138_jsp._jspService(page17138_jsp.java:300)
 at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
 at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:331)
 at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
 at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
 at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:679)
 at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:461)
 at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:399)
 at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
 at vyre.delivery.MainFilter.doFilter(MainFilter.java:338)
 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
 at vyre.content.search.permissions.ViewPermissionFilter.doFilter(ViewPermissionFilter.java:27)
 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
 at org.springframework.orm.hibernate.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:170)
 at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
 at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
 at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
 at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
 at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
 at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
 at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
 at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:200)
 at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:283)
 at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:773)
 at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:703)
 at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:895)
 at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
 at java.lang.Thread.run(Thread.java:595)
Caused by: javax.net.ssl.SSLHandshakeException: java.security.cert.CertificateException: No X509TrustManager implementation available
 at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Alerts.java:150)
 at com.sun.net.ssl.internal.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1476)
 at com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Handshaker.java:174)
 at com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Handshaker.java:168)
 at com.sun.net.ssl.internal.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:847)
 at com.sun.net.ssl.internal.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:106)
 at com.sun.net.ssl.internal.ssl.Handshaker.processLoop(Handshaker.java:495)
 at com.sun.net.ssl.internal.ssl.Handshaker.process_record(Handshaker.java:433)
 at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:815)
 at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1025)
 at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1038)
 at sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:402)
 at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:170)
 at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:836)
 at sun.net.www.protocol.https.HttpsURLConnectionImpl.getOutputStream(HttpsURLConnectionImpl.java:230)
 at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleHeadersTrustCaching(HTTPConduit.java:1836)
 at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.onFirstWrite(HTTPConduit.java:1794)
 at org.apache.cxf.io.AbstractWrappedOutputStream.write(AbstractWrappedOutputStream.java:42)
 at org.apache.cxf.io.AbstractThresholdOutputStream.write(AbstractThresholdOutputStream.java:69)
 at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1854)
 at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66)
 at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:595)
 at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
 ... 89 more
Caused by: java.security.cert.CertificateException: No X509TrustManager implementation available
 at com.sun.net.ssl.internal.ssl.JsseX509TrustManager.checkServerTrusted(SSLContextImpl.java:322)
 at com.sun.net.ssl.internal.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:840)
 ... 107 more
ERROR [TP-Processor15]: Got unknown error - is.somestuff.companyx.ut.radgjafar.radgjafi.controller.radgjafiController - 2009-10-13 17:21:46,355 
javax.xml.ws.soap.SOAPFaultException: Could not send Message.
 at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:145)
 at $Proxy406.getRobbaPlanFree(Unknown Source)
 at is.somestuff.companyx.ut.radgjafar.radgjafi.services.GSMRobbiServiceManager.getRobbaPlanFree(GSMRobbiServiceManager.java:153)
 at is.somestuff.companyx.ut.radgjafar.radgjafi.controller.radgjafiController.populatePreferences(radgjafiController.java:179)
 at is.somestuff.companyx.ut.radgjafar.radgjafi.controller.radgjafiController.view(radgjafiController.java:76)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:585)
 at org.springframework.web.bind.annotation.support.HandlerMethodInvoker.doInvokeMethod(HandlerMethodInvoker.java:421)
 at org.springframework.web.bind.annotation.support.HandlerMethodInvoker.invokeHandlerMethod(HandlerMethodInvoker.java:136)
 at org.springframework.web.portlet.mvc.annotation.AnnotationMethodHandlerAdapter.invokeHandlerMethod(AnnotationMethodHandlerAdapter.java:271)
 at org.springframework.web.portlet.mvc.annotation.AnnotationMethodHandlerAdapter.doHandle(AnnotationMethodHandlerAdapter.java:259)
 at org.springframework.web.portlet.mvc.annotation.AnnotationMethodHandlerAdapter.handleRender(AnnotationMethodHandlerAdapter.java:218)
 at org.springframework.web.portlet.DispatcherPortlet.doRenderService(DispatcherPortlet.java:811)
 at org.springframework.web.portlet.FrameworkPortlet.processRequest(FrameworkPortlet.java:483)
 at org.springframework.web.portlet.FrameworkPortlet.doDispatch(FrameworkPortlet.java:453)
 at javax.portlet.GenericPortlet.render(GenericPortlet.java:175)
 at org.exoplatform.services.portletcontainer.impl.aop.PortletMethodCommand.render(PortletMethodCommand.java:15)
 at org.exoplatform.services.portletcontainer.impl.aop.BaseCommandUnit.execute(BaseCommandUnit.java:24)
 at org.exoplatform.container.component.ExecutionContext.executeNextUnit(ExecutionContext.java:26)
 at org.exoplatform.services.portletcontainer.impl.aop.PortletContentCommand.render(PortletContentCommand.java:19)
 at org.exoplatform.services.portletcontainer.impl.aop.BaseCommandUnit.execute(BaseCommandUnit.java:24)
 at org.exoplatform.container.component.ExecutionContext.executeNextUnit(ExecutionContext.java:26)
 at org.exoplatform.services.portletcontainer.impl.aop.PortletCacheCommand.render(PortletCacheCommand.java:35)
 at org.exoplatform.services.portletcontainer.impl.aop.BaseCommandUnit.execute(BaseCommandUnit.java:24)
 at org.exoplatform.container.component.ExecutionContext.executeNextUnit(ExecutionContext.java:26)
 at org.exoplatform.services.portletcontainer.impl.aop.PortletSecurityCommand.render(PortletSecurityCommand.java:27)
 at org.exoplatform.services.portletcontainer.impl.aop.BaseCommandUnit.execute(BaseCommandUnit.java:24)
 at org.exoplatform.container.component.ExecutionContext.executeNextUnit(ExecutionContext.java:26)
 at org.exoplatform.services.portletcontainer.impl.aop.BaseCommandUnit.render(BaseCommandUnit.java:31)
 at org.exoplatform.services.portletcontainer.impl.aop.BaseCommandUnit.execute(BaseCommandUnit.java:24)
 at org.exoplatform.container.component.ExecutionContext.execute(ExecutionContext.java:20)
 at org.exoplatform.services.portletcontainer.impl.aop.PortletCommandChain.doRender(PortletCommandChain.java:29)
 at org.exoplatform.services.portletcontainer.impl.PortletApplicationHandler.process(PortletApplicationHandler.java:234)
 at org.exoplatform.services.portletcontainer.impl.servlet.ServletWrapper.service(ServletWrapper.java:91)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
 at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:679)
 at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:584)
 at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:497)
 at org.exoplatform.services.portletcontainer.impl.PortletContainerDispatcher.dispatch(PortletContainerDispatcher.java:390)
 at org.exoplatform.services.portletcontainer.impl.PortletContainerDispatcher.process(PortletContainerDispatcher.java:329)
 at org.exoplatform.services.portletcontainer.impl.PortletContainerDispatcher.render(PortletContainerDispatcher.java:276)
 at org.exoplatform.services.portletcontainer.impl.PortletContainerServiceImpl.render(PortletContainerServiceImpl.java:122)
 at vyre.publishing.portal.Portal.renderPortlet(Portal.java:413)
 at vyre.publishing.PortletInstance.render(PortletInstance.java:221)
 at org.apache.jsp.WEB_002dINF.generated_005ffiles.pub_005fmodule.page.page17138_jsp._jspService(page17138_jsp.java:300)
 at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
 at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:331)
 at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
 at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
 at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:679)
 at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:461)
 at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:399)
 at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
 at vyre.delivery.MainFilter.doFilter(MainFilter.java:338)
 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
 at vyre.content.search.permissions.ViewPermissionFilter.doFilter(ViewPermissionFilter.java:27)
 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
 at org.springframework.orm.hibernate.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:170)
 at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
 at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
 at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
 at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
 at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
 at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
 at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
 at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:200)
 at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:283)
 at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:773)
 at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:703)
 at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:895)
 at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
 at java.lang.Thread.run(Thread.java:595)
Caused by: org.apache.cxf.interceptor.Fault: Could not send Message.
 at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:64)
 at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:220)
 at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:466)
 at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:299)
 at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:251)
 at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
 at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:124)
 ... 83 more
Caused by: javax.net.ssl.SSLHandshakeException: java.security.cert.CertificateException: No X509TrustManager implementation available
 at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Alerts.java:150)
 at com.sun.net.ssl.internal.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1476)
 at com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Handshaker.java:174)
 at com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Handshaker.java:168)
 at com.sun.net.ssl.internal.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:847)
 at com.sun.net.ssl.internal.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:106)
 at com.sun.net.ssl.internal.ssl.Handshaker.processLoop(Handshaker.java:495)
 at com.sun.net.ssl.internal.ssl.Handshaker.process_record(Handshaker.java:433)
 at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:815)
 at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1025)
 at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1038)
 at sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:402)
 at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:170)
 at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:836)
 at sun.net.www.protocol.https.HttpsURLConnectionImpl.getOutputStream(HttpsURLConnectionImpl.java:230)
 at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleHeadersTrustCaching(HTTPConduit.java:1836)
 at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.onFirstWrite(HTTPConduit.java:1794)
 at org.apache.cxf.io.AbstractWrappedOutputStream.write(AbstractWrappedOutputStream.java:42)
 at org.apache.cxf.io.AbstractThresholdOutputStream.write(AbstractThresholdOutputStream.java:69)
 at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1854)
 at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66)
 at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:595)
 at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
 ... 89 more
Caused by: java.security.cert.CertificateException: No X509TrustManager implementation available
 at com.sun.net.ssl.internal.ssl.JsseX509TrustManager.checkServerTrusted(SSLContextImpl.java:322)
 at com.sun.net.ssl.internal.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:840)
 ... 107 more

3 个答案:

答案 0 :(得分:1)

嗯,您可以尝试(在您的初始化代码中的某处,在调用服务之前):

SSLContext context = SSLContext.getInstance("SSL");
context.init(null, new TrustManager[] {new EasyX509TrustManager(null)}, null);

您可以获取EasyX509TrustManager的代码here 或者您可以提供自己的实现。

答案 1 :(得分:1)

经过大量调试并尝试在网上提供的每个解决方案后,我们终于找到了根本原因。

我们为javax.net.ssl.trustStorePassword和javax.net.ssl.keyStorePassword属性设置了错误的密码。

设置正确的密码后,此异常将永远不会再出现:)。您只需添加System.getProperties()或System.getProperty(propertyName)语句即可验证现有设置。

答案 2 :(得分:-2)

  

失去与webservice的连接

S /松/输/克

  

说“没有X509TrustManager   实施可用“(见转储   以下)但是申请B,与之交谈   同一台服务器继续摇摆不定。

丢失的连接只是生活中的一个事实。可能App B在捕获和重试常规错误方面做得更好。

可能存在更深层次的问题,但修复A会很好,因此SSL握手失败不会导致整个服务崩溃。