13 September 2007

Upgrade RichFaces library from 3.0.X to 3.1.0 in a seam-gen generated project

to upgrade a seam-gen generated project to the new RichFaces version (here the demo) you have to modify the build.xml file.

Here the steps:
  1. Download the latest version of RichFaces library (3.1.0) from here;
  2. Delete ajax4jsf*.jar and richfaces*.jar in the project lib directory;
  3. Copy the new richfaces jars to the project lib directory (those are 3 jar files: api, impl and ui)
  4. Open build.xml of the project
  5. In the war target, delete the following 2 lines:
    <include name="ajax4jsf*.jar" />
    <include name="richfaces*.jar" />
  6. At the same place put those lines:
    <include name="richfaces-impl*.jar" />
    <include name="richfaces-ui*.jar" />
  7. Staying in build-xml, go to ear target and put this line inside the <fileset dir="${basedir}"> tag:
    <include name="richfaces-api*.jar" />
You are done, execute ant clean and redeploy the project :)

Update: there are some problems with page parameter propagation with Seam and RichFaces 3.1.0.GA. This has been fixed in RichFaces 3.1.1 snapshots since 18/09/2007. The RichFaces snapshot distributed with Seam 2.0.0.CR1 is also the fixed version.


05 September 2007

Exception sending context initialized event to listener instance of class com.sun.faces.config.ConfigureListener

I got this exception moving a (working) web application from Tomcat to JBoss AS 4.2.1.GA.

The problem is caused by different version of JSF library so I resolved the problem just removing some jars from WEB-INF/lib path of the application and leaving it use the ones from JBoss AS.

The Jars I removed are:
  • el-api.jar
  • el-ri.jar
  • jsf-api.jar
  • jsf-impl.jar
  • jsf-tlds.jar
Now it is perfectly working...

Demetrio Filocamo