Question

After extracting TomEE-plus (apache-tomee-1.0.0-plus.zip) and building the jsf example (on examples-4.0.0-src.zip\webapps\jsf), I came across the following error on catalina.*.log with the following message:

SEVERE: An error occured while initializing MyFaces: Class org.apache.openejb.jsf.CustomApplicationFactory is no javax.faces.application.ApplicationFactory
java.lang.IllegalArgumentException: Class org.apache.openejb.jsf.CustomApplicationFactory is no javax.faces.application.ApplicationFactory
    at javax.faces.FactoryFinder.newFactoryInstance(FactoryFinder.java:128)
    at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:107)
    at org.apache.myfaces.config.FacesConfigurator.configureApplication(FacesConfigurator.java:598)
    at org.apache.myfaces.config.FacesConfigurator.configure(FacesConfigurator.java:276)
    at org.apache.myfaces.webapp.AbstractFacesInitializer.buildConfiguration(AbstractFacesInitializer.java:131)
    at org.apache.myfaces.webapp.Jsp21FacesInitializer.initContainerIntegration(Jsp21FacesInitializer.java:64)
    at org.apache.myfaces.webapp.AbstractFacesInitializer.initFaces(AbstractFacesInitializer.java:83)
    at org.apache.myfaces.webapp.StartupServletContextListener.contextInitialized(StartupServletContextListener.java:58)
    at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4779)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5273)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:895)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:871)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:615)
    at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:962)
    at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1603)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
    at java.util.concurrent.FutureTask.run(FutureTask.java:166)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
    at java.lang.Thread.run(Thread.java:722)

Am I the only one who gets this error? Is there a solution or a workaround?

Was it helpful?

Solution

I posted the same question on TomEE's forum: http://openejb.979440.n4.nabble.com/Running-TomEE-plus-jsf-Examples-Fails-td4656561.html and got very nice answers. Here are the steps for running JSF & CDI on TomEE.

  1. TomEE used to have a bug on version 1. It is now fixed. That probably caused that error.
  2. Overcome this problem by checking out the latest version of TomEE: http://openejb.apache.org/builds.html
  3. In Order to run a JSF example with cdi on TomEE:

By the way: A stable version of TomEE is about to release this September. This would probably cover the problem.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top