javaeetutorial
  1. javaeetutorial
  2. JAVAEETUTORIAL-60

Can't log in to Administration Interface for Dukes Tutoring

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Works as designed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: examples
    • Labels:
      None
    • Environment:

      JDK 7 Update 3, NB 7.1.1 RC1, GF 3.1.2 b23, Win XP SP3

      Description

      Created multiple users in file realm, all in "admins" group. None can log in with Admin interface for Duke's Tutoring. Server log divulges the following clues after logging in as tutu, a member of the admins group:

      WARNING: JSF1090: Navigation case not resolved for component j_idt17.
      WARNING: Unable to find component with ID usernameInput in view.
      WARNING: Unable to find component with ID passwordInput in view.
      WARNING: WEB9102: Web Login Failed: com.sun.enterprise.security.auth.login.common.LoginException: Login failed: Security Exception
      WARNING: JSF1090: Navigation case not resolved for component j_idt17.

      The loginError.xhtml page is displayed, saying the following, including the unresolved tags:

      Invalid name or password.

      Please enter a user name or password that is authorized to access this application. For this application, this means a user that has been created in the <code>file</code> realm and has been assigned to the <em>group</em> of <code>admins</code>.

      A dump of the page source reveals this:

      <?xml version='1.0' encoding='UTF-8' ?>
      <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
      <html lang="en" xmlns="http://www.w3.org/1999/xhtml"><head>
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
      <title>Duke's Tutoring</title><link type="text/css" rel="stylesheet" href="/dukes-tutoring/javax.faces.resource/default.css.xhtml?ln=css" /><link type="text/css" rel="stylesheet" href="/dukes-tutoring/javax.faces.resource/cssLayout.css.xhtml?ln=css" /></head><body>
      <form id="j_idt7" name="j_idt7" method="post" action="/dukes-tutoring/loginError.xhtml" enctype="application/x-www-form-urlencoded">
      <input type="hidden" name="j_idt7" value="j_idt7" />
      <input type="hidden" name="javax.faces.ViewState" id="javax.faces.ViewState" value="-6107512106494868627:-8616247973545914725" autocomplete="off" />
      </form>

      <div id="top" class="top"><html xmlns="http://www.w3.org/1999/xhtml">

      <h1>Duke's Tutoring: Administration Panel</h1>

      </html>
      </div>
      <div>
      <div id="left"><html xmlns="http://www.w3.org/1999/xhtml">
      <form id="j_idt14" name="j_idt14" method="post" action="/dukes-tutoring/loginError.xhtml" enctype="application/x-www-form-urlencoded">
      <input type="hidden" name="j_idt14" value="j_idt14" />
      <a href="/dukes-tutoring/admin/index.xhtml">Administration main page</a>
      <br /><span>Create new student</span>
      <br /><a href="/dukes-tutoring/admin/student/activateStudent.xhtml">Activate student</a>

      <br /><input type="hidden" name="javax.faces.ViewState" id="javax.faces.ViewState" value="-6107512106494868627:-8616247973545914725" autocomplete="off" />
      </form>
      </html>
      </div>
      <div id="content" class="left_content">
      <p>Invalid name or password.</p>

      <p>Please enter a user name or password that is authorized to access this application. For this application, this means a user that has been created in the <code>file</code> realm and has been assigned to the <em>group</em> of <code>admins</code>.</p>

      <form id="j_idt25" name="j_idt25" method="post" action="/dukes-tutoring/loginError.xhtml" enctype="application/x-www-form-urlencoded">
      <input type="hidden" name="j_idt25" value="j_idt25" />

      <script type="text/javascript" src="/dukes-tutoring/javax.faces.resource/jsf.js.xhtml?ln=javax.faces"></script>
      <a href="#" onclick="mojarra.jsfcljs(document.getElementById('j_idt25'),

      {'j_idt25:j_idt26':'j_idt25:j_idt26'}

      ,'');return false">Login page</a><input type="hidden" name="javax.faces.ViewState" id="javax.faces.ViewState" value="-6107512106494868627:-8616247973545914725" autocomplete="off" />
      </form>
      </div>
      </div></body>

      </html>

        Activity

        Hide
        jendrock added a comment -

        By the way, we always get these warning messages with all of the JSF + HTML hybrid login forms:

        WARNING: Unable to find component with ID usernameInput in view.
        WARNING: Unable to find component with ID passwordInput in view.

        The ID may vary from form to form, but we always see the same warning.

        The warnings we were more concerned about were the other ones.

        Show
        jendrock added a comment - By the way, we always get these warning messages with all of the JSF + HTML hybrid login forms: WARNING: Unable to find component with ID usernameInput in view. WARNING: Unable to find component with ID passwordInput in view. The ID may vary from form to form, but we always see the same warning. The warnings we were more concerned about were the other ones.
        Hide
        Ian Evans added a comment -

        The current version of the app doesn't use file realm users, it uses a JDBC realm. The admin@example.com user is created in ConfigBean (password "javaee").

        Show
        Ian Evans added a comment - The current version of the app doesn't use file realm users, it uses a JDBC realm. The admin@example.com user is created in ConfigBean (password "javaee").

          People

          • Assignee:
            Ian Evans
            Reporter:
            jendrock
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: