-
1. Re: ClassNotFoundException in Ajax4jsf using JSeam2.1.1GA
nbelaevski Feb 25, 2009 4:33 AM (in response to zzuli)Try this: com.sun.facelets.FaceletViewHandler.
Note that Ajax4Jsf is not supported anymore. Use RichFaces instead. The latest released version is 3.3.0.GA. -
2. Re: ClassNotFoundException in Ajax4jsf using JSeam2.1.1GA
zzuli Feb 25, 2009 9:07 AM (in response to zzuli)To nbelaevski:
I have tried RichFaces3.3.0.GA, included richfaces-api.jar,richfaces-impl.jar,richfaces-ui.jar files in the .war , and the exception is gone.
But when i deploy the project, i get another excetion: org.ajax4jsf.resource.ResourceNotFoundException: Resource not registered : org/richfaces/renderkit/html/scripts/skinning.js.seam
And the ajax effect cannot be displayed on the page.
here is part of my web.xml:
<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>
REQUEST
FORWARD
INCLUDE
</filter-mapping>
<context-param>
<param-name>org.ajax4jsf.VIEW_HANDLERS</param-name>
<param-value>com.sun.facelets.FaceletViewHandler</param-value>
</context-param>
there is no confiuration in faces-config.xml.
I'm not sure how to configure the files.
Could anyone help me? -
3. Re: ClassNotFoundException in Ajax4jsf using JSeam2.1.1GA
nbelaevski Feb 25, 2009 10:29 AM (in response to zzuli)For EAR layout libraries should be put:
- richfaces-api.jar - to EAR\lib
- richfaces-ui.jar & richfaces.impl.jar - to WAR\WEb_INF\lib -
4. Re: ClassNotFoundException in Ajax4jsf using JSeam2.1.1GA
zzuli Feb 25, 2009 11:37 AM (in response to zzuli)To nbelaevski:
I have tried:
- richfaces-api.jar - to EAR\lib
- richfaces-ui.jar & richfaces.impl.jar - to WAR\WEb-INF\lib
Find that richfaces-api.jar is also needed in WAR\WEb-INF\lib or there would be ClassNotFoundException.
The Exception is the same : org.ajax4jsf.resource.ResourceNotFoundException: Resource not registered : org/richfaces/renderkit/html/scripts/skinning.js.seam.
But when deploying,no exception. that excption come out when pages are requested.
Maybe my configuration files is wrong or some jars are indeed ommitted.
the faces-config.xml:
<faces-config version="1.2" 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-facesconfig_1_2.xsd">
</faces-config>
the components.xml:
<components xmlns="http://jboss.com/products/seam/components"
xmlns:core="http://jboss.com/products/seam/core"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://jboss.com/products/seam/core
http://jboss.com/products/seam/core-2.0.xsd
http://jboss.com/products/seam/components
http://jboss.com/products/seam/components-2.0.xsd">
<core:init jndi-pattern="JSeamDemo_Ajax4jsf/#{ejbName}/local" debug="true"/>
<core:manager conversation-timeout="120000"/>
ant build file:
I'm new to jboss seam and richfaces.
Thanks a lot. -
5. Re: ClassNotFoundException in Ajax4jsf using JSeam2.1.1GA
nbelaevski Feb 25, 2009 1:43 PM (in response to zzuli)rcihfaces-api.jar is not necessary in WAR in order for application to be compiled. You can checkout sources for Seam EAR we use for testing here: http://anonsvn.jboss.org/repos/richfaces/trunk/test-applications/regressionArea . It is Maven-based, run "mvn install" to build it.
Can you please post your web.xml? -
6. Re: ClassNotFoundException in Ajax4jsf using JSeam2.1.1GA
zzuli Feb 26, 2009 12:17 AM (in response to zzuli)To nbelaevski:
Here is the web.xml:
<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>
REQUEST
FORWARD
INCLUDE
</filter-mapping>
<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.VIEW_HANDLERS</param-name>
<param-value>
org.jboss.seam.ui.facelet.SeamFaceletViewHandler
</param-value>
</context-param> -->
<!-- Seam -->
<listener-class>
org.jboss.seam.servlet.SeamListener
</listener-class>
<servlet-name>Seam Resource Servlet</servlet-name>
<servlet-class>
org.jboss.seam.servlet.ResourceServlet
</servlet-class>
<servlet-mapping>
<servlet-name>Seam Resource Servlet</servlet-name>
<url-pattern>/seam/resource/*</url-pattern>
</servlet-mapping>
<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>
<context-param>
<param-name>javax.faces.STATE_SAVING_METHOD</param-name>
<param-value>server</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.DEFAULT_SUFFIX</param-name>
<param-value>.xhtml</param-value>
</context-param>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
<!-- Faces Servlet Mapping -->
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.seam</url-pattern>
</servlet-mapping> -
7. Re: ClassNotFoundException in Ajax4jsf using JSeam2.1.1GA
nbelaevski Feb 26, 2009 7:20 AM (in response to zzuli)I see. Seam registers RF filter itself, you should remove its declaration from web.xml.
-
8. Re: ClassNotFoundException in Ajax4jsf using JSeam2.1.1GA
zzuli Feb 26, 2009 11:18 AM (in response to zzuli)To nbelaevski:
It is that problem. Thanks very much.
The first step is always difficult, really thanks for your helping.