Hi,

We are facing an issue with the Google SSL certificate (we think)
since 4/17/09 or so. We have been using the following code to get the
patient profile from Google for several months with no problems and
appreciate any feedback to what might be the problem:

public String getProfile() throws HealthSampleException {
                if (this.authSubToken == null) {
                        throw new HealthSampleException(
                                        "Need to supply a token before 
retrieving profile.");
                }

                GoogleService service = new GoogleService("weaver", 
"HealthSample");

                Query query = null;

                try
                {
                        service.setAuthSubToken(this.authSubToken, privateKey);

                        // query = new Query(new URL("https://
www.google.com/"+D1Constants.h9+"/feeds/profile/digest"));

                        query = new Query(new URL("https://
www.google.com/"+D1Constants.h9+"/feeds/profile/default"));

                        query.addCustomParameter(new CustomParameter("digest", 
"true"));

                        Feed result = service.query(query, Feed.class);
                        //there should be only one entry that contains
                        //the CCRg document for the profile.
                        for (Entry entry : result.getEntries())
                        {
                                return prettifyXmlBlob(entry.getXmlBlob());
                        }
                }
                catch (MalformedURLException e)
                {
                        e.printStackTrace();
                        throw new HealthSampleException("Bad profile URL!", e);
                }
                catch (Exception e)
                {
                        e.printStackTrace();
                        throw new HealthSampleException("Error retrieving 
profile",
e);  /// <<<<< Exception thrown here because of the one caught <<<<<<
                }

                // If we don't find any profile data, return nothing.
                // This probably means the sample app wasn't granted full 
access.
                return "";
        }

Here is the exception that we started getting since several days back,
please excuse it length:

<Apr 22, 2009 3:17:18 PM EDT> <Warning> <Security> <BEA-090477>
<Certificate chain received from www.google.com - 209.85.165.104 was
not trusted causing SSL handshake failure.>
javax.net.ssl.SSLKeyException: [Security:090477]Certificate chain
received from www.google.com - 209.85.165.104 was not trusted causing
SSL handshake failure.
        at com.certicom.tls.interfaceimpl.TLSConnectionImpl.fireException
(Unknown Source)
        at com.certicom.tls.interfaceimpl.TLSConnectionImpl.fireAlertSent
(Unknown Source)
        at com.certicom.tls.record.handshake.HandshakeHandler.fireAlert
(Unknown Source)
        at com.certicom.tls.record.handshake.HandshakeHandler.fireAlert
(Unknown Source)
        at
com.certicom.tls.record.handshake.ClientStateReceivedServerHello.handle
(Unknown Source)
        at
com.certicom.tls.record.handshake.HandshakeHandler.handleHandshakeMessage
(Unknown Source)
        at
com.certicom.tls.record.handshake.HandshakeHandler.handleHandshakeMessages
(Unknown Source)
        at com.certicom.tls.record.MessageInterpreter.interpretContent
(Unknown Source)
        at com.certicom.tls.record.MessageInterpreter.decryptMessage(Unknown
Source)
        at com.certicom.tls.record.ReadHandler.processRecord(Unknown Source)
        at com.certicom.tls.record.ReadHandler.readRecord(Unknown Source)
        at com.certicom.tls.record.ReadHandler.readUntilHandshakeComplete
(Unknown Source)
        at com.certicom.tls.interfaceimpl.TLSConnectionImpl.completeHandshake
(Unknown Source)
        at com.certicom.tls.record.WriteHandler.write(Unknown Source)
        at com.certicom.io.OutputSSLIOStreamWrapper.write(Unknown Source)
        at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:
65)
        at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:123)
        at java.io.FilterOutputStream.flush(FilterOutputStream.java:123)
        at weblogic.net.http.HttpURLConnection.writeRequests
(HttpURLConnection.java:150)
        at weblogic.net.http.HttpURLConnection.getInputStream
(HttpURLConnection.java:364)
        at weblogic.net.http.SOAPHttpsURLConnection.getInputStream
(SOAPHttpsURLConnection.java:37)
        at weblogic.net.http.HttpURLConnection.getResponseCode
(HttpURLConnection.java:955)
        at com.google.gdata.client.http.HttpGDataRequest.checkResponse
(Unknown Source)
        at com.google.gdata.client.http.HttpGDataRequest.execute(Unknown
Source)
        at com.google.gdata.client.http.GoogleGDataRequest.execute(Unknown
Source)
        at com.google.gdata.client.Service.getFeed(Unknown Source)
        at com.google.gdata.client.Service.getFeed(Unknown Source)
        at com.google.gdata.client.GoogleService.getFeed(Unknown Source)
        at com.google.gdata.client.Service.query(Unknown Source)
        at com.google.gdata.client.Service.query(Unknown Source)
        at d1.process.HealthSample.getProfile(HealthSample.java:168)
        at hlink.GoogleHandler.viewProfile(GoogleHandler.java:788)
        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.apache.beehive.netui.pageflow.FlowController.invokeActionMethod
(FlowController.java:879)
        at
org.apache.beehive.netui.pageflow.FlowController.getActionMethodForward
(FlowController.java:809)
        at org.apache.beehive.netui.pageflow.FlowController.internalExecute
(FlowController.java:478)
        at
org.apache.beehive.netui.pageflow.PageFlowController.internalExecute
(PageFlowController.java:306)
        at org.apache.beehive.netui.pageflow.FlowController.execute
(FlowController.java:336)
        at
org.apache.beehive.netui.pageflow.internal.FlowControllerAction.execute
(FlowControllerAction.java:52)
        at org.apache.struts.action.RequestProcessor.processActionPerform
(RequestProcessor.java:431)
        at org.apache.beehive.netui.pageflow.PageFlowRequestProcessor.access
$201(PageFlowRequestProcessor.java:97)
        at org.apache.beehive.netui.pageflow.PageFlowRequestProcessor
$ActionRunner.execute(PageFlowRequestProcessor.java:2044)
        at
org.apache.beehive.netui.pageflow.interceptor.action.internal.ActionInterceptors
$WrapActionInterceptorChain.continueChain(ActionInterceptors.java:64)
        at
org.apache.beehive.netui.pageflow.interceptor.action.ActionInterceptor.wrapAction
(ActionInterceptor.java:184)
        at
org.apache.beehive.netui.pageflow.interceptor.action.internal.ActionInterceptors
$WrapActionInterceptorChain.invoke(ActionInterceptors.java:50)
        at
org.apache.beehive.netui.pageflow.interceptor.action.internal.ActionInterceptors
$WrapActionInterceptorChain.continueChain(ActionInterceptors.java:58)
        at
org.apache.beehive.netui.pageflow.interceptor.action.internal.ActionInterceptors.wrapAction
(ActionInterceptors.java:87)
        at
org.apache.beehive.netui.pageflow.PageFlowRequestProcessor.processActionPerform
(PageFlowRequestProcessor.java:2116)
        at org.apache.struts.action.RequestProcessor.process
(RequestProcessor.java:236)
        at
org.apache.beehive.netui.pageflow.PageFlowRequestProcessor.processInternal
(PageFlowRequestProcessor.java:556)
        at org.apache.beehive.netui.pageflow.PageFlowRequestProcessor.process
(PageFlowRequestProcessor.java:853)
        at org.apache.beehive.netui.pageflow.AutoRegisterActionServlet.process
(AutoRegisterActionServlet.java:631)
        at org.apache.beehive.netui.pageflow.PageFlowActionServlet.process
(PageFlowActionServlet.java:158)
        at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:
432)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
        at weblogic.servlet.internal.StubSecurityHelper
