Deploying RichFaces 3.3.3 to Tomcat having MyFaces 2.2, PrimeFaces, OmniFaces etc

Solution 1:

RichFaces 3.x is not compatible with JSF 2.2. Tomcat does not support isolated JSF class loading such as JBoss with org.jboss.jbossfaces.WAR_BUNDLES_JSF_IMPL context param in web.xml, GlassFish with <property name="useBundledJsf" value="true" /> in glassfish-web.xml, etc. So even when you supply another JSF version via the webapp, Tomcat keeps loading its own. This just can't work.

You've basically 3 options:

  1. Deploy that RichFaces 3.x webapp on a separate Tomcat instance without those common libs.

  2. Move those common libs from Tomcat back in those other webapps, so each webapp gets its own.

  3. Upgrade to RichFaces 4.x. Been there, done that, they've a quite good migration guide.