could not find Factory: javax.faces.application.ApplicationFactory

不羁岁月 提交于 2019-11-29 14:37:51
BalusC

JSF 2.1 requires a Servlet 3.0 compatible container, yet Tomcat 6 is only a Servlet 2.5 compatible container. You've 2 options:

  1. Downgrade JSF 2.1 to JSF 2.0 (Mojarra 2.0 is currently at 2.0.6).
  2. Upgrade Tomcat 6.0 to Tomcat 7.0 (and change web.xml root declaration conform Servlet 3.0).

If you choose option 2 (upgrading to Tomcat 7.0), then you should upgrade Mojarra 2.1.0 to at least Mojarra 2.1.1 (it's currently already at 2.1.3). This is required because Mojarra 2.1.0 contains a bug in the annotation scanner which makes it incompatible with Tomcat and Jetty.

See also:

I solved this problem using two approaches :

1.Two different version jsf were removed (eg. jsf 1.x or jsf2.x) or two different jsf implementation were removed (mojarra jsf or myfaces) from project .And I used only one implementation either mojarra (or myfaces) but not both .I had done same in case of jsf different version jars (i.e jsf 2.x jars were used)not jsf 1.x.

2.Remove @ManagedBean annotation from interfaces.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!