$ServletServiceAction.run(StubSecurityHelper.java:226)
        at weblogic.servlet.internal.StubSecurityHelper.invokeServlet
(StubSecurityHelper.java:124)
        at weblogic.servlet.internal.ServletStubImpl.execute
(ServletStubImpl.java:283)
        at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
        at weblogic.servlet.internal.FilterChainImpl.doFilter
(FilterChainImpl.java:42)
        at com.bea.portal.tools.servlet.http.HttpContextFilter.doFilter
(HttpContextFilter.java:60)
        at weblogic.servlet.internal.FilterChainImpl.doFilter
(FilterChainImpl.java:42)
        at com.bea.p13n.servlets.PortalServletFilter.doFilter
(PortalServletFilter.java:336)
        at weblogic.servlet.internal.FilterChainImpl.doFilter
(FilterChainImpl.java:42)
        at com.bea.jsptools.servlet.PagedResultServiceFilter.doFilter
(PagedResultServiceFilter.java:82)
        at weblogic.servlet.internal.FilterChainImpl.doFilter
(FilterChainImpl.java:42)
        at weblogic.servlet.internal.WebAppServletContext
$ServletInvocationAction.run(WebAppServletContext.java:3393)
        at weblogic.security.acl.internal.AuthenticatedSubject.doAs
