Hi ,
I am getting the following authentication failure when running tests in BRS;
here i have used following method to authenticate my stub :
AuthenticateStub authenticateStub = new AuthenticateStub();
RuleServiceFileUploadAdminStub ruleServiceFileUploadAdminStub =
null;
try {
String ServiceURL = FrameworkSettings.SERVICE_URL +
"RuleServiceFileUploadAdmin";
System.out.println("ServiceURL = " + ServiceURL);
ruleServiceFileUploadAdminStub = new
RuleServiceFileUploadAdminStub(ServiceURL);
} catch (AxisFault axisFault) {
axisFault.printStackTrace(); //To change body of catch
statement use File | Settings | File Templates.
}
authenticateStub.authenticateAdminStub(ruleServiceFileUploadAdminStub,
sessionCookie);
FileDataSource fileDataSource = new
FileDataSource(greetingServiceAAR);
DataHandler dataHandler = new DataHandler(fileDataSource);
try {
ruleServiceFileUploadAdminStub.uploadService("GreetingService.aar",
dataHandler);
System.out.println("Successfully uploaded the greeting
service");
}
Any idea ?
[2011-03-18 16:29:57,704] INFO
{org.wso2.carbon.integration.core.AuthenticateStub} - AuthenticateStub :
Stub created with session null
[2011-03-18 16:29:58,212] ERROR
{org.wso2.carbon.server.admin.module.handler.AuthenticationHandler} -
java.lang.NullPointerException
at
org.wso2.carbon.core.services.authentication.AuthenticationAdmin.authenticateWithRememberMe(AuthenticationAdmin.java:215)
at
org.wso2.carbon.server.admin.module.handler.AuthenticationHandler.isAuthenticated(AuthenticationHandler.java:167)
at
org.wso2.carbon.server.admin.module.handler.AuthenticationHandler.authenticate(AuthenticationHandler.java:85)
at
org.wso2.carbon.server.admin.module.handler.AuthenticationHandler.invoke(AuthenticationHandler.java:64)
at org.apache.axis2.engine.Phase.invokeHandler(Phase.java:340)
at org.apache.axis2.engine.Phase.invoke(Phase.java:313)
at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:262)
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:168)
at
org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:172)
at org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:146)
at
org.wso2.carbon.core.transports.CarbonServlet.doPost(CarbonServlet.java:206)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:641)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at
org.eclipse.equinox.http.servlet.internal.ServletRegistration.handleRequest(ServletRegistration.java:90)
at
org.eclipse.equinox.http.servlet.internal.ProxyServlet.processAlias(ProxyServlet.java:111)
at
org.eclipse.equinox.http.servlet.internal.ProxyServlet.service(ProxyServlet.java:67)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at org.wso2.carbon.bridge.BridgeServlet.service(BridgeServlet.java:155)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:304)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:240)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:164)
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:498)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
at org.wso2.carbon.server.TomcatServer$1.invoke(TomcatServer.java:239)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:562)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:394)
at
org.apache.coyote.http11.Http11NioProcessor.process(Http11NioProcessor.java:391)
at
org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:357)
at
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1531)
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)
[2011-03-18 16:29:58,216] ERROR {org.apache.axis2.engine.AxisEngine} -
Authentication failure
org.apache.axis2.AxisFault: Authentication failure
at
org.wso2.carbon.server.admin.module.handler.AuthenticationHandler.authenticate(AuthenticationHandler.java:96)
at
org.wso2.carbon.server.admin.module.handler.AuthenticationHandler.invoke(AuthenticationHandler.java:64)
at org.apache.axis2.engine.Phase.invokeHandler(Phase.java:340)
at org.apache.axis2.engine.Phase.invoke(Phase.java:313)
at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:262)
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:168)
at
org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:172)
at org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:146)
at
org.wso2.carbon.core.transports.CarbonServlet.doPost(CarbonServlet.java:206)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:641)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at
org.eclipse.equinox.http.servlet.internal.ServletRegistration.handleRequest(ServletRegistration.java:90)
at
org.eclipse.equinox.http.servlet.internal.ProxyServlet.processAlias(ProxyServlet.java:111)
at
org.eclipse.equinox.http.servlet.internal.ProxyServlet.service(ProxyServlet.java:67)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at org.wso2.carbon.bridge.BridgeServlet.service(BridgeServlet.java:155)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:304)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:240)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:164)
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:498)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
at org.wso2.carbon.server.TomcatServer$1.invoke(TomcatServer.java:239)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:562)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:394)
at
org.apache.coyote.http11.Http11NioProcessor.process(Http11NioProcessor.java:391)
at
org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:357)
at
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1531)
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)
####Error in uploading greeting service aar
org.apache.axis2.AxisFault: Authentication failure
at
org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(Utils.java:531)
at
org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:375)
at
org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:421)
at
org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:229)
at org.apache.axis2.client.OperationClient.execute(OperationClient.java:165)
at
org.wso2.carbon.rule.service.ui.fileupload.RuleServiceFileUploadAdminStub.uploadService(RuleServiceFileUploadAdminStub.java:191)
at
org.wso2.carbon.greeting.test.GreetingServiceUploadTest.init(GreetingServiceUploadTest.java:72)
at
org.wso2.carbon.integration.core.TestTemplate.testTemplate(TestTemplate.java:24)
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:597)
at junit.framework.TestCase.runTest(TestCase.java:164)
at junit.framework.TestCase.runBare(TestCase.java:130)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:120)
at junit.framework.TestSuite.runTest(TestSuite.java:230)
at junit.framework.TestSuite.run(TestSuite.java:225)
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:597)
at
org.apache.maven.surefire.junit.JUnitTestSet.execute(JUnitTestSet.java:213)
at
org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:140)
at
org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:127)
at org.apache.maven.surefire.Surefire.run(Surefire.java:177)
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:597)
at
org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:345)
at
org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1009)
[2011-03-18 16:29:58,704] INFO
{org.wso2.carbon.core.services.util.CarbonAuthenticationUtil} - 'admin'
logged in at [2011-03-18 16:29:58,0703] from IP address 10.100.0.190
[2011-03-18 16:29:58,824] INFO
{org.wso2.carbon.integration.core.ServerLogin} - Successfully logged :
JSESSIONID=4ED5CEE43D77263BAB68F0B83329CA4A; Path=/; Secure=null;
HttpOnly=null
***********************sessionCookie =
JSESSIONID=4ED5CEE43D77263BAB68F0B83329CA4A; Path=/; Secure=null;
HttpOnly=null
[2011-03-18 16:29:58,831] INFO
{org.wso2.carbon.core.services.authentication.AuthenticationAdmin} -
'admin' logged out at [2011-03-18 16:29:58,0830]
[2011-03-18 16:29:58,977] INFO
{org.wso2.carbon.core.services.util.CarbonAuthenticationUtil} - 'admin'
logged in at [2011-03-18 16:29:58,0977] from IP address 10.100.0.190
[2011-03-18 16:29:58,985] INFO
{org.wso2.carbon.integration.core.ServerLogin} - Successfully logged :
JSESSIONID=1B8B51CF758A303652FDB576914D07E7; Path=/; Secure=null;
HttpOnly=null
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.83 sec
Results :
Tests in error:
testTemplate(org.wso2.carbon.greeting.test.GreetingServiceDeploymentTest)
Thank you very much
--
Best Regards,*
Shammi Jayasinghe*
Senior Software Engineer; WSO2, Inc.; http://wso2.com,
mobile: +94 71 4493085
_______________________________________________
Carbon-dev mailing list
[email protected]
http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev