1 Reply Latest reply on Mar 31, 2008 5:04 PM by jguglielmin

    Seam 2.0GA + ICEfaces

    chitcool.chitcool.gmail.com

      I am getting this exception after editing web.xml, component.xml and other xml for ICEfaces.



      Development Envir:
      Redhat studio cr1:
      JDK 5EE
      JBoss AS 4.2.2 Seam 2.0.1GA ICEfaces 1.7
      iceface-seam-gen





      x
      21:47:45,187 INFO  [Server] JBoss (MX MicroKernel) [4.2.0.GA_CP01 (build: SVNTag=JBPAPP_4_2_0_GA_CP01 date=200709131706)] Started in 38s:875ms
      21:47:55,078 INFO  [Contexts] starting up: org.jboss.seam.security.identity
      21:47:55,812 INFO  [RuleBase] parsing rules: /security.drl
      21:47:56,828 INFO  [Contexts] starting up: org.jboss.seam.web.session
      21:47:56,875 WARN  [SessionDispatcher] java.lang.ExceptionInInitializerError
      21:47:56,875 ERROR [ExceptionFilter] handling uncaught exception
      javax.servlet.ServletException: javax.servlet.ServletException: Session expired
              at com.icesoft.faces.webapp.http.servlet.MainServlet.service(MainServlet.java:101)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
              at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
              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.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:68)
              at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
              at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:85)
              at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
              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:44)
              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.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
              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:619)
      Caused by: javax.servlet.ServletException: Session expired
              at com.icesoft.faces.webapp.http.servlet.SessionDispatcher.service(SessionDispatcher.java:38)
              at com.icesoft.faces.webapp.http.servlet.PathDispatcher$Matcher.serviceOnMatch(PathDispatcher.java:52)
              at com.icesoft.faces.webapp.http.servlet.PathDispatcher.service(PathDispatcher.java:29)
              at com.icesoft.faces.webapp.http.servlet.MainServlet.service(MainServlet.java:97)
              ... 37 more
      
      And here is web.xml:
      <?xml version="1.0" ?>
      <web-app xmlns="http://java.sun.com/xml/ns/j2ee"
               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
               xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
               version="2.4">
      
        
          <!-- Seam (using Icefaces) generated project-->
          
          <!-- listeners required for this application
         <listener>
            <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
         </listener>
          
          
          
           --> 
         <listener>
            <listener-class>org.jboss.seam.servlet.SeamListener</listener-class>
         </listener>
          
      
         <listener>
            <listener-class>com.icesoft.faces.util.event.servlet.ContextEventRepeater</listener-class>
         </listener>
           
       <!-- filters -->
         <filter>
            <filter-name>Seam Exception Filter</filter-name>
            <filter-class>org.jboss.seam.servlet.SeamExceptionFilter</filter-class>
         </filter>
      
         <filter-mapping>
            <filter-name>Seam Exception Filter</filter-name>
            <url-pattern>/*</url-pattern>
         </filter-mapping>
      
          <filter>
              <filter-name>Seam Filter</filter-name>
              <filter-class>org.jboss.seam.web.SeamFilter</filter-class>
          </filter>
      
          <filter-mapping>
              <filter-name>Seam Filter</filter-name>
              <url-pattern>/*</url-pattern>
          </filter-mapping>
           
         
         <!-- Facelets development mode (disable in production) -->
         <context-param>
            <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
            <param-value>client</param-value>
         </context-param>
          
         <context-param>
            <param-name>facelets.DEVELOPMENT</param-name>
            <param-value>true</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>com.icesoft.faces.actionURLSuffix</param-name>
              <param-value>.seam</param-value>
          </context-param>
      
          <context-param>
              <param-name>com.icesoft.faces.synchronousUpdate</param-name>
              <param-value>false</param-value>
          </context-param>
      
          <context-param> 
              <param-name>com.icesoft.faces.doJSFStateManagement</param-name>
              <param-value>true</param-value>
          </context-param> 
      
          <context-param>
              <param-name>org.jboss.seam.core.init.debug</param-name>
              <param-value>true</param-value>
          </context-param>
      
          <context-param>
              <param-name>org.icesoft.examples.serverClock</param-name>
              <param-value>false</param-value>
          </context-param>
      
          <context-param>
              <param-name>com.icesoft.faces.standardRequestScope</param-name>
              <param-value>true</param-value>
          </context-param>
      
       <!-- servlets -->   
        <servlet>
            <servlet-name>Seam Resource Servlet</servlet-name>
            <servlet-class>org.jboss.seam.servlet.ResourceServlet</servlet-class>
        </servlet>
          
        <servlet>
              <servlet-name>Persistent Faces Servlet</servlet-name>
              <servlet-class>com.icesoft.faces.webapp.xmlhttp.PersistentFacesServlet</servlet-class>
              <load-on-startup> 1 </load-on-startup>
          </servlet>
          <servlet>
              <servlet-name>Blocking Servlet</servlet-name>
              <servlet-class>com.icesoft.faces.webapp.xmlhttp.BlockingServlet</servlet-class>
              <load-on-startup> 1 </load-on-startup>
          </servlet>  
          
      
      <!-- servlet mappings -->
         <servlet-mapping>
              <servlet-name>Persistent Faces Servlet</servlet-name>
              <url-pattern>*.seam</url-pattern>
           </servlet-mapping>
      
           <servlet-mapping>
              <servlet-name>Persistent Faces Servlet</servlet-name>
              <url-pattern>/xmlhttp/*</url-pattern>
          </servlet-mapping>
          
          <!-- Blocking Servlet Mapping -->
          <servlet-mapping>
              <servlet-name>Blocking Servlet</servlet-name>
              <url-pattern>/block/*</url-pattern>
          </servlet-mapping>
                   
          <servlet-mapping>
            <servlet-name>Seam Resource Servlet</servlet-name>
            <url-pattern>/seam/resource/*</url-pattern>
          </servlet-mapping>
       
         <security-constraint> 
             <display-name>Restrict raw XHTML Documents</display-name>
             <web-resource-collection>
                 <web-resource-name>XHTML</web-resource-name>
                 <url-pattern>*.xhtml</url-pattern>
             </web-resource-collection>
             <auth-constraint>
                 <role-name>NONE</role-name>
             </auth-constraint>
         </security-constraint>
         
      </web-app>
      
      component.xml
      <?xml version="1.0" encoding="UTF-8"?>
      <components xmlns="http://jboss.com/products/seam/components"
                  xmlns:core="http://jboss.com/products/seam/core"
                  xmlns:web="http://jboss.com/products/seam/web"
                  xmlns:persistence="http://jboss.com/products/seam/persistence"
                  xmlns:drools="http://jboss.com/products/seam/drools"
                  xmlns:bpm="http://jboss.com/products/seam/bpm"
                  xmlns:security="http://jboss.com/products/seam/security"
                  xmlns:mail="http://jboss.com/products/seam/mail"
                  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                  xsi:schemaLocation=
                      "http://jboss.com/products/seam/core http://jboss.com/products/seam/core-2.0.xsd 
                       http://jboss.com/products/seam/web http://jboss.com/products/seam/web-2.0.xsd
                       http://jboss.com/products/seam/persistence http://jboss.com/products/seam/persistence-2.0.xsd 
                       http://jboss.com/products/seam/drools http://jboss.com/products/seam/drools-2.0.xsd
                       http://jboss.com/products/seam/bpm http://jboss.com/products/seam/bpm-2.0.xsd
                       http://jboss.com/products/seam/security http://jboss.com/products/seam/security-2.0.xsd
                       http://jboss.com/products/seam/mail http://jboss.com/products/seam/mail-2.0.xsd
                       http://jboss.com/products/seam/components http://jboss.com/products/seam/components-2.0.xsd">
      
         <core:init debug="true" jndi-pattern="@jndiPattern@"/>
           
         <component scope="APPLICATION" auto-create="true" name="renderManager" class="com.icesoft.faces.async.render.RenderManager" />
         
         <core:manager concurrent-request-timeout="500" 
                       conversation-timeout="120000" 
                       conversation-id-parameter="cid"/>
          
         <persistence:managed-persistence-context name="entityManager"
                                           auto-create="true"
                            persistence-unit-jndi-name="java:/deciaEntityManagerFactory"/>
      
         
         <web:multipart-filter create-temp-files="true" max-request-size="10000000" url-pattern="*.seam"/>
         
         <drools:rule-base name="securityRules">
             <drools:rule-files>
                 <value>/security.drl</value>
             </drools:rule-files>
         </drools:rule-base>
      
         <security:identity authenticate-method="#{authenticator.authenticate}"
                                 security-rules="#{securityRules}"/>
         
         <event type="org.jboss.seam.notLoggedIn">
             <action execute="#{redirect.captureCurrentView}"/>
         </event>
         <event type="org.jboss.seam.postAuthenticate">
             <action execute="#{redirect.returnToCapturedView}"/>
         </event>
         
         <mail:mail-session host="localhost" port="2525" username="test" password="test" />
         <factory name="storagepath" scope="APPLICATION"
                   value="http://img.lovelyicon.com"/>
         <factory name="sitepath" scope="APPLICATION"
                   value="#{facesContext.externalContext.request.contextPath}"/>
      
              
         <!-- For use with jBPM pageflow or process management -->
         <!--  
         <bpm:jbpm>
            <bpm:process-definitions></bpm:process-definitions>
            <bpm:pageflow-definitions></bpm:pageflow-definitions>
         </bpm:jbpm>
         -->
            
      </components>
      
      here is pages.xml
      <?xml version="1.0" encoding="UTF-8"?>
      <pages xmlns="http://jboss.com/products/seam/pages"
             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
             xsi:schemaLocation="http://jboss.com/products/seam/pages http://jboss.com/products/seam/pages-2.0.xsd"
      
             no-conversation-view-id="/home.xhtml"
             login-view-id="/login.xhtml">
      
          <page view-id="*">
              <navigation>
                  <rule if-outcome="home">
                      <redirect view-id="/home.xhtml"/>
                  </rule>
              </navigation>
          </page>
          <page view-id="/sugguestionBox.xhtml" no-conversation-view-id="/home.xhtml">
              <action execute="#{namedbHome.init}"/>
              <begin-conversation join="true"/>
          </page>
          <page view-id="/sugguestionBoxtxt.xhtml" no-conversation-view-id="/home.xhtml">
              <action execute="#{namedbHome.init}"/>
              <begin-conversation join="true"/>
          </page>
          
          <page view-id="/register.xhtml" no-conversation-view-id="/home.xhtml">
              <begin-conversation join="true"/>
              <navigation>
                  <rule if="#{identity.loggedIn}">
                      <redirect view-id="/home.xhtml" />
                  </rule>
                  <rule if-outcome="persisted">
                      <end-conversation before-redirect="true"/>
                      <redirect view-id="/login.xhtml">
                              <message>Account Created. Confirmation Sent</message>
                      </redirect>
                  </rule>
                  
              </navigation>
          </page>
      
          <page view-id="/confirmRegistration.xhtml" action="#{authenticator.activate}">
              <param name="activationCode" value="#{authenticator.activationCode}"/>
              <navigation>
                  <rule if-outcome="activated">
                      <redirect view-id="/login.xhtml">
                              <message>Account Activated. PleaseLogin</message>
                      </redirect>
                  </rule>
                  <rule if-outcome="notFound">
                      <redirect view-id="/register.xhtml">
                              <message>Invalid activation code. Please re-register. </message>
                      </redirect>
                  </rule>
              </navigation>
          </page>
          <page view-id="/user/*" login-required="true" />
              
          <exception class="org.jboss.seam.framework.EntityNotFoundException">
              <redirect view-id="/error.xhtml">
                  <message>Not found</message>
              </redirect>
          </exception>
          
          <exception class="javax.persistence.EntityNotFoundException">
              <redirect view-id="/error.xhtml">
                  <message>Not found</message>
              </redirect>
          </exception>
          
          <exception class="javax.persistence.OptimisticLockException">
              <end-conversation/>
              <redirect view-id="/error.xhtml">
                  <message>Another user changed the same data, please try again</message>
              </redirect>
          </exception>
          
          <exception class="org.jboss.seam.security.AuthorizationException">
              <redirect view-id="/error.xhtml">
                  <message>You don't have permission to do this</message>
              </redirect>
          </exception>
          
          <exception class="org.jboss.seam.security.NotLoggedInException">
              <redirect view-id="/login.xhtml">
                  <message>Please log in first</message>
              </redirect>
          </exception>
          
          <exception class="javax.faces.application.ViewExpiredException">
              <redirect view-id="/error.xhtml">
                  <message>Your session has timed out, please try again</message>
              </redirect>
          </exception>
           
          <exception>
              <redirect view-id="/error.xhtml">
                  <message>Unexpected error, please try again</message>
              </redirect>
          </exception>
          
      </pages>
      
      and ejb-jar.xml
      <?xml version="1.0" encoding="UTF-8"?>
      <ejb-jar 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/ejb-jar_3_0.xsd"
               version="3.0">
               
         <interceptors>
            <interceptor>
               <interceptor-class>org.jboss.seam.ejb.SeamInterceptor</interceptor-class>
            </interceptor>
         </interceptors>
         
         <assembly-descriptor>
            <interceptor-binding>
               <ejb-name>*</ejb-name>
               <interceptor-class>org.jboss.seam.ejb.SeamInterceptor</interceptor-class>
            </interceptor-binding>
         </assembly-descriptor>
         
      </ejb-jar>
      
      application.xml
      <?xml version="1.0" encoding="UTF-8"?>
      <application 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/application_5.xsd"
                   version="5">
          
         <display-name>LovelyIcon</display-name>
         
         <module>
            <web>
               <web-uri>decia.war</web-uri>
               <context-root>/decia</context-root>
            </web>
         </module>
         
         <module>
            <ejb>decia-ejb.jar</ejb>
         </module>
         
         <!-- Seam and EL -->
         <module>
             <java>jboss-seam.jar</java>
         </module>   
         <module>
                 <java>jboss-el.jar</java>
         </module>   
      
         <!-- jBPM -->
         <module>
            <java>jbpm-jpdl.jar</java>
         </module>
      
         <!-- Drools and dependencies -->
         <module>
            <java>drools-core.jar</java>
         </module>
         <module>
            <java>drools-compiler.jar</java>
         </module>
         <module>
            <java>antlr-runtime.jar</java>
         </module>
         <module>
            <java>mvel14.jar</java>
         </module>
          <module>
              <java>icefaces.jar</java>
          </module>
              <module>
              <java>icefaces-comps.jar</java>
          </module>
          <module>
              <java>icefaces-facelets.jar</java>
          </module>
          <module>
              <java>commons-fileupload.jar</java>
          </module>
              <module>
              <java>backport-util-concurrent.jar</java>
          </module>
          <module>
                      <java>commons-digester.jar</java>
          </module>
         
          
          
      </application>
      


        • 1. Re: Seam 2.0GA + ICEfaces
          jguglielmin

          It looks like you are using old (Seam 1.2.1.GA with myfaces jsf 1.1 implementation) configuration files for your Seam 2.0 and jsf 1.2 implementation.  You should probably re-run seam-gen from Seam2.0.x distribution using ICEfaces as an option or look at the seam-icefaces example for proper configuration files.


          Also, with the newer AS (jee5) you don't need to explicitly list the listener for the jsf-1.2 implementation.  Jsf1.2 implementation is recommended, yet I see you are registering the listener for myfaces??