users@javaserverfaces.java.net

JSF 2.2 helloWorld + mvn jetty:run = CONFIGURATION FAILED! com.sun.faces.vendor.WebContainerInjectionProvider cannot be cast to com.sun.faces.spi.InjectionProvider

From: Stephen More <stephen.more_at_gmail.com>
Date: Tue, 18 Feb 2014 11:31:28 -0500

I have an extremely simple web app that works fine with mojarra 2.1.26. (
https://code.google.com/p/maven-examples/source/browse/#svn%2Ftrunk%2Fjsf-22)
But when I try to upgrade it to 2.2.5 it throws this exception:

Caused by:
java.lang.ClassCastException:
com.sun.faces.vendor.WebContainerInjectionProvider cannot be cast to
com.sun.faces.spi.InjectionProvider
        at
javax.faces.FactoryFinder$FactoryManager.copyInjectionProviderFromFacesContext(FactoryFinder.java:1051)
        at
javax.faces.FactoryFinder$FactoryManager.<init>(FactoryFinder.java:1035)
        at
javax.faces.FactoryFinder$FactoryManagerCache.getApplicationFactoryManager(FactoryFinder.java:856)
        at
javax.faces.FactoryFinder$FactoryManagerCache.getApplicationFactoryManager(FactoryFinder.java:793)
        at
javax.faces.FactoryFinder$FactoryManagerCache.access$100(FactoryFinder.java:768)
        at javax.faces.FactoryFinder.setFactory(FactoryFinder.java:409)
        at
com.sun.faces.config.processor.FactoryConfigProcessor.setFactory(FactoryConfigProcessor.java:317)
        at
com.sun.faces.config.processor.FactoryConfigProcessor.processFactories(FactoryConfigProcessor.java:259)
        at
com.sun.faces.config.processor.FactoryConfigProcessor.process(FactoryConfigProcessor.java:216)
        at
com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:435)
        at
com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:214)
        at
org.eclipse.jetty.server.handler.ContextHandler.callContextInitialized(ContextHandler.java:801)
        at
org.eclipse.jetty.servlet.ServletContextHandler.callContextInitialized(ServletContextHandler.java:446)
        at
org.eclipse.jetty.server.handler.ContextHandler.startContext(ContextHandler.java:793)
        at
org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:296)

Is this a bug or a issue with my configuration ?