[jboss-user] [JBoss Seam] - ClassNotFoundException: org.apache.myfaces.webapp.StartupSer

chawax do-not-reply at jboss.com
Wed Jul 25 06:08:07 EDT 2007


Hi,

I built an EAR using AndroMDA with EJB3 and Seam cartridge.
But when I try to deploy it on a JBoss 4.2 server, it tells me it can't found org.apache.myfaces.webapp.StartupServletContextListener class. I tried to add manually Apache myfaces-impl-1.1.5.jar, then the server starts but JBoss  responds to no request (even a simple http://localhost:8080)

Do you have any idea where it could come from ?

Here is the web.xml file generated by AndroMDA :

<?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">
  | 
  |     <!-- ************************ Seam Listener **************************** -->
  |     <listener>
  |         <listener-class>org.jboss.seam.servlet.SeamListener</listener-class>
  |     </listener>
  |     
  |     <!-- ************************ Ajax4jsf Filter **************************** -->
  |     <filter>
  |         <display-name>Ajax4jsf Filter</display-name>
  |         <filter-name>ajax4jsf</filter-name>
  |         <filter-class>org.ajax4jsf.FastFilter</filter-class>
  |         <init-param>
  |             <param-name>enable-cache</param-name>
  |             <param-value>true</param-value>
  |         </init-param>
  |         <init-param>
  |             <param-name>forceparser</param-name>
  |             <param-value>true</param-value>
  |         </init-param>
  |     </filter>
  |     
  |     <filter-mapping>
  |         <filter-name>ajax4jsf</filter-name>
  |         <servlet-name>Faces Servlet</servlet-name>
  |         <dispatcher>REQUEST</dispatcher>
  |         <dispatcher>FORWARD</dispatcher>
  |         <dispatcher>INCLUDE</dispatcher>
  |     </filter-mapping>
  |     
  |     <!-- ************************ Trinidad Filter **************************** -->
  |     <filter>
  |         <display-name>Trinidad Filter</display-name>
  |         <filter-name>trinidad</filter-name>
  |         <filter-class>org.apache.myfaces.trinidad.webapp.TrinidadFilter</filter-class>
  |     </filter>
  | 
  |     <filter-mapping>
  |         <filter-name>trinidad</filter-name>
  |         <servlet-name>Faces Servlet</servlet-name>
  |         <dispatcher>REQUEST</dispatcher>
  |         <dispatcher>FORWARD</dispatcher>
  |         <dispatcher>INCLUDE</dispatcher>
  |     </filter-mapping>
  | 
  |     <!-- ************************ Seam Filter **************************** -->
  |     <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>
  |         <servlet-name>Faces Servlet</servlet-name>
  |     </filter-mapping>
  |     
  |     <!-- ************************ Manual Filters **************************** -->
  |     
  |     
  |     
  |     <!-- ************************ SEAM Config **************************** -->
  |     <!-- 300 second conversation timeout -->
  |     <context-param>
  |         <param-name>org.jboss.seam.core.manager.conversationTimeout</param-name>
  |         <param-value>300000</param-value>
  |     </context-param>
  |     <context-param>
  |         <param-name>org.jboss.seam.core.init.debug</param-name>
  |         <param-value>true</param-value>
  |     </context-param>
  |     
  |     <!-- ********************* Facelets Config ************************** -->
  |     <context-param>
  |         <param-name>facelets.VIEW_MAPPINGS</param-name>
  |         <param-value>*.xhtml</param-value>
  |     </context-param>
  |     <context-param>
  |         <description>Prevents HTML-Comments from beeing rendered</description>
  |         <param-name>facelets.SKIP_COMMENTS</param-name>
  |         <param-value>true</param-value>
  |     </context-param>
  | 
  |     <!-- ************************ JSF Config **************************** -->
  |     <context-param>
  |         <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
  |         <param-value>.xhtml</param-value>
  |     </context-param>
  |     <context-param>
  |         <description>
  |             State saving method: "client" or "server" (= default)
  |             See JSF Specification 2.5.2. In ADF Faces, it is an
  |             optimized, token-based mechanism that is almost always a
  |             better choice than the standard JSF server-side state saving.
  |         </description>
  |         <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
  |         <param-value>client</param-value>
  |     </context-param>
  |     
  |     <!-- ************************ MyFaces Config **************************** -->
  |     <context-param>
  |         <description>
  |             This parameter tells MyFaces if javascript code should be allowed in the
  |             rendered HTML output.
  |             If javascript is allowed, command_link anchors will have javascript code
  |             that submits the corresponding form.
  |             If javascript is not allowed, the state saving info and nested parameters
  |             will be added as url parameters.
  |             Default: "true"
  |         </description>
  |         <param-name>org.apache.myfaces.ALLOW_JAVASCRIPT</param-name>
  |         <param-value>true</param-value>
  |     </context-param>
  |     <context-param>
  |         <description>
  |             If true, rendered HTML code will be formatted, so that it is "human readable".
  |             i.e. additional line separators and whitespace will be written, that do not
  |             influence the HTML code.
  |             Default: "true"
  |         </description>
  |         <param-name>org.apache.myfaces.PRETTY_HTML</param-name>
  |         <param-value>true</param-value>
  |     </context-param>
  |     <context-param>
  |         <param-name>org.apache.myfaces.DETECT_JAVASCRIPT</param-name>
  |         <param-value>false</param-value>
  |     </context-param>
  |     <context-param>
  |         <description>
  |             If true, a javascript function will be rendered that is able to restore the
  |             former vertical scroll on every request. Convenient feature if you have pages
  |             with long lists and you do not want the browser page to always jump to the top
  |             if you trigger a link or button action that stays on the same page.
  |             Default: "false"
  |         </description>
  |         <param-name>org.apache.myfaces.AUTO_SCROLL</param-name>
  |         <param-value>true</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>
  | 	
  | 	<!-- ************************ Trinidad Config **************************** -->
  |     <context-param>
  |         <param-name>org.apache.myfaces.trinidad.DEBUG_JAVASCRIPT</param-name>
  |         <param-value>false</param-value>
  |     </context-param>
  |     <context-param>
  |         <!-- 
  |              If this parameter is enabled, Trinidad will automatically
  |              check the modification date of your JSPs, and discard saved
  |              state when they change;  this makes development easier,
  |              but adds overhead that should be avoided when your application
  |              is deployed
  |         -->
  |         <param-name>org.apache.myfaces.trinidad.CHECK_FILE_MODIFICATION</param-name>
  |         <param-value>true</param-value>
  |     </context-param>
  |     <context-param>
  |         <param-name>org.apache.myfaces.trinidad.resource.DEBUG</param-name>
  |         <param-value>true</param-value>
  |     </context-param>
  |     <context-param>
  |         <param-name>org.apache.myfaces.trinidad.ALTERNATE_VIEW_HANDLER</param-name>
  |         <param-value>org.jboss.seam.ui.facelet.SeamFaceletViewHandler</param-value>
  |         <!--param-value>com.sun.facelets.FaceletViewHandler</param-value-->
  |     </context-param>
  |     <context-param>
  |         <param-name>org.apache.myfaces.trinidad.CACHE_VIEW_ROOT</param-name>
  |         <param-value>false</param-value>
  |     </context-param>
  |     <context-param>
  |         <param-name>org.apache.myfaces.trinidadinternal.DISABLE_CONTENT_COMPRESSION</param-name>
  |         <param-value>true</param-value>
  |     </context-param>
  |     
  |     <!-- ************************ Ajax4JSF Config **************************** -->
  |     <context-param>
  |         <param-name>org.ajax4jsf.SKIN</param-name>
  |         <param-value>DEFAULT</param-value>
  |     </context-param>
  |     
  |     <!-- ************************ Manual Merged Config **************************** -->
  |     <!-- uncomment if you want to add your own project specific facelet tags
  |          (and of course make sure "/WEB-INF/custom.taglib.xml" is the actual path
  |           to your facelet tag descriptor)
  |     <context-param>
  |         <param-name>facelets.LIBRARIES</param-name>
  |         <param-value>
  |             /WEB-INF/custom.taglib.xml;
  |         </param-value>
  |     </context-param>
  |     -->
  |     
  |     <!-- ************************ MyFaces Listener **************************** -->
  |     <listener>
  |         <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
  |     </listener>
  |     
  |     <!-- ************************ Seam Servlet Mapping ************************ -->
  |     <servlet>
  |         <servlet-name>Seam Resource Servlet</servlet-name>
  |         <servlet-class>org.jboss.seam.servlet.ResourceServlet</servlet-class>
  |     </servlet>
  |     
  |     <servlet-mapping>
  |         <servlet-name>Seam Resource Servlet</servlet-name>
  |         <url-pattern>/seam/resource/*</url-pattern>
  |     </servlet-mapping>
  |     
  |     <!-- ************************ Faces Servlet Mapping **************************** -->
  |     <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>*.seam</url-pattern>
  |     </servlet-mapping>
  |     
  |     <!-- ************************ Trinidad Resources Servlet **************************** -->
  | 	<servlet>
  | 		<servlet-name>Trinidad Resources</servlet-name>
  | 		<servlet-class>org.apache.myfaces.trinidad.webapp.ResourceServlet</servlet-class>
  | 	</servlet>
  |  
  | 	<servlet-mapping>
  | 		<servlet-name>Trinidad Resources</servlet-name>
  | 		<url-pattern>/adf/*</url-pattern>
  | 	</servlet-mapping>
  |     
  |     <!-- precompilation merge-point -->
  |     
  | 
  |     <session-config>
  |         <session-timeout>45</session-timeout>
  |         <!-- session-config merge-point -->
  |     </session-config>
  |     
  | 
  |     <!-- Welcome files -->
  |     <welcome-file-list>
  |         
  |         <welcome-file>index.jsp</welcome-file>
  |         <welcome-file>index.html</welcome-file>
  |     </welcome-file-list>
  | 
  |     <error-page>
  |         <error-code>408</error-code>
  |         <location>/index.jsp</location>
  |     </error-page>
  |     <error-page>
  |         <error-code>403</error-code>
  |         <location>/403.jsp</location>
  |     </error-page>
  |     
  |     <!-- taglib merge-point -->
  |     <!-- resource-ref merge-point -->
  |     
  | 
  |     <security-constraint>
  |         <web-resource-collection>
  |             <web-resource-name>Raw-JSF-Pages</web-resource-name>
  |             <description>
  |                 Prevent access to raw pages that are for JSF pages.
  |                 (No roles, so no direct access)
  |             </description>
  |         </web-resource-collection>
  |         <auth-constraint>
  |         </auth-constraint>
  |         <user-data-constraint>
  |             <transport-guarantee>NONE</transport-guarantee>
  |         </user-data-constraint>
  |     </security-constraint>
  | </web-app>

Thanks in advance ;)

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4067341#4067341

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4067341



More information about the jboss-user mailing list