4 Replies Latest reply on Feb 11, 2008 6:14 PM by Pete Muir

    URGENT: question on seam filter in web.xml

    tina tina Newbie

      Dear Seam Experts,

      I am having a headache here. In my project, I use both seam (itext, pdf) and faces. They work fine seperatedly. But the seam filter gives me error like (see end). I believe the seam filter confused the faces servlet.

      Please help and I will wait on line.

      Thanks,

      Tina

      The web.xml is like below:
      <?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">

      <welcome-file-list>
      <welcome-file>index.jsp</welcome-file>
      </welcome-file-list>

      <display-name>osm</display-name>

      <context-param>
      <param-name>org.richfaces.SKIN</param-name>
      <param-value>emeraldTown</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.REFRESH_PERIOD</param-name>
      <param-value>2</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.STATE_SAVING_METHOD</param-name>
      <param-value>server</param-value>
      </context-param>
      <context-param>
      <param-name>com.sun.faces.validateXml</param-name>
      <param-value>true</param-value>
      </context-param>
      <context-param>
      <param-name>com.sun.faces.verifyObjects</param-name>
      <param-value>true</param-value>
      </context-param>

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

      <context-param>
      <param-name>org.ajax4jsf.VIEW_HANDLERS</param-name>
      <param-value>com.sun.facelets.FaceletViewHandler</param-value>
      </context-param>
      <context-param>
      <param-name>org.ajax4jsf.COMPRESS_SCRIPT</param-name>
      <param-value>false</param-value>
      </context-param>
      <context-param>
      <param-name>org.ajax4jsf.xmlparser.ORDER</param-name>
      <param-value>NEKO</param-value>
      </context-param>

      <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>
      <servlet-name>Faces Servlet</servlet-name>
      FORWARD
      REQUEST
      INCLUDE
      ERROR
      </filter-mapping>


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



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


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


      <servlet-name>Seam Resource Servlet</servlet-name>
      <servlet-class>org.jboss.seam.servlet.SeamResourceServlet</servlet-class>


      <servlet-mapping>
      <servlet-name>Seam Resource Servlet</servlet-name>
      <url-pattern>/seam/resource/*</url-pattern>
      </servlet-mapping>


      <servlet-name>Document Store Servlet</servlet-name>
      <servlet-class>org.jboss.seam.pdf.DocumentStoreServlet</servlet-class>


      <servlet-mapping>
      <servlet-name>Document Store Servlet</servlet-name>
      <url-pattern>*.seam</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>*.faces</url-pattern>
      </servlet-mapping>
      <resource-ref>
      Datasource Reference
      <res-ref-name>jdbc/stdb</res-ref-name>
      <res-type>javax.sql.DataSource</res-type>
      <res-auth>Container</res-auth>
      </resource-ref>

      <resource-ref>
      Maestro Datasource Reference
      <res-ref-name>jdbc/maestroDB</res-ref-name>
      <res-type>javax.sql.DataSource</res-type>
      <res-auth>Container</res-auth>
      </resource-ref>

      <resource-ref>
      Maestro Test Datasource Reference
      <res-ref-name>jdbc/maestroDBTest</res-ref-name>
      <res-type>javax.sql.DataSource</res-type>
      <res-auth>Container</res-auth>
      </resource-ref>


      </web-app>
      ///////////////////////////////////////////////
      type Exception report

      message

      description The server encountered an internal error () that prevented it from fulfilling this request.

      exception

      javax.servlet.ServletException: Servlet execution threw an exception
      org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:141)
      org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:281)
      org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)


      root cause

      java.lang.NoClassDefFoundError: com/sun/facelets/compiler/CompilationManager
      com.sun.facelets.compiler.SAXCompiler.doCompile(SAXCompiler.java:228)
      com.sun.facelets.compiler.Compiler.compile(Compiler.java:104)
      com.sun.facelets.impl.DefaultFaceletFactory.createFacelet(DefaultFaceletFactory.java:192)
      com.sun.facelets.impl.DefaultFaceletFactory.getFacelet(DefaultFaceletFactory.java:141)
      com.sun.facelets.impl.DefaultFaceletFactory.getFacelet(DefaultFaceletFactory.java:93)
      com.sun.facelets.FaceletViewHandler.buildView(FaceletViewHandler.java:503)
      com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:553)
      org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:108)
      org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:216)
      com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:106)
      com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
      com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
      javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
      org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:141)
      org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:281)
      org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)


      note The full stack trace of the root cause is available in the JBossWeb/2.0.1.GA logs.