Не настроено ни одного завода при использовании Jetty 7 + Myfaces 1.2 - PullRequest
0 голосов
/ 25 июля 2010

Я использую встроенную версию Jetty 7 для загрузки веб-приложения с использованием Apache MyFaces 1.2 в тестовом классе junit 4 по совету другого потока .

Во время выполнения теста я получаю эту ошибку.

java.lang.IllegalStateException: No Factories configured for this Application. This happens if the faces-initialization does not work at all - make sure that you properly include all configuration settings necessary for a basic faces application and that all the necessary libs are included. Also check the logging output of your web application and your container for any exceptions!
If you did that and find nothing, the mistake might be due to the fact that you use some special web-containers which do not support registering context-listeners via TLD files and a context listener is not setup in your web.xml.
A typical config looks like this;

<listener>
  <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
</listener>

Это приложение отлично работает с tomcat, weblogic и даже oc4j!

Как я могу заставить это работать с причалом?

1 Ответ

0 голосов
/ 26 июля 2010

Я решил эту проблему, добавив jar myfaces-impl с файлом .tld в каталоге WEB-INF / lib.

...