richfaces 4.2.1。最终不与码头合作8

时间:2012-04-25 13:45:51

标签: jsf-2 richfaces

Richfaces 4.2.1.Final已经出局了,我正在尝试将它与jetty 8一起使用,因为richfaces本身的文档说它与jetty 8兼容但在部署时出错......

java.lang.IllegalStateException: Application was not properly initialized at startup, could not find Factory: javax.faces.context.FacesContextFactory
at javax.faces.FactoryFinder$FactoryManager.getFactory(FactoryFinder.java:951)
at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:316)
at javax.faces.webapp.FacesServlet.init(FacesServlet.java:302)
at org.eclipse.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:456)
at org.eclipse.jetty.servlet.ServletHolder.doStart(ServletHolder.java:276)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:59)
at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:779)
at org.eclipse.jetty.servlet.ServletHandler.updateMappings(ServletHandler.java:1229)
at org.eclipse.jetty.servlet.ServletHandler.setServletMappings(ServletHandler.java:1288)
at org.eclipse.jetty.servlet.ServletHandler.addServletMapping(ServletHandler.java:888)
at org.eclipse.jetty.servlet.ServletHolder$Registration.addMapping(ServletHolder.java:621)
at org.richfaces.webapp.ResourceServletContainerInitializer.registerServlet(ResourceServletContainerInitializer.java:67)
at org.richfaces.webapp.ResourceServletContainerInitializer.onStartup(ResourceServletContainerInitializer.java:57)
at org.richfaces.webapp.RichFacesServletsInitializer.onStartup(RichFacesServletsInitializer.java:63)
at org.eclipse.jetty.plus.annotation.ContainerInitializer.callStartup(ContainerInitializer.java:100)
at org.eclipse.jetty.annotations.ServletContainerInitializerListener.contextInitialized(ServletContainerInitializerListener.java:99)
at org.eclipse.jetty.server.handler.ContextHandler.callContextInitialized(ContextHandler.java:672)
at org.eclipse.jetty.servlet.ServletContextHandler.callContextInitialized(ServletContextHandler.java:403)
at org.eclipse.jetty.server.handler.ContextHandler.startContext(ContextHandler.java:664)
at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:239)
at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1212)
at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:610)
at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:453)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:59)
at org.eclipse.jetty.deploy.bindings.StandardStarter.processBinding(StandardStarter.java:36)
at org.eclipse.jetty.deploy.AppLifeCycle.runBindings(AppLifeCycle.java:183)
at org.eclipse.jetty.deploy.DeploymentManager.requestAppGoal(DeploymentManager.java:485)
at org.eclipse.jetty.deploy.DeploymentManager.addApp(DeploymentManager.java:138)
at org.eclipse.jetty.deploy.providers.ScanningAppProvider.fileAdded(ScanningAppProvider.java:142)
at org.eclipse.jetty.deploy.providers.ScanningAppProvider$1.fileAdded(ScanningAppProvider.java:53)
at org.eclipse.jetty.util.Scanner.reportAddition(Scanner.java:604)
at org.eclipse.jetty.util.Scanner.reportDifferences(Scanner.java:535)
at org.eclipse.jetty.util.Scanner.scan(Scanner.java:398)
at org.eclipse.jetty.util.Scanner.doStart(Scanner.java:332)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:59)
at org.eclipse.jetty.deploy.providers.ScanningAppProvider.doStart(ScanningAppProvider.java:118)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:59)
at org.eclipse.jetty.deploy.DeploymentManager.startAppProvider(DeploymentManager.java:546)
at org.eclipse.jetty.deploy.DeploymentManager.doStart(DeploymentManager.java:221)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:59)
at org.eclipse.jetty.util.component.AggregateLifeCycle.doStart(AggregateLifeCycle.java:45)
at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:53)
at org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:90)
at org.eclipse.jetty.server.Server.doStart(Server.java:262)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:59)
at org.eclipse.jetty.xml.XmlConfiguration$1.run(XmlConfiguration.java:1203)
at java.security.AccessController.doPrivileged(Native Method)
at org.eclipse.jetty.xml.XmlConfiguration.main(XmlConfiguration.java:1126)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.eclipse.jetty.start.Main.invokeMain(Main.java:469)
at org.eclipse.jetty.start.Main.start(Main.java:612)
at org.eclipse.jetty.start.Main.parseCommandLine(Main.java:265)
at org.eclipse.jetty.start.Main.main(Main.java:79)

任何帮助都将受到高度赞赏......

2 个答案:

答案 0 :(得分:2)

请使用最新的Jetty 8版本。在我写作时,最新版本是8.1.3.v20120416。 我也遇到过与Jetty 8.0.x类似的问题。升级Jetty后,它没有任何问题。

答案 1 :(得分:1)

  

MyFaces和Mojarra通过JSF核心taglib的TLD文件为启动配置注册servlet上下文侦听器。到目前为止,这在大多数容器上都没有问题,但它不再适用于Jetty 8.原因是,Jetty 8使用Glassfish JSP实现,要求TLD文件位于容器的类路径上。如果通过Jetty Maven插件启动应用程序并且抛出上述异常,则不是这种情况。

见这里:http://jsflive.wordpress.com/2012/08/19/jsf-2-on-jetty-8/