Upgrade to JSF 2.x and Webflow 2.1.x

Generally, the upgrade could be easy, but still took me a while to get there. So here’s a summary of my changes to the existing project.

Update References (e.g. with Maven)

First, add the references to JSF 2.0 (in my case I used Apache MyFaces 2.x). With maven it looks like this:

Additionally (I think it might not be necessary) I upgraded to the latest facelets release (version 1.1.15):

Now it’s also time to upgrade the spring versions (you might also need to upgrade further dependencies such as Spring Security, Spring ORM etc. Make sure that at the end you don’t have any 2.x references left of any of your dependencies or sub dependencies:

And eventually the upgrade to Spring Webflow 2.1.x:

This was actually all to get it running again. However, see below some further information on troubleshooting.

Eclipse: JavaServer Faces Project Facet

First I had eclipse running with the Project Facet configured for JavaServer Faces 1.2. However, I was not able to add that for Faces 2.0, thus I removed it completely. Now I take care of the distribution of the faces-jars by myself via dependency to these libraries in the project itself (see maven configurations above).

If you forget the references to the faces libraries (or actually if they are not available to your application server), you’re most probably running into the following exception:
code>javax.faces.FacesException: Undefined component type javax.faces.ViewRoot

Recommended Reading