4 Replies Latest reply on May 31, 2011 1:07 AM by lightguard

    Seam servlet on Tomcat 7 problem.

    piklos

      Hello all,
      I am trying to use seam-servlet module on tomcat 7.0.14, but with java ee 5 api.
      I've added stuff to my web.xml as sepcified in the documentation so that it looks like this:



      <?xml version="1.0" encoding="UTF-8"?>
      <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
           xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
           version="2.5">
           <context-param>
                <param-name>javax.faces.PROJECT_STAGE</param-name>
                <param-value>Development</param-value>
           </context-param>
           <context-param>
                <param-name>org.apache.myfaces.annotation.SCAN_PACKAGES</param-name>
                <param-value>biz.netdialog</param-value>
           </context-param>
           <servlet>
                <servlet-name>Faces Servlet</servlet-name>
                <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
                <load-on-startup>1</load-on-startup>
           </servlet>
           <servlet-mapping>
                <servlet-name>Faces Servlet</servlet-name>
                <url-pattern>*.jsf</url-pattern>
           </servlet-mapping>
           <welcome-file-list>
                <welcome-file>index.jsf</welcome-file>
           </welcome-file-list>
           <listener>
                <listener-class>org.jboss.weld.environment.servlet.Listener</listener-class>
           </listener>
           <listener>
                <listener-class>org.jboss.seam.servlet.event.ServletEventBridgeListener</listener-class>
           </listener>
      
           <servlet>
                <servlet-name>Servlet Event Bridge Servlet</servlet-name>
                <servlet-class>org.jboss.seam.servlet.event.ServletEventBridgeServlet</servlet-class>
                <!-- Make load-on-startup large enough to be initialized last (thus destroyed 
                     first) -->
                <load-on-startup>99999</load-on-startup>
           </servlet>
      
           <filter>
                <filter-name>Catch Exception Filter</filter-name>
                <filter-class>org.jboss.seam.servlet.CatchExceptionFilter</filter-class>
           </filter>
      
           <filter-mapping>
                <filter-name>Catch Exception Filter</filter-name>
                <url-pattern>/*</url-pattern>
           </filter-mapping>
           <filter>
                <filter-name>Servlet Event Bridge Filter</filter-name>
                <filter-class>org.jboss.seam.servlet.event.ServletEventBridgeFilter</filter-class>
           </filter>
      
           <filter-mapping>
                <filter-name>Servlet Event Bridge Filter</filter-name>
                <url-pattern>/*</url-pattern>
           </filter-mapping>
           <resource-env-ref>
                <description>Object factory for the CDI Bean Manager</description>
                <resource-env-ref-name>BeanManager</resource-env-ref-name>
                <resource-env-ref-type>javax.enterprise.inject.spi.BeanManager</resource-env-ref-type>
           </resource-env-ref>
      </web-app>


      But server fails to start because of the



      SEVERE: Exception starting filter Catch Exception Filter
      java.lang.ClassNotFoundException: org.jboss.seam.servlet.CatchExceptionFilter



      So i have to have seam-catch on my class path in order to use seam-servlet???
      is this the same 'over-eager' class path scanner problem, and is there any solution to this without addind seam catch? Thank you.