(AuthenticatedSubject.java:321)
        at weblogic.security.service.SecurityManager.runAs(Unknown Source)
        at weblogic.servlet.internal.WebAppServletContext.securedExecute
(WebAppServletContext.java:2140)
        at weblogic.servlet.internal.WebAppServletContext.execute
(WebAppServletContext.java:2046)
        at weblogic.servlet.internal.ServletRequestImpl.run
(ServletRequestImpl.java:1366)
        at weblogic.work.ExecuteThread.execute(ExecuteThread.java:200)
        at weblogic.work.ExecuteThread.run(ExecuteThread.java:172)
d1.process.HealthSampleException: Error retrieving profile
        at d1.process.HealthSample.getProfile(HealthSample.java:184)
        at hlink.GoogleHandler.viewProfile(GoogleHandler.java:788)
        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.apache.beehive.netui.pageflow.FlowController.invokeActionMethod
(FlowController.java:879)
        at
org.apache.beehive.netui.pageflow.FlowController.getActionMethodForward
(FlowController.java:809)
        at org.apache.beehive.netui.pageflow.FlowController.internalExecute
(FlowController.java:478)
        at
org.apache.beehive.netui.pageflow.PageFlowController.internalExecute
(PageFlowController.java:306)
        at org.apache.beehive.netui.pageflow.FlowController.execute
(FlowController.java:336)
        at
org.apache.beehive.netui.pageflow.internal.FlowControllerAction.execute
(FlowControllerAction.java:52)
        at org.apache.struts.action.RequestProcessor.processActionPerform
(RequestProcessor.java:431)
        at org.apache.beehive.netui.pageflow.PageFlowRequestProcessor.access
$201(PageFlowRequestProcessor.java:97)
        at org.apache.beehive.netui.pageflow.PageFlowRequestProcessor
$ActionRunner.execute(PageFlowRequestProcessor.java:2044)
        at
org.apache.beehive.netui.pageflow.interceptor.action.internal.ActionInterceptors
$WrapActionInterceptorChain.continueChain(ActionInterceptors.java:64)
        at
org.apache.beehive.netui.pageflow.interceptor.action.ActionInterceptor.wrapAction
(ActionInterceptor.java:184)
        at
org.apache.beehive.netui.pageflow.interceptor.action.internal.ActionInterceptors
$WrapActionInterceptorChain.invoke(ActionInterceptors.java:50)
        at
org.apache.beehive.netui.pageflow.interceptor.action.internal.ActionInterceptors
$WrapActionInterceptorChain.continueChain(ActionInterceptors.java:58)
        at
org.apache.beehive.netui.pageflow.interceptor.action.internal.ActionInterceptors.wrapAction
(ActionInterceptors.java:87)
        at
org.apache.beehive.netui.pageflow.PageFlowRequestProcessor.processActionPerform
(PageFlowRequestProcessor.java:2116)
        at org.apache.struts.action.RequestProcessor.process
(RequestProcessor.java:236)
        at
org.apache.beehive.netui.pageflow.PageFlowRequestProcessor.processInternal
(PageFlowRequestProcessor.java:556)
        at org.apache.beehive.netui.pageflow.PageFlowRequestProcessor.process
(PageFlowRequestProcessor.java:853)
        at org.apache.beehive.netui.pageflow.AutoRegisterActionServlet.process
(AutoRegisterActionServlet.java:631)
        at org.apache.beehive.netui.pageflow.PageFlowActionServlet.process
(PageFlowActionServlet.java:158)
        at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:
432)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
        at weblogic.servlet.internal.StubSecurityHelper
$ServletServiceAction.run(StubSecurityHelper.java:226)
        at weblogic.servlet.internal.StubSecurityHelper.invokeServlet
(StubSecurityHelper.java:124)
        at weblogic.servlet.internal.ServletStubImpl.execute
(ServletStubImpl.java:283)
        at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
        at weblogic.servlet.internal.FilterChainImpl.doFilter
(FilterChainImpl.java:42)
        at com.bea.portal.tools.servlet.http.HttpContextFilter.doFilter
(HttpContextFilter.java:60)
        at weblogic.servlet.internal.FilterChainImpl.doFilter
