java.lang.IllegalStateException: No Factories configured for this Application

classic Classic list List threaded Threaded
2 messages Options
b.s
Reply | Threaded
Open this post in threaded view
|

java.lang.IllegalStateException: No Factories configured for this Application

b.s
i   Apache Geronimo v3.0.1
ii  myfaces-bundle-1.1.10
iii Linux

Required: To successfully deploy an ear to Apache Geronimo v3.0.1.
Problem: java.lang.IllegalStateException: No Factories configured for this Application.

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>


1. In web.xml, I have this:

  <context-param>
    <param-name>org.apache.myfaces.EXPRESSION_FACTORY</param-name>
    <param-value>com.sun.el.ExpressionFactoryImpl</param-value>
   </context-param>

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

Note:
1. Using only the Geronimo own myfaces-bundle-1.1.10.jar located in the repository folder -- no other myfaces-bundle.x.x.x.jar in my ear.  
2. Removing the <context-param> or <listener> or both doesn't make any difference to the error reported above.
3. The same ear file was succesfuly deployed on WASCE V3.0.0.3 with no error.


Thanks for your help in advance.
b.s
Reply | Threaded
Open this post in threaded view
|

Re: java.lang.IllegalStateException: No Factories configured for this Application

b.s
Found the problem and solution.


JSP and EL support was disabled by mistake in the web.xml:

     <context-param>
      <param-name>org.apache.myfaces.SUPPORT_JSP_AND_FACES_EL</param-name>
      <param-value>false</param-value>
    </context-param>


Solution is to set the value to the default, i.e., <param-value>true</param-value>