2 Replies Latest reply on May 27, 2009 12:59 AM by Bimal Thapa

    WebAuthentication class - IllegalStateException "request is

    Micah Cleveland Newbie

      I am attempting to use a programmatic security to login to a JBoss server.
      I'm trying to passing in login credentials through the request object from one JBOSS server to a LoginServlet on another JBOSS server. The login servlet is hit... it has valid login credentials... but I always get a IllegalStateException thrown back at me when trying to use the WebAuthentication class.

      If I use a login jsp sitting on the same server to try to login... everything works fine.

      Any ideas ?

      - Micah

        • 1. Re: WebAuthentication class - IllegalStateException
          Micah Cleveland Newbie

          The exception I am getting is as follows:


          java.lang.IllegalStateException: request is null
          at org.jboss.web.tomcat.security.login.WebAuthentication.login(WebAuthen
          tication.java:80)
          at LoginServlet.doPost(LoginServlet.java:46)
          at LoginServlet.doGet(LoginServlet.java:22)
          at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
          at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
          icationFilterChain.java:290)
          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
          ilterChain.java:206)
          at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDisp
          atcher.java:654)
          at org.apache.catalina.core.ApplicationDispatcher.processRequest(Applica
          tionDispatcher.java:445)
          at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationD
          ispatcher.java:379)
          at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDis
          patcher.java:292)
          at org.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.j
          ava:694)
          at org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.jav
          a:665)
          at org.apache.jsp.login_jsp._jspService(login_jsp.java:54)
          at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
          at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
          at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper
          .java:373)
          at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:3
          36)
          at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
          at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
          icationFilterChain.java:290)
          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
          ilterChain.java:206)
          at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDisp
          atcher.java:654)
          at org.apache.catalina.core.ApplicationDispatcher.processRequest(Applica
          tionDispatcher.java:445)
          at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationD
          ispatcher.java:379)
          at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDis
          patcher.java:292)
          at org.apache.catalina.authenticator.FormAuthenticator.forwardToLoginPag
          e(FormAuthenticator.java:315)
          at org.apache.catalina.authenticator.FormAuthenticator.authenticate(Form
          Authenticator.java:243)
          at org.apache.catalina.authenticator.AuthenticatorBase.invoke(Authentica
          torBase.java:490)
          at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValv
          e.java:84)
          at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
          ava:127)
          at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
          ava:102)
          at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedC
          onnectionValve.java:157)
          at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
          ve.java:109)
          at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.jav
          a:262)
          at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
          :844)
          at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.proce
          ss(Http11Protocol.java:583)
          at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:44
          6)
          at java.lang.Thread.run(Thread.java:619)
          11:14:01,250 ERROR [[jsp]] Servlet.service() for servlet jsp threw exception

          • 2. Re: WebAuthentication class - IllegalStateException
            Bimal Thapa Newbie

            Hello Clevelam,

            Did you get any solution on it.?

            I too am running with same problem...

            The error is because(possible reason) in Login.jsp, the form submission target is parent

            which is as shown here,

            
            <form method="POST" name="loginform" action="/portal/LoginServlet" id="loginForm" target="_parent"
             style="margin:0;padding:0">
            


            But not got the solution yet,
            If you got any solution then let me know.

            Regards
            Mabimal