Skip to Main Content

Java Development Tools

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

ADF_FACES-60097 Error

kchemwenoMar 20 2020 — edited Mar 20 2020

I am jusing JDeveloper version 12.3.2.1

I keep getting  the following error which pops up on the second login attempt after first unsuccessful login.

ADF_FACES-60097:For more information,

please see the server's error log for an entry beginning with:

ADF_FACES-60096:Server Exception during PPR, #1

This occurs when I login using a wrong password once and attempt to login again. It occurs in the second login attempt.

What could be causing this error?

My code is as shown below;

    public String doLogin() {

        String loginUrl = "";

        usersViewImpl = new UsersViewImpl();

        votesViewImpl = new VotesViewImpl();

        FacesContext ctx = FacesContext.getCurrentInstance();

        _username = it1.getValue() != null ? it1.getValue().toString().trim() : "";

        _password = it2.getValue() != null ? it2.getValue().toString().trim() : "";

        votingCode = it3.getValue() != null ? it3.getValue().toString().trim() : "";

        try {

            utility = new Utility();

        if (_username == "" || _password == "" || votingCode =="") {

            showError("Invalid credentials", "A blank username or password or voting code was specified. \nEnter your username and password and try again", null);

            logger.info("Invalid credentials provided, one or more are blank");           

        } else {

            if(votingCode.equals(usersViewImpl.getMemberVotingCode(_username))){

                if(votesViewImpl.hasUserVoted(votingCode) && !utility.isVotingClosed()){

                 showError("Login Denied", "You have already voted. \nYou can only login again after voting is closed", null);

                 logger.info("User "+_username+ " attempted to gain access to system after voting. Access was denied");

             } else {

                    if(!utility.isVotingOpen()){

                        showError("Login Denied", "Voting time has not reached. Please login as from "+utility.getVotingOpeningTime() , null);

                        logger.info("User "+_username+ " attempted to gain access to system before voting time reaches. Access was denied");

                    }else{

            ExternalContext ectx = ctx.getExternalContext();

            HttpServletRequest request = (HttpServletRequest) ctx.getExternalContext().getRequest();

            //try {

            //Logout user if they are currently logged in

            if(request.getUserPrincipal() != null){

                request.logout(); // Servlet 3.0 logout

                HttpSession session = request.getSession(false);

                if (session != null) {

                    session.invalidate();

                }               

            }

                request.login(_username, _password); // Servlet 3.0 login

           // }               

           //Login.setUserId(usersViewImpl.getUserId(_username));

           //              setUserId(loginUsersViewImpl.getUserId(_username)); //THIS LINE TAKE A VEEEEEEEEEEEEEEEERRRRRRRRRRRRRRRRRRRRRYYYYYYYYYYYYYY LONG TIME TO EXECUTE

           //              LoginUsersViewImpl.setLoggedinUserId(userId);

           //userId = usersViewImpl.getUserId(_username);

           // System.out.println("UserId : " + userId);               

                //Keep voting code in session variable

                sessionScopeMapObject.put("VOTING_CODE", votingCode);

               

                //On successful login, update value of global userId

                loginUsersViewImpl = new LoginUsersViewImpl();

                //Get status of first password change

               /* passwordChanged = usersViewImpl.isUserPasswordChanged(_username);

                if(!passwordChanged){

                    logger.info("User "+_username+" redirected to change password page after successful login");

                    //Redirect to manadatory first time password change page

                    _username = null;

                    _password = null; 

                    loginUrl = ectx.getRequestContextPath() + "/adfAuthentication?success_url=/ekura/change_password";

                    redirect(loginUrl);

                }else{ */

                 logger.info("User "+_username+" redirected to voting page after successful login");

                _username = null;

                _password = null;                               

                 loginUrl = ectx.getRequestContextPath() + "/adfAuthentication?success_url=/ekura/vote";

                redirect(loginUrl);                                                                                                             

             //   }

             }

            }

            }else{

                showError("Login Error", "Login failed. Incorrect voting code, username or password specified.", null);  

                logger.info("User "+_username+" provided incorrect login credentials. Access was denied");

            }

            }

            } catch (ServletException fle) {

                //fle.printStackTrace();

                showError("ServletException", "Login failed. Please verify the username, password and voting code and try again.", null);

                 logger.severe("Servelet Exception thrown while user "+_username+" attempted to login");

          //  fle.printStackTrace();

           // }                

                 }catch(oracle.adf.controller.AdfcIllegalStateException adfcIllegalStateException){

                    System.err.println("ADFC-12000: State ID in request is invalid for the current session");

                    showError("AdfcIllegalStateException", "Login failed. Please verify the username, password and voting code and try again.", null);

                     }catch(oracle.adf.controller.ControllerException controllerException){

                    System.err.println("ADFC-12000: State ID in request is invalid for the current session");

                    showError("ControllerException", "Login failed. Please verify the username, password and voting code and try again.", null);

                     }catch(Exception exception){

                         System.err.println("Exception occurred while logging into the system");

                         showError("Exception", "Please try again shortly.", null);                        

                     }

        return null;

    }

Comments
Post Details
Added on Mar 20 2020
9 comments
340 views