Arquillian测试:无法找到工厂javax.faces.context.FacesContextFactory的备份

时间:2014-03-14 13:14:05

标签: jsf selenium jsf-2 jboss-arquillian

我正在尝试将Arquillian + Selenium测试添加到我的jsf应用程序中。问题是,当我尝试运行测试时(在tomcat 7上,使用命令mvn test),浏览器将打开并显示错误:HTTP Status 500 - Could not find backup for factory javax.faces.context.FacesContextFactory

我做了一些搜索,发现将com.sun.faces.config.ConfigureListener添加到我的web.xml可以提供帮助。它有帮助 - 测试运行没有错误,但我得到了很多关于表单的警告:

WARNING: JSF1074: Managed bean named '<myBeanName>' has already been registered. Replacing existing managed bean class type <Path to bean class> with <Path to bean class>

两条路径都相同。如果没有ConfigureListener,应用程序将运行而不会出现错误和警告(但测试失败)。

我正在使用:

  • Arquillian 1.1.2 Final
  • Arquillian Container Tomcat Embedded 7 1.0.0.CR5
  • Graphene webdriver 2.0.0.Final
  • Mojarra 2.1.22

0 个答案:

没有答案