XPath Issues with JBoss 4.0.3 SP1

I recently ran across this error message when running Flex Data Services 2 inside JBoss 4.0.3 SP1:

ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/samples].[MessageBrokerServlet]:145]
Allocate exception for servlet MessageBrokerServlet
java.lang.RuntimeException: XPathFactory#newInstance() failed to create an XPathFactory for the default object model: http://java.sun.com/jaxp/xpath/dom with the XPathFactoryConfigurationException: javax.xml.xpath.XPathFactoryConfigurationException: No XPathFctory implementation found for the object model: http://java.sun.com/jaxp/xpath/dom

The problem is with JBoss 4.0.3 SP1 and is documented several places on the web:

Basically the solution is to download the 2.7.0 version of the xalan jars from apache and copy xalan.jar, xercesImpl.jar, and xml-apis.jar into the jboss deploy folder before deploying any flex data services 2 applications.  Below is the link to apache’s xalan download sites where you can either download xalan-j_2_7_0-bin.zip or xalan-j_2_7_0-bin-2jars.zip.