3 Replies Latest reply on Sep 28, 2007 4:48 PM by ana konst

    SeamFilter, NTLM  and

    ana konst Newbie

      Hi everyone,
      I am using ajax4jsf 1.1.1, seam 1.2.1 and jcifs1.2.17.jar with NtlmHttpFilter for single sign on capability.

      I was getting the famous "Stack must not be null" error :

      ERROR [ExceptionFilter] uncaught exception
      javax.servlet.ServletException: Stack must not be null
      at javax.faces.webapp.FacesServlet.service(FacesServlet.java:152)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter...........


      The error stopped showing when I removed SeamFilter and SeamRidirectFilter declarations from web.xml.

      Can anyone explain this weirdness?
      I don't truly understand how seam filters work, but I would expect them to exist in the seam application. Now my app has ajax filter, NtlmHttpFilter and seam exception filter. that is another thing, how come seam Exception filter does not cause a problem?

      Any ideas ?
      Thanks

        • 1. Re: SeamFilter, NTLM  and
          ana konst Newbie

          I forgot to add that the exception happens after session times out and after I reload the page.

          • 2. Re: SeamFilter, NTLM  and
            Pete Muir Master

            Post the whole exception, use [ code ] tags, post your web.xml :)

            • 3. Re: SeamFilter, NTLM  and
              ana konst Newbie

              web.xml:


              <?xml version="1.0" encoding="UTF-8"?>
              <web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee"
              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
              xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">

              <session-config>
              <session-timeout>10</session-timeout>
              </session-config>

              <!-- Ajax4jsf (must come first!) -->



              <display-name>Ajax4jsf Filter</display-name>
              <filter-name>ajax4jsf</filter-name>
              <filter-class>org.ajax4jsf.Filter</filter-class>


              <filter-mapping>
              <filter-name>ajax4jsf</filter-name>
              <url-pattern>*.seam</url-pattern>
              </filter-mapping>

              <context-param>
              <param-name>org.ajax4jsf.VIEW_HANDLERS</param-name>
              <param-value>
              org.jboss.seam.ui.facelet.SeamFaceletViewHandler
              </param-value>
              </context-param>

              <context-param>
              <param-name>org.ajax4jsf.SKIN</param-name>
              <param-value>blueSky</param-value>
              </context-param>


              <filter-mapping>
              <filter-name>ajax4jsf</filter-name>
              <servlet-name>Faces Servlet</servlet-name>
              REQUEST
              FORWARD
              INCLUDE
              </filter-mapping>

              <!-- Seam -->

              <listener-class>
              org.jboss.seam.servlet.SeamListener
              </listener-class>




              <filter-name>Seam Filter</filter-name>
              <filter-class>org.jboss.seam.web.SeamFilter</filter-class>


              <filter-mapping>
              <filter-name>Seam Filter</filter-name>
              <url-pattern>/*</url-pattern>
              </filter-mapping>


              <filter-name>Seam Redirect Filter</filter-name>
              <filter-class>org.jboss.seam.servlet.SeamRedirectFilter</filter-class>

              <filter-mapping>
              <filter-name>Seam Redirect Filter</filter-name>
              <url-pattern>*.seam</url-pattern>
              </filter-mapping>




              <filter-name>Seam Exception Filter</filter-name>
              <filter-class>
              org.jboss.seam.servlet.SeamExceptionFilter
              </filter-class>


              <filter-mapping>
              <filter-name>Seam Exception Filter</filter-name>
              <url-pattern>*.seam</url-pattern>
              </filter-mapping>

              <!-- JSF -->

              <context-param>
              <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
              <param-value>server</param-value>
              </context-param>
              <context-param>
              <param-name>facelets.BUFFER_SIZE</param-name>
              <param-value>500000</param-value>
              </context-param>
              <context-param>
              <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
              <param-value>.xhtml</param-value>
              </context-param>
              <context-param>
              <param-name>facelets.DEVELOPMENT</param-name>
              <param-value>true</param-value>
              </context-param>


              <servlet-name>Faces Servlet</servlet-name>
              <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
              <load-on-startup>1</load-on-startup>


              <!-- Faces Servlet Mapping -->
              <servlet-mapping>
              <servlet-name>Faces Servlet</servlet-name>
              <url-pattern>*.seam</url-pattern>
              </servlet-mapping>

              <!-- MyFaces -->

              <listener-class>
              org.apache.myfaces.webapp.StartupServletContextListener
              </listener-class>



              <!-- JCIFS -->






              <filter-name>NtlmHttpFilter</filter-name>
              <filter-class>jcifs.http.NtlmHttpFilter</filter-class>
              <init-param>
              <param-name>jcifs.netbios.wins</param-name>
              <param-value>10.62.200.11,10.64.200.11</param-value>
              </init-param>
              <init-param>
              <param-name>jcifs.smb.client.domain</param-name>
              <param-value>CORP</param-value>
              </init-param>
              <init-param>
              <param-name>jcifs.smb.client.username</param-name>
              <param-value>csan0stdtestuser</param-value>
              </init-param>
              <init-param>
              <param-name>jcifs.smb.client.password</param-name>
              <param-value>testtest</param-value>
              </init-param>
              <init-param>
              <param-name>jcifs.http.domainController</param-name>
              <param-value>10.47.8.9</param-value>
              </init-param>
              <init-param>
              <param-name>jcifs.encoding</param-name>
              <param-value>Cp1252</param-value>
              </init-param>
              <init-param>
              <param-name>jcifs.smb.client.soTimeout</param-name>
              <param-value>500</param-value>
              </init-param>








              <filter-mapping>
              <filter-name>NtlmHttpFilter</filter-name>
              <url-pattern>/*</url-pattern>
              </filter-mapping>

              <!--

              <listener-class>com.sun.faces.config.ConfigureListener</listener-class>

              -->

              </web-app>




              Exception:

              13:46:40,103 INFO [Lifecycle] starting up: org.jboss.seam.security.identity
              13:46:43,165 ERROR [ExceptionFilter] uncaught exception
              javax.servlet.ServletException: Stack must not be null
              at javax.faces.webapp.FacesServlet.service(FacesServlet.java:152)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
              at org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:293)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
              at jcifs.http.NtlmHttpFilter.doFilter(NtlmHttpFilter.java:118)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
              at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:57)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
              at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
              at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:63)
              at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
              at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
              at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:57)
              at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
              at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:79)
              at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
              at org.jboss.seam.web.SeamFilter.doFilter(SeamFilter.java:84)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
              at org.ajax4jsf.framework.ajax.xmlfilter.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:127)
              at org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:277)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
              at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
              at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
              at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
              at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
              at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
              at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
              at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
              at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
              at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
              at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
              at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
              at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
              at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
              at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
              at java.lang.Thread.run(Thread.java:595)
              13:46:43,165 ERROR [ExceptionFilter] exception root cause
              java.lang.IllegalArgumentException: Stack must not be null
              at org.jboss.seam.core.ConversationEntry.(ConversationEntry.java:40)
              at org.jboss.seam.core.ConversationEntries.createConversationEntry(ConversationEntries.java:50)
              at org.jboss.seam.core.Manager.createConversationEntry(Manager.java:685)
              at org.jboss.seam.core.Manager.beforeRedirect(Manager.java:834)
              at org.jboss.seam.core.Manager.beforeRedirect(Manager.java:852)
              at org.jboss.seam.core.Manager.appendConversationIdFromRedirectFilter(Manager.java:1104)
              at org.jboss.seam.web.RedirectFilter$1.sendRedirect(RedirectFilter.java:64)
              at org.apache.myfaces.context.servlet.ServletExternalContextImpl.redirect(ServletExternalContextImpl.java:490)
              at org.ajax4jsf.framework.ajax.AjaxViewHandler.restoreView(AjaxViewHandler.java:180)
              at org.jboss.seam.jsf.SeamViewHandler.restoreView(SeamViewHandler.java:64)
              at com.sun.facelets.FaceletViewHandler.restoreView(FaceletViewHandler.java:310)
              at org.ajax4jsf.framework.ViewHandlerWrapper.restoreView(ViewHandlerWrapper.java:116)
              at org.ajax4jsf.framework.ajax.AjaxViewHandler.restoreView(AjaxViewHandler.java:150)
              at org.apache.myfaces.lifecycle.LifecycleImpl.restoreView(LifecycleImpl.java:141)
              at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:66)
              at javax.faces.webapp.FacesServlet.service(FacesServlet.java:137)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
              at org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:293)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
              at jcifs.http.NtlmHttpFilter.doFilter(NtlmHttpFilter.java:118)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
              at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:57)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
              at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
              at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:63)
              at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
              at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
              at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:57)
              at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
              at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:79)
              at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
              at org.jboss.seam.web.SeamFilter.doFilter(SeamFilter.java:84)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
              at org.ajax4jsf.framework.ajax.xmlfilter.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:127)
              at org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:277)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
              at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
              at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
              at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
              at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
              at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
              at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
              at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
              at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
              at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
              at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
              at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
              at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
              at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
              at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
              at java.lang.Thread.run(Thread.java:595)