2 Replies Latest reply on Dec 27, 2006 7:53 PM by Jose Miguel Loor

    Seam and IceFaces problem

    Jose Miguel Loor Apprentice

      Hi:

      I am trying to work with seam and icefaces. I have the following:

      - jboss 4.0.5GA
      - seam 1.1.0
      - icefaces 1.5.1

      this is my web.xml file:

      <?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>3</session-timeout>
      </session-config>

      <context-param>
      <param-name>javax.faces.CONFIG_FILES</param-name>
      <param-value>/WEB-INF/navigation.xml</param-value>
      </context-param>


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



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


      <context-param>
      <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
      <param-value>client</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>

      <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>true</param-value>
      </context-param>


      <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>


      <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-name>Blocking Servlet</servlet-name>
      <servlet-class>com.icesoft.faces.webapp.xmlhttp.BlockingServlet</servlet-class>
      <load-on-startup>1</load-on-startup>


      <servlet-mapping>
      <servlet-name>Persistent Faces Servlet</servlet-name>
      <url-pattern>*.iface</url-pattern>
      </servlet-mapping>

      <servlet-mapping>
      <servlet-name>Persistent Faces Servlet</servlet-name>
      <url-pattern>/xmlhttp/*</url-pattern>
      </servlet-mapping>

      <servlet-mapping>
      <servlet-name>Blocking Servlet</servlet-name>
      <url-pattern>/block/*</url-pattern>
      </servlet-mapping>


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


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

      </web-app>

      this is my faces-config.xml file:

      <?xml version="1.0" encoding="UTF-8"?>
      <!DOCTYPE faces-config
      PUBLIC "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.0//EN"
      "http://java.sun.com/dtd/web-facesconfig_1_0.dtd">

      <faces-config>


      <locale-config>
      <default-locale>es</default-locale>
      <supported-locale>en</supported-locale>
      </locale-config>
      <view-handler>com.icesoft.faces.facelets.D2DFaceletViewHandler</view-handler>


      <!-- Select one of the standard transaction models for the Seam application -->


      <phase-listener>org.jboss.seam.jsf.SeamPhaseListener</phase-listener>


      </faces-config>

      As you see, everything is just as it is supossed to be, but when i try to run a xhtml page, i get this exception:

      17:45:50,770 ERROR [SeamExceptionFilter] uncaught exception handled by Seam
      javax.servlet.ServletException: Cannot remove ServletRequest Parameter
      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.jboss.seam.servlet.SeamExceptionFilter.doFilter(SeamExceptionFilter.java:46)
      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)
      17:45:50,771 ERROR [[Faces Servlet]] Servlet.service() for servlet Faces Servlet threw exception
      java.lang.UnsupportedOperationException: Cannot remove ServletRequest Parameter
      at org.apache.myfaces.context.servlet.RequestParameterMap.removeAttribute(RequestParameterMap.java:50)
      at org.apache.myfaces.context.servlet.AbstractAttributeMap.remove(AbstractAttributeMap.java:121)
      at com.icesoft.faces.application.D2DViewHandler.restoreView(D2DViewHandler.java:180)
      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.jboss.seam.servlet.SeamExceptionFilter.doFilter(SeamExceptionFilter.java:46)
      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)

        • 1. Re: Seam and IceFaces problem
          Tino Nitze Newbie

          Are you using the @RequestParam annotation? I have read about problems with that one...
          Did you replace the jsf-facelets.jar with icefaces-facelets.jar?

          • 2. Re: Seam and IceFaces problem
            Jose Miguel Loor Apprentice

            Hi:

            I used the embedded example from the Seam 1.0.1/examples and now, at least there are no exceptions thrown in the page

            But i am facing a new problem (i am really starting to dissapoint about this icefaces thing)

            I have this page:

            <!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
            <ui:composition xmlns="http://www.w3.org/1999/xhtml"
            xmlns:ui="http://java.sun.com/jsf/facelets"
            xmlns:h="http://java.sun.com/jsf/html"
            xmlns:f="http://java.sun.com/jsf/core"
            xmlns:s="http://jboss.com/products/seam/taglib"
            xmlns:ice="http://www.icesoft.com/icefaces/component"
            template="../template/global.xhtml">

            <ui:define name="content">
            <h:outputText value="#{messages['user.label.list']}" />
            <ice:dataTable value="#{userList}" var="user" width="100%">
            <h:column id="userIdColumn">
            <f:facet name="header">Id</f:facet>
            <ice:outputText value="#{user.userId}"/>
            </h:column>
            <h:column id="userNameColumn">
            <f:facet name="header">Name</f:facet>
            <ice:outputText value="#{user.userName}"/>
            </h:column>
            <h:column id="userRoleColumn">
            <f:facet name="header">Role</f:facet>
            <ice:outputText value="#{user.role.roleName}"/>
            </h:column>
            <h:column id="actionColumn">
            <f:facet name="header">Actions</f:facet>
            <s:link id="editSeamLink" value="#{messages['common.label.edit']}" action="#{securityManager.selectUser}"/>
            <s:link id="deleteSeamLink" value="#{messages['common.label.delete']}" action="#{securityManager.deleteUser}"/>
            </h:column>
            </ice:dataTable>
            </ui:define>
            </ui:composition>

            it is really a simple page right ??? I have tried the same page with the same components (the session beans and stuff) without icefaces and everything worked fine

            But with the ice:dataTable i get no values in the id, name and role columns once the page is loaded. If i click in the edit link, i get a bean in the edit page, but when i return to the list page, that loaded bean is present in the entire list

            The number of rows in the table is ok, but the data i all jammed.

            What can it be ???

            thanks