Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
[IDENTITY-4504] Needs to fix null pointer exception when access http GET in /authenticationendpoint/login.do Created: 12/Apr/16 Updated: 31/Aug/16 Resolved: 31/Aug/16 Status: Project: Component/s: Affects Version/s: Fix Version/s: Resolved WSO2 Identity Server authentication-framework 5.1.0-GA Type: Reporter: Resolution: Labels: Remaining Estimate: Time Spent: Original Estimate: Bug Dushani Samaraweera Fixed request Not Specified 5.2.0-GA Priority: Assignee: Votes: High Maduranga Siriwardena 0 Not Specified Not Specified Major Severity: Moderate Estimated Complexity: Test cases added: Yes Description Null pointer exception occurs when do a http GET to /authenticationendpoint/login.do. Exception : ERROR {org.apache.catalina.core.StandardWrapperValve} - Servlet.service() for servlet [Authentic [/authenticationendpoint] threw exception {org.apache.catalina.core.StandardWrapperValve} org.wso2.carbon.identity.application.authentication.endpoint.AuthenticationException: java at org.wso2.carbon.identity.application.authentication.endpoint.AuthenticationEndpoint.doG at javax.servlet.http.HttpServlet.service(HttpServlet.java:735) at javax.servlet.http.HttpServlet.service(HttpServlet.java:848) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:21 at org.wso2.carbon.identity.application.authentication.endpoint.filter.MaintenanceModeFilter. at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:21 at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99) at org.wso2.carbon.ui.valve.XSSValve.invoke(XSSValve.java:118) at org.wso2.carbon.ui.valve.CSRFValve.invoke(CSRFValve.java:72) at org.wso2.carbon.tomcat.ext.valves.CompositeValve.continueInvocation(CompositeValve.java at org.wso2.carbon.tomcat.ext.valves.CarbonTomcatValve$1.invoke(CarbonTomcatValve.java:47) at org.wso2.carbon.webapp.mgt.TenantLazyLoaderValve.invoke(TenantLazyLoaderValve.java:56) at org.wso2.carbon.tomcat.ext.valves.TomcatValveContainer.invokeValves(TomcatValveContaine at org.wso2.carbon.tomcat.ext.valves.CompositeValve.invoke(CompositeValve.java:141) at org.wso2.carbon.tomcat.ext.valves.CarbonStuckThreadDetectionValve.invoke(CarbonStuckThr at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:936) at org.wso2.carbon.tomcat.ext.valves.CarbonContextCreatorValve.invoke(CarbonContextCreator at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1 at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.j at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1653) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:745) Caused by: java.lang.NullPointerException Comments Comment by Pushpalanka Jayawardhana [ 13/Apr/16 ] Reducing the priority as this is not reproduced. Please add more details to reproduce it. Comment by Asela Pathberiya [ 18/Apr/16 ] Can you just try to do a HTTP GET to https://localhost:9443/authenticationendpoint/login.do and see whether there is null pointer is generated. if it is not, we can close the ticket. Comment by Philippe Griboval [ 25/Aug/16 ] Yes it is reproduceable with IS-5.1.0 The exact short stacktrace is : ID: [-1234] [] [2016-08-25 09:51:07,727] ERROR {org.apache.catalina.core.ApplicationDispatcher} - Servlet.service() for servlet jsp threw exception java.lang.NullPointerException at org.apache.jsp.login_jsp._jspService(login_jsp.java:148) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) at javax.servlet.http.HttpServlet.service(HttpServlet.java:727) It comes from login.jsp at line 58 idpAuthenticatorMapping is null because request.getAttribute(Constants.IDP_AUTHENTICATOR_MAP) is null... Just my 2 cents... Comment by Chintana Wilamuna [ 26/Aug/16 ] This is still an issue with 5.2.0 beta2. Can we do a simple null check and fix this for 5.2.0? Comment by Maduranga Siriwardena [ 31/Aug/16 ] Fixed with in 5.2.0 branch: https://github.com/wso2/carbon-identity-framework/pull/563 master branch: https://github.com/wso2/carbon-identity-framework/pull/564 Comment by Kasun Bandara [ 31/Aug/16 ] Fix committed with : 5.2 : https://github.com/wso2/carbon-identityframework/commit/d4852d124c70b330ed36bdaaa7334ff9dd14b25c master : https://github.com/wso2/carbon-identityframework/commit/2c45fb732afa352762ba91bd528fe9f645a5bbce Generated at Wed May 10 18:52:38 IST 2017 using JIRA 7.2.2#72004sha1:9d5132893cc8c728a3601a9034a1f8547ef5c7be.