HomeBlogGet Quote ABQJUGLogin

Syndication

RSSrssAtomatom

Getting JBoss 4.0.3 to work the JSF-RI

Written by: Dan HinojosaWed, 1 Feb 2006 10:30 AM PST .
Filed Under: MyFacesJSFJava Server FacesJBossNullPointerException

If you are trying to get JSF-RI and JBoss 4.0.3 to work with each other, you are in for a special surprise. The following code will help de-stupefy the situation:


java.lang.NullPointerException
        at javax.faces.webapp.UIComponentTag.setupResponseWriter(UIComponentTag.java:615)
        at javax.faces.webapp.UIComponentTag.doStartTag(UIComponentTag.java:217)
        at org.apache.myfaces.taglib.core.ViewTag.doStartTag(ViewTag.java:71) 

The NullPointerException is a result of a collision with the JSF-RI. This error occurs only with JBoss 4.0.3 because it comes packaged with MyFaces. The following solution was recommended by JBoss in their wiki.

Fix for the all configuration

The all configuration has something missing from the all/deploy/jbossweb-tomcat5.5.sar/meta-inf/jboss-service.xml file. If using the all configuration with JSF you should edit the value of the FilteredPackages attribute to make it look like this:


<attribute name="FilteredPackages">javax.servlet,org.apache.commons.logging</attribute>

Note that there should be no space on either side of the comma. For more details on this issue, see http://jira.jboss.com/jira/browse/JBAS-2349

Using the JSF Reference Implementation

To use the JSF Reference Implementation instead of the bundled MyFaces implementation, simply delete the jbossweb-tomcat55.sar/jsf-lib directory. Then, package the RI in your WEB-INF/lib directory as usual.

Note: You may also need to delete temp directories such as server/default/tmp and server/default/work. See comment by Geoffery in http://jira.jboss.com/jira/browse/JBAS-1508

I hope that helps.

1 comment for Getting JBoss 4.0.3 to work the JSF-RI
Sean Kang
Fri, 23 Mar 2007 04:04 PM PDT

I am using 4.0.5 jboss and that FilteredPackages is as you mentioned but I am getting that same error. &nbsp;

In the long run, I want to use ajax4jsp.

Please advice some help.  Thanks!