we are experiencing following issue when make direct call via integration
base to github. when we use this with normal java client its worked fine.
but when taken in to integration framework gives following error. Pls advice
on this.
 
Note: we follow the same approach on other SSL backends and this is the
first time we experience this issue.
 
 
 
Source :
 
/**
     * Positive test case for getBlob method with mandatory parameters.
     *  
     */
    @Test(priority = 1, description = "github {getBlob} integration test
with mandatory parameters.")
    public void testGetBlobWithMandatoryParameters() throws IOException,
JSONException{
    
        esbRequestHeadersMap.put("Action", "urn:getBlob");
        apiRequestHeadersMap.put("Accept-Charset", "UTF-8");
        apiRequestHeadersMap.put("Content-Type",
"application/x-www-form-urlencoded");
        apiRequestHeadersMap.put("Authorization", "token
ed25f732c08905e6638ff0abd77f2ae6f4316701");
      
        RestResponse<JSONObject> esbRestResponse =
                sendJsonRestRequest(getProxyServiceURL("github"), "POST",
esbRequestHeadersMap, "esb_getBlob_mandatory.json");
        
        System.out.println("ESB Output :
"+esbRestResponse.getBody().toString());
       
        
        
        String apiEndPoint = connectorProperties.getProperty("githubApiUrl")
+ "/repos/" +
connectorProperties.getProperty("owner")+"/"+connectorProperties.getProperty("repo")+"/git/blobs/"+connectorProperties.getProperty("blobSHA");
        System.out.println("End Point URL : "+ apiEndPoint);
        RestResponse<JSONObject> apiRestResponse =
sendJsonRestRequest(apiEndPoint, "GET", apiRequestHeadersMap);
        System.out.println("API=="+apiRestResponse.getBody().toString());
         
        
       
    }
 
Integration Test Log: 
 
ESB Output :
{"content":"Q29udGVudCBvZiB0aGUgYmxvYg==\n","sha":"929246f65aab4d636cb229c790f966afc332c124","encoding":"base64","url":"https://api.github.com/repos/wso2connector/Test/git/blobs/929246f65aab4d636cb229c790f966afc332c124","size":19}
End Point URL :
https://api.github.com/repos/wso2connector/Test/git/blobs/929246f65aab4d636cb229c790f966afc332c124
[2014-05-16 12:07:42,725] ERROR
{org.wso2.carbon.automation.core.PlatformTestManager} -  On Test failure..
[2014-05-16 12:07:42,725] ERROR
{org.wso2.carbon.automation.core.PlatformTestManager} - 
javax.net.ssl.SSLHandshakeException:
sun.security.validator.ValidatorException: PKIX path building failed:
sun.security.provider.certpath.SunCertPathBuilderException: unable to find
valid certification path to requested target
[2014-05-16 12:07:42,725]  INFO
{org.wso2.carbon.automation.core.PlatformTestManager} -  --------------Tests
Failed
org.wso2.carbon.connector.integration.test.dropbox.DropboxConnectorIntegrationTest.testGetBlobWithMandatoryParameters--------
FAILED: testGetBlobWithMandatoryParameters
        github {getBlob} integration test with mandatory parameters.
javax.net.ssl.SSLHandshakeException:
sun.security.validator.ValidatorException: PKIX path building failed:
sun.security.provider.certpath.SunCertPathBuilderException: unable to find
valid certification path to requested target
                at sun.security.ssl.Alerts.getSSLException(Alerts.java:192)
                at
sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1902)
                at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:276)
                at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:270)
                at
sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1338)
                at
sun.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:154)
                at
sun.security.ssl.Handshaker.processLoop(Handshaker.java:868)
                at
sun.security.ssl.Handshaker.process_record(Handshaker.java:804)
                at
sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1032)
                at
sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1328)
                at
sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1355)
                at
sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1339)
                at
sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:515)
                at
sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:185)
                at
sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1299)
                at
java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:468)
                at
sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:338)
                at
org.wso2.connector.integration.test.base.ConnectorIntegrationTestBase.readResponse(ConnectorIntegrationTestBase.java:490)
                at
org.wso2.connector.integration.test.base.ConnectorIntegrationTestBase.sendJsonRestRequest(ConnectorIntegrationTestBase.java:277)
                at
org.wso2.connector.integration.test.base.ConnectorIntegrationTestBase.sendJsonRestRequest(ConnectorIntegrationTestBase.java:211)
                at
org.wso2.carbon.connector.integration.test.dropbox.DropboxConnectorIntegrationTest.testGetBlobWithMandatoryParameters(DropboxConnectorIntegrationTest.java:79)
                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
                at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
                at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                at java.lang.reflect.Method.invoke(Method.java:601)
                at
org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:80)
                at
org.testng.internal.Invoker.invokeMethod(Invoker.java:673)
                at
org.testng.internal.Invoker.invokeTestMethod(Invoker.java:842)
                at
org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1166)
                at
org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:125)
                at
org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:109)
                at org.testng.TestRunner.runWorkers(TestRunner.java:1178)
                at org.testng.TestRunner.privateRun(TestRunner.java:757)
                at org.testng.TestRunner.run(TestRunner.java:608)
                at org.testng.SuiteRunner.runTest(SuiteRunner.java:334)
                at
org.testng.SuiteRunner.runSequentially(SuiteRunner.java:329)
                at org.testng.SuiteRunner.privateRun(SuiteRunner.java:291)
                at org.testng.SuiteRunner.run(SuiteRunner.java:240)
                at
org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
                at
org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
                at org.testng.TestNG.runSuitesSequentially(TestNG.java:1158)
                at org.testng.TestNG.runSuitesLocally(TestNG.java:1083)
                at org.testng.TestNG.run(TestNG.java:999)
                at
org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:178)
                at
org.apache.maven.surefire.testng.TestNGXmlTestSuite.execute(TestNGXmlTestSuite.java:92)
                at
org.apache.maven.surefire.testng.TestNGProvider.invoke(TestNGProvider.java:96)
                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
                at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
                at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                at java.lang.reflect.Method.invoke(Method.java:601)
                at
org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189)
                at
org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165)
                at
org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85)
                at
org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:115)
                at
org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:75)
Caused by: sun.security.validator.ValidatorException: PKIX path building
failed: sun.security.provider.certpath.SunCertPathBuilderException: unable
to find valid certification path to requested target
                at
sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:385)
                at
sun.security.validator.PKIXValidator.engineValidate(PKIXValidator.java:292)
                at
sun.security.validator.Validator.validate(Validator.java:260)
                at
sun.security.ssl.X509TrustManagerImpl.validate(X509TrustManagerImpl.java:326)
                at
sun.security.ssl.X509TrustManagerImpl.checkTrusted(X509TrustManagerImpl.java:231)
                at
sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:126)
                at
sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1320)
                ... 50 more
Caused by: sun.security.provider.certpath.SunCertPathBuilderException:
unable to find valid certification path to requested target
                at
sun.security.provider.certpath.SunCertPathBuilder.engineBuild(SunCertPathBuilder.java:196)
                at
java.security.cert.CertPathBuilder.build(CertPathBuilder.java:268)
                at
sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:380)
                ... 56 more
 
 




--
View this message in context: 
http://wso2-oxygen-tank.10903.n7.nabble.com/SSL-error-in-direct-call-to-github-via-integration-framework-tp97007.html
Sent from the WSO2 Development mailing list archive at Nabble.com.
_______________________________________________
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to