11 Replies Latest reply on Oct 18, 2008 11:53 PM by Julien Kronegg

    Getting a Stateless component from a servlet does not work anymore under Seam 2.1.0.CR1

    Julien Kronegg Novice

      Hi guys,


      Under Seam 2.1.0 snapshot #306 (2008.09.12), I was accessing a Stateless Seam component from a servlet:


      ...
      import org.jboss.seam.Component;
      ...
      public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException{
           ContentLocal contentAction = (ContentLocal) Component.getInstance("contentAction");
                
           String result = contentAction.getResult(request.getParameter("id"));
           ...
      }
      



      ContentLocal is defined as such:


      @Local
      public interface ContentLocal {
           public String getResult(String id);
      }
      



      @Stateless
      @Name("contentAction")
      public class ContentAction implements ContentLocal {
           @Logger
           private Log log;
      
           @PersistenceContext
           EntityManager em;
           
           public String getResult(String id) {
                return em.find(MyObject.class, id).toString(); // null checks removed for simplicity; MyObject is a persistent object
           }
      }
      



      Under Seam 2.1.0.CR1 (migration done by copying jboss-seam*.jar to my project lib dir), the Component.getInstance(String) method call raises the following exception:


      java.lang.IllegalStateException: No active application scope
              at org.jboss.seam.core.Init.instance(Init.java:110)
              at org.jboss.seam.contexts.BusinessProcessContext.getTaskInstance(BusinessProcessContext.java:224)
              at org.jboss.seam.contexts.BusinessProcessContext.get(BusinessProcessContext.java:53)
              at org.jboss.seam.contexts.Contexts.lookupInStatefulContexts(Contexts.java:209)
              at org.jboss.seam.Component.getInstance(Component.java:1897)
              at org.jboss.seam.Component.getInstance(Component.java:1877)
              at org.jboss.seam.Component.getInstance(Component.java:1872)
              at my.package.MyServlet.doGet(MyServlet.java:xxx)
      



      Has some configuration or code style changed from #306 to CR1, or is there a bug in CR1?


      Thanks for your help.

        • 2. Re: Getting a Stateless component from a servlet does not work anymore under Seam 2.1.0.CR1
          Julien Kronegg Novice

          The only filter defined is the Seam Filter. But I have a servlet definition. There is a snippet of my web.xml:


          <filter>
            <filter-name>Seam Filter</filter-name>
            <filter-class>org.jboss.seam.servlet.SeamFilter</filter-class>
          </filter>
          <filter-mapping>
            <filter-name>Seam Filter</filter-name>
            <url-pattern>/*</url-pattern>
          </filter-mapping>
          ...
          <servlet>
            <servlet-name>Content Servlet</servlet-name>
            <servlet-class>my.package.MyServlet</servlet-class>
          </servlet>
          <servlet-mapping>
            <servlet-name>Content Servlet</servlet-name>
            <url-pattern>/content/*</url-pattern>
          </servlet-mapping>
          



          I'm accessing the content using a GET on


          http://localhost:8080/webAppName/content/getResult?id\=123



          • 3. Re: Getting a Stateless component from a servlet does not work anymore under Seam 2.1.0.CR1
            Pete Muir Master

            Try applying the ContextFilter to your servlet, or wrap your work in a ContextualHttpServletRequest

            • 4. Re: Getting a Stateless component from a servlet does not work anymore under Seam 2.1.0.CR1
              Julien Kronegg Novice

              I wrapped my work in a ContextualHttpServletRequest:


              public void doGet(HttpServletRequest request,HttpServletResponse response) throws ServletException, IOException{
                final HttpServletRequest frequest
                new ContextualHttpServletRequest(frequest) {
                  @Override
                  public void process() throws Exception {
                    ContentLocal contentAction = (ContentLocal) Component.getInstance("contentAction");
                    String result = contentAction.getResult(frequest.getParameter("id"));
                    ...
                  }
                }.run();
              }



              and got another exception (notice that application scope changed for event context) :


              java.lang.IllegalStateException: No active event context
                      at org.jboss.seam.core.Manager.instance(Manager.java:267)
                      at org.jboss.seam.servlet.ContextualHttpServletRequest.run(ContextualHttpServletRequest.java:55)
                      at org.jboss.seam.web.ContextFilter.doFilter(ContextFilter.java:37)
                      at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                      at org.jboss.seam.web.IdentityFilter.doFilter(IdentityFilter.java:38)
                      at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                      at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:73)
                      at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
                      at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                      at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
                      at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                      at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:150)
                      at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:267)
                      at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:379)
                      at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:506)
                      at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:56)
                      at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                      at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:58)
                      at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                      at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
                      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
                      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
                      at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
                      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
                      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
                      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
                      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
                      at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
                      at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
                      at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
                      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
                      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
                      at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
                      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
                      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)
                      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
                      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:580)
                      at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
                      at java.lang.Thread.run(Thread.java:595)



              From what I understand, Seam is not able to get the Context and/or Conversation when we use a simple servlet without ContextFilter (the ContextFilter will attach the current context to the servlet or the like). Is it correct?


              What has changed from snapshot #306 to CR1 so that my previous code does not work anymore (after all, there is only one month between the two version)?

              • 5. Re: Getting a Stateless component from a servlet does not work anymore under Seam 2.1.0.CR1
                Daniel Roth Apprentice

                Read this
                29.1.4.8. Context management for custom servlets


                Do you have the conversationId in the get request?

                • 6. Re: Getting a Stateless component from a servlet does not work anymore under Seam 2.1.0.CR1
                  Julien Kronegg Novice

                  My components.xml contains:


                  <core:manager concurrent-request-timeout="500" conversation-timeout="120000" conversation-id-parameter="cid"/>
                  ...
                  <web:context-filter url-pattern="/content/*"/>
                  




                  Thus, my conversation id is cid and I have a ContextFilter configured.


                  I modified the servlet code just display which conversation id is configured:


                  protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
                    System.out.println("ContentServlet.doGet(): starting... *************************************************** ");
                    System.out.println("guessed conversation id: cid="+request.getParameter("cid")+", conversationId="+request.getParameter("conversationId"));
                    try {
                      System.out.println("servlet received Manager conversation id parameter: "+Manager.instance().getConversationIdParameter()+"="+request.getParameter(Manager.instance().getConversationIdParameter()));
                    } catch (RuntimeException e) {
                      e.printStackTrace();
                    }
                    System.out.println("ContentServlet.doGet(): end. ********************************************************** ");
                  }//end doGet



                  By calling the servlet with (or without) the conversation id, I got:


                  Under Seam 2.1.0 #306:


                  15:08:48,421 DEBUG [ServletLifecycle] >>> Begin web request
                  15:08:48,421 DEBUG [Component] instantiating Seam component: org.jboss.seam.web.servletContexts
                  15:08:48,421 DEBUG [Component] instantiating Seam component: org.jboss.seam.core.events
                  15:08:48,421 DEBUG [Events] Processing event:org.jboss.seam.postSetVariable.org.jboss.seam.core.events
                  15:08:48,421 DEBUG [Component] initializing new instance of: org.jboss.seam.core.events
                  15:08:48,421 DEBUG [Component] done initializing: org.jboss.seam.core.events
                  15:08:48,421 DEBUG [Events] Processing event:org.jboss.seam.postCreate.org.jboss.seam.core.events
                  15:08:48,421 DEBUG [Events] Processing event:org.jboss.seam.preSetVariable.org.jboss.seam.web.servletContexts
                  15:08:48,421 DEBUG [Events] Processing event:org.jboss.seam.postSetVariable.org.jboss.seam.web.servletContexts
                  15:08:48,421 DEBUG [Component] initializing new instance of: org.jboss.seam.web.servletContexts
                  15:08:48,421 DEBUG [Component] done initializing: org.jboss.seam.web.servletContexts
                  15:08:48,421 DEBUG [Events] Processing event:org.jboss.seam.postCreate.org.jboss.seam.web.servletContexts
                  15:08:48,421 DEBUG [Component] instantiating Seam component: org.jboss.seam.core.conversationPropagation
                  15:08:48,421 DEBUG [Events] Processing event:org.jboss.seam.preSetVariable.org.jboss.seam.core.conversationPropagation
                  15:08:48,421 DEBUG [Events] Processing event:org.jboss.seam.postSetVariable.org.jboss.seam.core.conversationPropagation
                  15:08:48,421 DEBUG [Component] initializing new instance of: org.jboss.seam.core.conversationPropagation
                  15:08:48,421 DEBUG [Component] done initializing: org.jboss.seam.core.conversationPropagation
                  15:08:48,421 DEBUG [Events] Processing event:org.jboss.seam.postCreate.org.jboss.seam.core.conversationPropagation
                  15:08:48,421 DEBUG [ConversationPropagation] parameters={width=[Ljava.lang.String;@1e0626e, cid=[Ljava.lang.String;@5e50d4, id=[Ljava.lang.String;@cb577}
                  15:08:48,421 DEBUG [Component] instantiating Seam component: org.jboss.seam.core.manager
                  15:08:48,421 DEBUG [Events] Processing event:org.jboss.seam.preSetVariable.org.jboss.seam.core.manager
                  15:08:48,421 DEBUG [Events] Processing event:org.jboss.seam.postSetVariable.org.jboss.seam.core.manager
                  15:08:48,421 DEBUG [Component] initializing new instance of: org.jboss.seam.core.manager
                  15:08:48,421 DEBUG [Component] done initializing: org.jboss.seam.core.manager
                  15:08:48,421 DEBUG [Events] Processing event:org.jboss.seam.postCreate.org.jboss.seam.core.manager
                  15:08:48,421 DEBUG [ConversationPropagation] Manager.conversationIdParameter=cid
                  15:08:48,421 DEBUG [ConversationPropagation] after getConversationNameFromRequestParameters: conversationId=null
                  15:08:48,421 DEBUG [ConversationPropagation] after restoreNaturalConversationId: conversationId=null
                  15:08:48,421 DEBUG [ConversationPropagation] after restoreSyntheticConversationId: conversationId=2
                  15:08:48,421 DEBUG [ConversationPropagation] Found conversation id in request parameter: 2
                  15:08:48,421 DEBUG [ConversationPropagation] after restorePageContextConversationId: conversationId=2
                  15:08:48,421 DEBUG [ConversationPropagation] after getPropagationFromRequestParameter: conversationId=2
                  15:08:48,421 DEBUG [ConversationPropagation] after handlePropagationType: conversationId=2
                  15:08:48,421 DEBUG [Manager] Restoring conversation with id: 2
                  ...
                  15:08:48,578 DEBUG [Pages] reading pages.xml file: a.page.xml
                  15:08:48,578 INFO  [STDOUT] ContentServlet.doGet(): starting... ***************************************************
                  15:08:48,578 INFO  [STDOUT] guessed conversation id: cid=2, conversationId=null
                  15:08:48,578 INFO  [STDOUT] servlet received Manager conversation id parameter: cid=2
                  15:08:48,578 INFO  [STDOUT] ContentServlet.doGet(): end. **********************************************************



                  Under Seam 2.1.0 #330 (and also under 2.1.0.CR1):


                  14:59:23,796 DEBUG [ServletLifecycle] >>> Begin web request
                  14:59:23,796 DEBUG [Component] instantiating Seam component: org.jboss.seam.web.servletContexts
                  14:59:23,796 DEBUG [Component] instantiating Seam component: org.jboss.seam.core.events
                  14:59:23,796 DEBUG [Events] Processing event:org.jboss.seam.postSetVariable.org.jboss.seam.core.events
                  14:59:23,796 DEBUG [Component] initializing new instance of: org.jboss.seam.core.events
                  14:59:23,796 DEBUG [Component] done initializing: org.jboss.seam.core.events
                  14:59:23,796 DEBUG [Events] Processing event:org.jboss.seam.postCreate.org.jboss.seam.core.events
                  14:59:23,796 DEBUG [Events] Processing event:org.jboss.seam.preSetVariable.org.jboss.seam.web.servletContexts
                  14:59:23,796 DEBUG [Events] Processing event:org.jboss.seam.postSetVariable.org.jboss.seam.web.servletContexts
                  14:59:23,796 DEBUG [Component] initializing new instance of: org.jboss.seam.web.servletContexts
                  14:59:23,796 DEBUG [Component] done initializing: org.jboss.seam.web.servletContexts
                  14:59:23,796 DEBUG [Events] Processing event:org.jboss.seam.postCreate.org.jboss.seam.web.servletContexts
                  14:59:23,796 DEBUG [Component] instantiating Seam component: org.jboss.seam.core.conversationPropagation
                  14:59:23,796 DEBUG [Events] Processing event:org.jboss.seam.preSetVariable.org.jboss.seam.core.conversationPropagation
                  14:59:23,796 DEBUG [Events] Processing event:org.jboss.seam.postSetVariable.org.jboss.seam.core.conversationPropagation
                  14:59:23,796 DEBUG [Component] initializing new instance of: org.jboss.seam.core.conversationPropagation
                  14:59:23,796 DEBUG [Component] done initializing: org.jboss.seam.core.conversationPropagation
                  14:59:23,796 DEBUG [Events] Processing event:org.jboss.seam.postCreate.org.jboss.seam.core.conversationPropagation
                  14:59:23,796 DEBUG [ConversationPropagation] parameters={width=[Ljava.lang.String;@b790d8, cid=[Ljava.lang.String;@1867b3a, id=[Ljava.lang.String;@44ac1}
                  14:59:23,796 DEBUG [Component] instantiating Seam component: org.jboss.seam.core.manager
                  14:59:23,796 DEBUG [Events] Processing event:org.jboss.seam.preSetVariable.org.jboss.seam.core.manager
                  14:59:23,796 DEBUG [Events] Processing event:org.jboss.seam.postSetVariable.org.jboss.seam.core.manager
                  14:59:23,796 DEBUG [Component] initializing new instance of: org.jboss.seam.core.manager
                  14:59:23,796 DEBUG [Component] done initializing: org.jboss.seam.core.manager
                  14:59:23,796 DEBUG [Events] Processing event:org.jboss.seam.postCreate.org.jboss.seam.core.manager
                  14:59:23,796 DEBUG [ConversationPropagation] Manager.conversationIdParameter=cid
                  14:59:23,796 DEBUG [ConversationPropagation] after restoreNaturalConversationId: conversationId=null
                  14:59:23,796 DEBUG [ConversationPropagation] after restoreSyntheticConversationId: conversationId=4
                  14:59:23,796 DEBUG [ConversationPropagation] Found conversation id in request parameter: 4
                  14:59:23,796 DEBUG [ConversationPropagation] after restorePageContextConversationId: conversationId=4
                  14:59:23,796 DEBUG [ConversationPropagation] after getPropagationFromRequestParameter: conversationId=4
                  14:59:23,796 DEBUG [ConversationPropagation] after handlePropagationType: conversationId=4
                  14:59:23,796 DEBUG [Manager] Restoring conversation with id: 4
                  
                  14:59:23,796 DEBUG [ServletLifecycle] >>> Begin re-initialization
                  14:59:23,796 DEBUG [Initialization] Using Java hot deploy
                  14:59:23,812 DEBUG [DeploymentStrategy] Using default URLScanner
                  14:59:23,812 DEBUG [DeploymentStrategy] Adding org.jboss.seam.bpm.PageflowDeploymentHandler as a deployment handler
                  14:59:23,828 DEBUG [DeploymentStrategy] Using default URLScanner
                  ...
                  14:59:23,875 DEBUG [Component] instantiating Seam component: org.jboss.seam.core.events
                  14:59:23,875 DEBUG [Events] Processing event:org.jboss.seam.postSetVariable.org.jboss.seam.core.events
                  14:59:23,875 DEBUG [Component] initializing new instance of: org.jboss.seam.core.events
                  14:59:23,875 DEBUG [Component] done initializing: org.jboss.seam.core.events
                  14:59:23,875 DEBUG [Events] Processing event:org.jboss.seam.postCreate.org.jboss.seam.core.events
                  14:59:23,875 DEBUG [Events] Processing event:org.jboss.seam.preSetVariable.warRootDeploymentStrategy
                  14:59:23,875 DEBUG [Events] Processing event:org.jboss.seam.postSetVariable.warRootDeploymentStrategy
                  ...
                  14:59:23,937 DEBUG [Pages] reading pages.xml file: /a.page.xml
                  14:59:23,937 DEBUG [Events] Processing event:org.jboss.seam.preRemoveVariable.org.jboss.seam.exception.exceptions
                  14:59:23,937 DEBUG [Events] Processing event:org.jboss.seam.postRemoveVariable.org.jboss.seam.exception.exceptions
                  14:59:23,937 DEBUG [Events] Processing event:org.jboss.seam.postReInitialization
                  14:59:23,937 DEBUG [Events] Processing event:org.jboss.seam.preDestroyContext.CONVERSATION
                  14:59:23,937 DEBUG [Events] Processing event:org.jboss.seam.postDestroyContext.CONVERSATION
                  14:59:23,937 DEBUG [Events] Processing event:org.jboss.seam.preDestroyContext.EVENT
                  14:59:23,937 DEBUG [Contexts] destroying: org.jboss.seam.core.events
                  14:59:23,937 DEBUG [Events] Processing event:org.jboss.seam.preDestroy.org.jboss.seam.core.events
                  14:59:23,937 DEBUG [Contexts] destroying: warRootDeploymentStrategy
                  14:59:23,937 DEBUG [Events] Processing event:org.jboss.seam.postDestroyContext.EVENT
                  14:59:23,937 DEBUG [ServletLifecycle] <<< End re-initialization
                  
                  14:59:23,937 INFO  [STDOUT] ContentServlet.doGet(): starting... ***************************************************
                  14:59:23,937 INFO  [STDOUT] guessed conversation id: cid=4, conversationId=null
                  14:59:23,937 ERROR [STDERR] java.lang.IllegalStateException: No active event context
                  14:59:23,937 ERROR [STDERR]     at org.jboss.seam.core.Manager.instance(Manager.java:272)
                  14:59:23,937 ERROR [STDERR]     at com.becover.networking20.servlet.content.ContentServlet.doGet(ContentServlet.java:75)
                  14:59:23,937 ERROR [STDERR]     at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
                  14:59:23,937 ERROR [STDERR]     at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
                  14:59:23,937 ERROR [STDERR]     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
                  14:59:23,937 ERROR [STDERR]     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
                  14:59:23,937 ERROR [STDERR]     at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
                  14:59:23,937 ERROR [STDERR]     at org.jboss.seam.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:44)
                  14:59:23,937 ERROR [STDERR]     at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                  14:59:23,937 ERROR [STDERR]     at org.jboss.seam.web.ContextFilter$1.process(ContextFilter.java:42)
                  14:59:23,937 ERROR [STDERR]     at org.jboss.seam.servlet.ContextualHttpServletRequest.run(ContextualHttpServletRequest.java:53)
                  14:59:23,937 ERROR [STDERR]     at org.jboss.seam.web.ContextFilter.doFilter(ContextFilter.java:37)
                  14:59:23,937 ERROR [STDERR]     at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                  14:59:23,937 ERROR [STDERR]     at org.jboss.seam.web.IdentityFilter.doFilter(IdentityFilter.java:38)
                  14:59:23,937 ERROR [STDERR]     at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                  14:59:23,937 ERROR [STDERR]     at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:73)
                  14:59:23,937 ERROR [STDERR]     at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
                  14:59:23,937 ERROR [STDERR]     at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                  14:59:23,937 ERROR [STDERR]     at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
                  14:59:23,937 ERROR [STDERR]     at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                  14:59:23,937 ERROR [STDERR]     at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:150)
                  14:59:23,937 ERROR [STDERR]     at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:267)
                  14:59:23,937 ERROR [STDERR]     at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:379)
                  14:59:23,937 ERROR [STDERR]     at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:506)
                  14:59:23,937 ERROR [STDERR]     at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:56)
                  14:59:23,937 ERROR [STDERR]     at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                  14:59:23,937 ERROR [STDERR]     at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:58)
                  14:59:23,937 ERROR [STDERR]     at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                  14:59:23,937 ERROR [STDERR]     at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
                  14:59:23,937 ERROR [STDERR]     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
                  14:59:23,937 ERROR [STDERR]     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
                  14:59:23,937 ERROR [STDERR]     at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
                  14:59:23,937 ERROR [STDERR]     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
                  14:59:23,937 ERROR [STDERR]     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
                  14:59:23,937 ERROR [STDERR]     at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
                  14:59:23,937 ERROR [STDERR]     at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
                  14:59:23,937 ERROR [STDERR]     at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
                  14:59:23,937 ERROR [STDERR]     at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
                  14:59:23,937 ERROR [STDERR]     at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
                  14:59:23,937 ERROR [STDERR]     at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
                  14:59:23,937 ERROR [STDERR]     at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
                  14:59:23,937 ERROR [STDERR]     at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
                  14:59:23,937 ERROR [STDERR]     at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
                  14:59:23,937 ERROR [STDERR]     at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)
                  14:59:23,937 ERROR [STDERR]     at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
                  14:59:23,937 ERROR [STDERR]     at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:580)
                  14:59:23,937 ERROR [STDERR]     at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
                  14:59:23,937 ERROR [STDERR]     at java.lang.Thread.run(Thread.java:595)
                  14:59:23,937 INFO  [STDOUT] ContentServlet.doGet(): end. **********************************************************



                  These are the differences I can see in #330:



                  • Servlet re-initialisation

                  • destroying org.jboss.seam.core.events



                  What has change from #306 to CR1 or #330?

                  • 7. Re: Getting a Stateless component from a servlet does not work anymore under Seam 2.1.0.CR1
                    Sean Burns Newbie

                    Help,


                    I am getting this same issue, I just upgraded from 2.0.2.SP1 to 2.1.0.CR1,  (Everything is configured and working for servlets in 2.0.2).



                    Thanks,
                    Sean.

                    • 8. Re: Getting a Stateless component from a servlet does not work anymore under Seam 2.1.0.CR1
                      Sean Burns Newbie

                      Ok,looks like I am not the first, will give the latest trunk build a try.


                      My Link

                      • 11. Re: Getting a Stateless component from a servlet does not work anymore under Seam 2.1.0.CR1
                        Julien Kronegg Novice

                        The JBSEAM-3577 issue is corrected in nightly build.


                        By the way, you also will get the java.lang.IllegalStateException: No active event context exception if your servlet is context-filtered in components.xml AND you use the ContextualHttpServletRequest in that servlet.
                        Of course, you should not have this setup configured, but who knows...