Hi Pubudu, Please refer the code at [1]. Which is a authenticate client based on the authentication stub.
In your code please check for truststore path. Seems the path is wrong or the cert is changed. [1]. https://github.com/wso2/carbon-platform-integration-utils/blob/master/common-admin-clients/src/main/java/org/wso2/carbon/integration/common/admin/client/AuthenticatorClient.java Thank you, Dharshana. On Mon, Feb 16, 2015 at 5:21 PM, Chanuka Dissanayake <[email protected]> wrote: > Hi Pubudu, > > Did you follow this[1] answer, seems like same kind of scenario, > > [1] > http://stackoverflow.com/questions/6784463/error-trustanchors-parameter-must-be-non-empty > > > > On Mon, Feb 16, 2015 at 5:11 PM, Pubudu Dodangoda <[email protected]> > wrote: > >> I am trying to authenticate admin/admin user using >> the org.wso2.carbon.authenticator.stub.AuthenticationAdminStub >> >> >> I get the following exception >> "org.apache.axis2.AxisFault: Connection has been shutdown: >> javax.net.ssl.SSLException: java.lang.RuntimeException: Unexpected error: >> java.security.InvalidAlgorithmParameterException: the trustAnchors >> parameter must be non-empty" >> >> Following is a portion of the code, >> >> >> String trustStore = >> System.getProperty("user.dir") + File.separator + >> "src" + >> File.separator + "main" + File.separator + >> "resources" + >> File.separator + "wso2carbon.jks"; >> System.setProperty("javax.net.ssl.trustStore", >> trustStore); >> System.setProperty("javax.net.ssl.trustStorePassword", "wso2carbon"); >> serviceEndPoint = " >> https://localhost:9443/dashboardConfigs/"; >> AuthenticationAdminStub authStub = new >> AuthenticationAdminStub(serviceEndPoint); >> authStub._getServiceClient().getOptions().setManageSession(true); >> authenticate = authStub.login("admin", "admin","localhost"); >> >> >> Can someone propose a solution? >> Thanks >> -- >> Pubudu Dodangoda >> BSc Engineering(Hon's) Undergraduate >> Department of Computer Science Engineering >> University of Moratuwa >> 0716053681 / 0775192994 >> >> _______________________________________________ >> Dev mailing list >> [email protected] >> http://wso2.org/cgi-bin/mailman/listinfo/dev >> >> > > > -- > Chanuka Dissanayake > *Software Engineer | **WSO2 Inc.*; http://wso2.com > > Mobile: +94 71 33 63 596 > Email: [email protected] > > _______________________________________________ > Dev mailing list > [email protected] > http://wso2.org/cgi-bin/mailman/listinfo/dev > > -- Dharshana Warusavitharana Senior Software Engineer , Test Automation WSO2 Inc. http://wso2.com email : [email protected] <[email protected]> Tel : +94 11 214 5345 Fax :+94 11 2145300 cell : +94770342233 blog : http://dharshanaw.blogspot.com lean . enterprise . middleware
_______________________________________________ Dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/dev