(FilterChainImpl.java:42)
        at com.bea.p13n.servlets.PortalServletFilter.doFilter
(PortalServletFilter.java:336)
        at weblogic.servlet.internal.FilterChainImpl.doFilter
(FilterChainImpl.java:42)
        at com.bea.jsptools.servlet.PagedResultServiceFilter.doFilter
(PagedResultServiceFilter.java:82)
        at weblogic.servlet.internal.FilterChainImpl.doFilter
(FilterChainImpl.java:42)
        at weblogic.servlet.internal.WebAppServletContext
$ServletInvocationAction.run(WebAppServletContext.java:3393)
        at weblogic.security.acl.internal.AuthenticatedSubject.doAs
(AuthenticatedSubject.java:321)
        at weblogic.security.service.SecurityManager.runAs(Unknown Source)
        at weblogic.servlet.internal.WebAppServletContext.securedExecute
(WebAppServletContext.java:2140)
        at weblogic.servlet.internal.WebAppServletContext.execute
(WebAppServletContext.java:2046)
        at weblogic.servlet.internal.ServletRequestImpl.run
(ServletRequestImpl.java:1366)
        at weblogic.work.ExecuteThread.execute(ExecuteThread.java:200)
        at weblogic.work.ExecuteThread.run(ExecuteThread.java:172)
Caused by: javax.net.ssl.SSLKeyException: [Security:090477]Certificate
chain received from www.google.com - 209.85.165.104 was not trusted
causing SSL handshake failure.
        at com.certicom.tls.interfaceimpl.TLSConnectionImpl.fireException
(Unknown Source)
        at com.certicom.tls.interfaceimpl.TLSConnectionImpl.fireAlertSent
(Unknown Source)
        at com.certicom.tls.record.handshake.HandshakeHandler.fireAlert
(Unknown Source)
        at com.certicom.tls.record.handshake.HandshakeHandler.fireAlert
(Unknown Source)
        at
com.certicom.tls.record.handshake.ClientStateReceivedServerHello.handle
(Unknown Source)
        at
com.certicom.tls.record.handshake.HandshakeHandler.handleHandshakeMessage
(Unknown Source)
        at
com.certicom.tls.record.handshake.HandshakeHandler.handleHandshakeMessages
(Unknown Source)
        at com.certicom.tls.record.MessageInterpreter.interpretContent
(Unknown Source)
        at com.certicom.tls.record.MessageInterpreter.decryptMessage(Unknown
Source)
        at com.certicom.tls.record.ReadHandler.processRecord(Unknown Source)
        at com.certicom.tls.record.ReadHandler.readRecord(Unknown Source)
        at com.certicom.tls.record.ReadHandler.readUntilHandshakeComplete
(Unknown Source)
        at com.certicom.tls.interfaceimpl.TLSConnectionImpl.completeHandshake
(Unknown Source)
        at com.certicom.tls.record.WriteHandler.write(Unknown Source)
        at com.certicom.io.OutputSSLIOStreamWrapper.write(Unknown Source)
        at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:
65)
        at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:123)
        at java.io.FilterOutputStream.flush(FilterOutputStream.java:123)
        at weblogic.net.http.HttpURLConnection.writeRequests
(HttpURLConnection.java:150)
        at weblogic.net.http.HttpURLConnection.getInputStream
(HttpURLConnection.java:364)
        at weblogic.net.http.SOAPHttpsURLConnection.getInputStream
(SOAPHttpsURLConnection.java:37)
        at weblogic.net.http.HttpURLConnection.getResponseCode
(HttpURLConnection.java:955)
        at com.google.gdata.client.http.HttpGDataRequest.checkResponse
(Unknown Source)
        at com.google.gdata.client.http.HttpGDataRequest.execute(Unknown
Source)
        at com.google.gdata.client.http.GoogleGDataRequest.execute(Unknown
Source)
        at com.google.gdata.client.Service.getFeed(Unknown Source)
        at com.google.gdata.client.Service.getFeed(Unknown Source)
        at com.google.gdata.client.GoogleService.getFeed(Unknown Source)
        at com.google.gdata.client.Service.query(Unknown Source)
        at com.google.gdata.client.Service.query(Unknown Source)
        at d1.process.HealthSample.getProfile(HealthSample.java:168)
        ... 47 more
Profile retrieval exception: Error retrieving profile
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Health Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/googlehealthdevelopers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to