У меня есть приложение Spring Boot + JSF, которое запускается как чудо, когда мы запускаем его как:
mvn spring-boot:run
Однако, когда я создаю банку, используя mvn clean compile package install
, а затем запустить java -jar myapp.jar
я получаю:
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>
в веб-XML, как предлагается здесь, я попробовал ниже три варианта:
<listener>
<listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
</listener>
OR
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener
</listener-class>
</listener>
OR
<listener>
<listener-class>org.springframework.web.context.request.RequestContextListener
</listener-class>
</listener>
Однако ошибка остается той же, из-за недостатка идей, оцените любую помощь по этому поводу.
Лучшее