====== JBOSS Java Server Faces Troubleshooting ====== These are some notes on troubleshooting Java Server Faces deployments on the JBoss 4.* application server. ===== No faces context =====
org.apache.jasper.JasperException: No faces context?! org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:512)
Since JBoss 4.0.3 Java Server Faces has been bundled with JBoss. The Apache MyFaces version 1.1.0 is used and is built to work with Tomcat 5.5 that comes with JBoss AS 4.0.3+. This implementation is JSF 1.1 certified. This means you do not need to include Sun's JSF libraries (jars) in your WAR file. You will also need to replace
<listener> <listener-class>com.sun.faces.config.ConfigureListener</listener-class> </listener>
with
<listener> <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class> </listener>
in your web.xml deployment descriptor. ===== faces-config.xml loaded twice =====
17:32:46,968 WARN [FacesConfigurator] /WEB-INF/faces-config.xml has been specified in the javax.faces.CONFIG_FILES context parameter of the deployment descriptor. This should be removed, as it will be loaded twice. See JSF spec 1.1, 10.3.2 17:32:46,984 INFO [FacesConfigurator] Reading config /WEB-INF/faces-config.xml 17:32:47,000 INFO [FacesConfigurator] Reading config /WEB-INF/faces-config.xml
Remove the lines:
<context-param> <param-name>javax.faces.CONFIG_FILES</param-name> <param-value>/WEB-INF/faces-config.xml</param-value> </context-param>
from web.xml.