运行TomEE和jsf示例

时间:2012-07-28 10:57:34

标签: jsf myfaces apache-tomee

在解压缩TomEE-plus(apache-tomee-1.0.0-plus.zip)并构建jsf示例(在examples-4.0.0-src.zip \ webapps \ jsf上)之后,我遇到了以下错误: catalina.*.log,其中包含以下消息:

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)

我是唯一一个收到此错误的人吗?有解决方案或解决方法吗?

1 个答案:

答案 0 :(得分:0)

我在TomEE论坛上发布了同样的问题: http://openejb.979440.n4.nabble.com/Running-TomEE-plus-jsf-Examples-Fails-td4656561.html得到了非常好的答案。以下是运行JSF和&的步骤。关于TomEE的CDI。

  1. TomEE过去曾在版本1上出现过错。现在修复了。这可能导致了这个错误。
  2. 通过查看最新版本的TomEE来克服此问题: http://openejb.apache.org/builds.html
  3. 为了在TomEE上运行带有cdi的JSF示例:
  4. 顺便说一下: TomEE的稳定版本将于今年9月发布。这可能会解决这个问题。