Java Mailing List Archive

http://www.junlu.com/

Google
Google
Mailing List
Home
Forum Home
JBoss - Java Application Server
Tomcat - JSP/Servlet container
Struts - A MVC web framework
iText - An open source PDF Java Library
JDOM - JDOM XML Parser
JSP - A mailing list about Java Server Pages specification and reference
J2EE - A mailing list for Java(tm) 2 Platform, Enterprise Edition
J2EE Pattern - An interest list for Sun Java Center J2EE Pattern Catalog
Servlet - A mailing list for discussion about Sun Microsystem's Java Servlet API Technology
Struts & Hibernate
Subjects
JSP editor plugin for eclipse ?
org apache jasper JasperException: Unable to compile class for JSP
Tomcat: Connection reset by peer: socket write error
Cannot retrieve definition for form bean null
Struts Tiles Tutorial (free Struts training)
Where do I download Tomcat 4 0 6?
Data Access Object (DAO) pattern, example DAO 's
Where to download Tomcat v 4 1 24 from?
Tomcat 5 0 16 Requested resource not available
Subject: Servlet : Session invalidate
Oracle Connection Pooling in 3 2 2
Servlet action is currently unavailable
Tomcat/Struts Unicode Encoding/Decoding problems
Subject: Running a Simple JMS Example
Tomcat and webapplication specific java library path
Mapping in workers2 properties
org apache jasper JasperException
problem with html:text bean throwing exception
Cannot find message resources under key org apache struts action
   MESSAGE
Cannot find message resources under key org apache struts action MESSAGE
invalid direct reference problem with solution
Tool for jsp debug Try Sysdeo Eclipse Plugin
Tomcat 5 Cannot load JDBC driver class 'null ' SQL state: null
weblogic ejbc
java properties file
Jboss 3 2 3 Coyote Can 't re
Tomcat 5, Apache2 and mod jk2 integration problem
JBoss example problem new to J2EE
Value attribute of <html:checkbox
url string for connecting jboss to oracle
javax servlet ServletException: BeanUtils populate
5 0 18: Windows XP Pro vs Windows 2000
HTTP Status 404 The requested resource is not available
 
- MyFaces, Seam and JBoss 4.2.1 GA problem

- MyFaces, Seam and JBoss 4.2.1 GA problem

2007-11-01       - By maykellff

 Back
Hi all, i have an old MyFaces-EJB3 sample application that i'm refactoring to
use Seam, i set every single datail (i've read a lot of tutorial and forum's
posts about the topic ) in order to integrate Seam with my old myfaces
application but when i try to run it on server i get the following error:

[quoted]
23:51:06,875 INFO  [STDOUT] 23:51:06,859 ERROR [StartupServletContextListener]
Error initializing ServletContext
java.lang.IllegalArgumentException: Class org.jboss.seam.jsf
.SeamApplicationFactory is no javax.faces.application.ApplicationFactory
  at javax.faces.FactoryFinder.newFactoryInstance(FactoryFinder.java:132)
  at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:107)
  at org.apache.myfaces.config.FacesConfigurator.configureApplication
(FacesConfigurator.java:439)
[/quoted]

If i let the Myfaces jar files in web-inf/lib but delete the myfaces listener
entry from web.xml the application get the following error:

[quoted]
00:27:19,234 INFO  [STDOUT] 00:27:19,234 ERROR [[/jsfTest]] StandardWrapper
.Throwable
java.lang.IllegalStateException: No Factories configured for this Application.
This happens if the faces-initialization does not work at all - make sure that
you properly include all configuration settings necessary for a basic faces
application and that all the necessary libs are included. Also check the
logging output of your web application and your container for any exceptions!
If you did that and find nothing, the mistake might be due to the fact that you
use some special web-containers which do not support registering context
-listeners via TLD files and a context listener is not setup in your web.xml.
A typical config looks like this;

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


  at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:90)
  at javax.faces.webapp.FacesServlet.init(FacesServlet.java:88)
  at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java
:1161)
  at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:981)
  at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java
:4069)
  at org.apache.catalina.core.StandardContext.start(StandardContext.java:4373)
  at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java
:761)
  at org.apache.catalina.
[/quoted]

If i eliminate the myfaces jar, and the myfaces listener declaration in web.xml
the application works well, then the error is exclusively related to the use of
Myfaces, i think some kind of conflict between Seam listener and Myfaces
Listener, but i don't know why and how solve this.

This is my web.xml:
[qouted]
<?xml version="1.0"?>
<!--
* Copyright 2004 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*      http://www.apache.org/licenses/LICENSE-2 (See http://NSE-2.ora-code.com).0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
-->
<web-app version="2.4" 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">
<display-name>jsfTest</display-name>
<context-param>
 <param-name>org.ajax4jsf.SKIN</param-name>
 <param-value>blueSky</param-value>
</context-param>

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

 <context-param>
 State saving method: "client" or "server" (= default)
           See JSF Specification 2.5.2
 <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
 <param-value>client</param-value>
</context-param>

<context-param>
    <param-name>org.jboss.jbossfaces.WAR_BUNDLES_JSF_IMPL</param-name>
    <param-value>true</param-value>
</context-param>
 

 <display-name>Ajax4jsf Filter</display-name>
 <filter-name>ajax4jsf</filter-name>
 <filter-class>org.ajax4jsf.Filter</filter-class>
 <init-param>
  <param-name>forceparser</param-name>
  <param-value>false</param-value>
 </init-param>



<filter-mapping>
 <filter-name>ajax4jsf</filter-name>
 <servlet-name>Faces Servlet</servlet-name>
 REQUEST
 FORWARD
 INCLUDE
</filter-mapping>




<!-- Listener, that does all the startup work (configuration, init). -->

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




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





<!-- Faces Servlet -->

 <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>*.jsf</url-pattern>
</servlet-mapping>
<servlet-mapping>
 <servlet-name>Faces Servlet</servlet-name>
 <url-pattern>/faces/*</url-pattern>
</servlet-mapping>
<login-config>
 <auth-method>BASIC</auth-method>
</login-config>
</web-app>
[/qouted]

I'm using JBoss 4.2.1 GA, seam 1.2.0.AP and Myfaces 1.1.4

I hope you can help me




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

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode
=reply&p=4101012
__ ____ ____ ____ ____ ____ ____ ____ ____ ____
jboss-user mailing list
jboss-user@(protected)
https://lists.jboss.org/mailman/listinfo/jboss-user

©2008 junlu.com - Jax Systems, LLC, U.S.A.