2 Replies Latest reply on Feb 4, 2007 6:23 AM by Shane Bryzak

    Seam Security on Glassfish problem -

    ckfh Newbie

      I followed the documentation to try to build a login function use Seam Security in 1.1.5. I used the following steps:

      - add <security:identity authenticate-method="#{authenticator.authenticate}"/> to components.xml

      - create a login form like the one in the reference documentation

      - create an "Authenticator" class according to the reference doc

      However, when I deployed the app in Glassfish, fill in username and password, then click submit, I got the following exception in my server log:

      [#|2007-02-04T12:55:48.708+0800|SEVERE|sun-appserver9.1|javax.enterprise.system.container.web|_ThreadID=12;_ThreadName=httpSSLWorkerThread-8080-0;_RequestID=42a1ffe4-7572-4b54-b550-99cc35650a41;|StandardWrapperValve[Faces Servlet]: PWC1406: Servlet.service() for servlet Faces Servlet threw exception
      javax.el.PropertyNotFoundException: /login.xhtml @16,74 value="#{identity.username}": Target Unreachable, identifier 'identity' resolved to null
      at com.sun.facelets.el.TagValueExpression.getType(TagValueExpression.java:62)
      at com.sun.faces.renderkit.html_basic.HtmlBasicInputRenderer.getConvertedValue(HtmlBasicInputRenderer.java:81)

      Kindly advice

        • 1. Re: Seam Security on Glassfish problem -
          ckfh Newbie

          I just found that I need to add additional jar files and a rule file. So I added the jar files and an empty rule file. After that, I got the following exception instead:

          Caused by: java.lang.NullPointerException
          at org.jboss.seam.security.Identity.postAuthenticate(Identity.java:362)
          at org.jboss.seam.security.Identity.authenticate(Identity.java:196)
          at org.jboss.seam.security.Identity.authenticate(Identity.java:189)

          • 2. Re: Seam Security on Glassfish problem -
            Shane Bryzak Master

            You also need to configure your rule file in components.xml - it must have a component name of "securityRules":

             <drools:rule-base name="securityRules">