6 Replies Latest reply on Aug 28, 2013 11:00 AM by Georgi Gyurchev

    Seam basic authentication causes problems

    Georgi Gyurchev Newbie

      Hello,

       

      We are in the process of migrating from seam 2.2 + jsf 1.2 + richfaces 3 to seam 2.3 + jsf 2.1 + richfaces 4.

      In components.xml, we have specified an authentication filter like this:

       

      <web:authentication-filter regex-url-pattern="/auth/.*|/run.*" auth-type="basic"/>
      

       

      So everything that is in /auth should require authentication. It works without any problems in seam 2.2 but in seam 2.3 an exception occurs:

       

      10:55:11,961 ERROR [stderr] (http--0.0.0.0-8080-1) javax.servlet.ServletException: java.lang.IllegalStateException: No active event context
      
      10:55:11,961 ERROR [stderr] (http--0.0.0.0-8080-1)     at org.jboss.seam.servlet.ContextualHttpServletRequest.run(ContextualHttpServletRequest.java:96)
      
      10:55:11,961 ERROR [stderr] (http--0.0.0.0-8080-1)     at org.jboss.seam.web.AuthenticationFilter.doFilter(AuthenticationFilter.java:117)
      
      10:55:11,961 ERROR [stderr] (http--0.0.0.0-8080-1)     at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
      
      10:55:11,961 ERROR [stderr] (http--0.0.0.0-8080-1)     at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
      
      10:55:11,962 ERROR [stderr] (http--0.0.0.0-8080-1)     at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
      
      10:55:11,962 ERROR [stderr] (http--0.0.0.0-8080-1)     at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
      
      10:55:11,962 ERROR [stderr] (http--0.0.0.0-8080-1)     at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
      
      10:55:11,962 ERROR [stderr] (http--0.0.0.0-8080-1)     at org.jboss.seam.web.HotDeployFilter.doFilter(HotDeployFilter.java:53)
      
      10:55:11,962 ERROR [stderr] (http--0.0.0.0-8080-1)     at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
      
      10:55:11,962 ERROR [stderr] (http--0.0.0.0-8080-1)     at org.jboss.seam.web.IdentityFilter.doFilter(IdentityFilter.java:40)
      
      10:55:11,962 ERROR [stderr] (http--0.0.0.0-8080-1)     at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
      
      10:55:11,962 ERROR [stderr] (http--0.0.0.0-8080-1)     at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:73)
      
      10:55:11,963 ERROR [stderr] (http--0.0.0.0-8080-1)     at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
      
      10:55:11,963 ERROR [stderr] (http--0.0.0.0-8080-1)     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280)
      
      10:55:11,963 ERROR [stderr] (http--0.0.0.0-8080-1)     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)
      
      10:55:11,963 ERROR [stderr] (http--0.0.0.0-8080-1)     at eu.cleversoft.infonds3.support.CharsetFilter.doFilter(CharsetFilter.java:32)
      
      10:55:11,963 ERROR [stderr] (http--0.0.0.0-8080-1)     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280)
      
      10:55:11,963 ERROR [stderr] (http--0.0.0.0-8080-1)     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)
      
      10:55:11,963 ERROR [stderr] (http--0.0.0.0-8080-1)     at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275)
      
      10:55:11,963 ERROR [stderr] (http--0.0.0.0-8080-1)     at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161)
      
      10:55:11,963 ERROR [stderr] (http--0.0.0.0-8080-1)     at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:139)
      
      10:55:11,964 ERROR [stderr] (http--0.0.0.0-8080-1)     at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:388)
      
      10:55:11,964 ERROR [stderr] (http--0.0.0.0-8080-1)     at org.jboss.as.web.NamingValve.invoke(NamingValve.java:57)
      
      10:55:11,964 ERROR [stderr] (http--0.0.0.0-8080-1)     at org.jboss.as.jpa.interceptor.WebNonTxEmCloserValve.invoke(WebNonTxEmCloserValve.java:49)
      
      10:55:11,964 ERROR [stderr] (http--0.0.0.0-8080-1)     at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:154)
      
      10:55:11,964 ERROR [stderr] (http--0.0.0.0-8080-1)     at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
      
      10:55:11,964 ERROR [stderr] (http--0.0.0.0-8080-1)     at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
      
      10:55:11,964 ERROR [stderr] (http--0.0.0.0-8080-1)     at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:362)
      
      10:55:11,964 ERROR [stderr] (http--0.0.0.0-8080-1)     at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877)
      
      10:55:11,964 ERROR [stderr] (http--0.0.0.0-8080-1)     at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:667)
      
      10:55:11,965 ERROR [stderr] (http--0.0.0.0-8080-1)     at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:952)
      
      10:55:11,965 ERROR [stderr] (http--0.0.0.0-8080-1)     at java.lang.Thread.run(Thread.java:662)
      
      10:55:11,965 ERROR [stderr] (http--0.0.0.0-8080-1) Caused by: java.lang.IllegalStateException: No active event context
      
      10:55:11,965 ERROR [stderr] (http--0.0.0.0-8080-1)     at org.jboss.seam.core.Manager.instance(Manager.java:368)
      
      10:55:11,965 ERROR [stderr] (http--0.0.0.0-8080-1)     at org.jboss.seam.servlet.ContextualHttpServletRequest.run(ContextualHttpServletRequest.java:73)
      
      10:55:11,965 ERROR [stderr] (http--0.0.0.0-8080-1)     ... 31 more
      

       

      The user doesn't really see anything but this causes us some other problems. The page where there is a link to the url containint "/auth/" can't process any more ajax requests.

      I've looked into the seam sources and there isn't any difference in the implementation of the basic authentication for seam 2.2 and seam 2.3

       

      Does anyone know what can be causing this or is having the same problem?