Получение исключения нулевого указателя при входе в контейнер tomcat - PullRequest
0 голосов
/ 28 апреля 2020

Состояние: / SampleJava / значение кода: 20056 ******** - ***** - ***** - ****** 3762 отправка на запрос Войти 19-Apr-2020 15: 31: 24.405 SEVERE [http-nio-8080-exe c -25] org. apache .coyote.http11.Http11Processor.service Ошибка обработки запроса java .lang.NullPointerException в org. apache. catalina.connector.Request.login (Запрос. java: 2710) на com.charter.auth.valve.ABCAuthenticatorValve.processLoginRequest (ABCAuthenticatorValve. java: 270) на com.charter.auth.valve.ABCAuthenticatorValve.inke ( ABCAuthenticatorValve. java: 125) в орг. apache .catalina.authenticator.SingleSignOn.invoke (SingleSignOn. java: 240) в орг. apache .catalina.core.StandardEngineValve.invoke (StandardEngineValve. *: 87) в орг. apache .catalina.connector.CoyoteAdapter.service (CoyoteAdapter. java: 343) в орг. apache .coyote.http11.Http11Processor.service (Http11Processor. java: 408) в орг. apache .coyote.AbstractProcessorLight.process (AbstractProcessorLight. java: 66) в орг. apache .coyote.AbstractProtocol $ ConnectionHand ler.process (AbstractProtocol. java: 764) в орг. apache .tomcat.util. net .NioEndpoint $ SocketProcessor.doRun (NioEndpoint. java: 1388) в орг. apache .tomcat. util. net .SocketProcessorBase.run (SocketProcessorBase. java: 49) в java .util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor. java: 1149) в java .util.concurrent.ThutorP. Worker.run (ThreadPoolExecutor. java: 624) в орг. apache .tomcat.util.threads.TaskThread $ WrappingRunnable.run (TaskThread. java: 61) в java .lang.Thread.run ( Тема. java: 748)

private boolean processLoginRequest(HttpServletRequest request, HttpServletResponse response)
            throws ServletException, IOException {
        String state = request.getParameter("state");
        String code = request.getParameter("code");

        LOGGER.info("state value from request" + state);
        LOGGER.info("code value from request" + code);

        // Get the code
        if (code != null && !code.trim().isEmpty()) {
            // Perform a container login
            request.login(code, code); -- **Line Number  - 270**



            if (request.getUserPrincipal() != null) {
                // Redirect to originally-requested URL
                response.sendRedirect(state != null ? state : "/");
                return true;
            } else {
                LOGGER.severe("Unable to retrieve authenticate user");
            }
        }

        LOGGER.severe("Login Request Failed");
        LOGGER.log(Level.SEVERE, "State: {0}", state);
        LOGGER.log(Level.SEVERE, "Code: {0}", code);

        return false;
    }



// Request call (Request.login() method)

 @Override
    public void login(String username, String password)
    throws ServletException {
        if (getAuthType() != null || getRemoteUser() != null ||
                getUserPrincipal() != null) {
            throw new ServletException(
                    sm.getString("coyoteRequest.alreadyAuthenticated"));
        }

        getContext().getAuthenticator().login(username, password, this); -- Line number - 2710
    }

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...