First of all the URL: http://www.jboss.org/j2ee/dtd/jboss-ds_1_5.dtd does not return the correct document.
Second JBoss 5.0.0 Beta 4 DTD resolver for jboss-jca.jar does not seen to be able to locate the local copy of jboss-ds_1_5.dtd .
Third if I extract the jboss-ds_1_5.dtd from jboss-jca.jar and put it up on my own website and edit my deploy/foobar-ds.xml to point to my URL it downloads the copy of my website. But that verbatim copy also has problems:
Caused by: org.xml.sax.SAXParseException: A ')' is required in the declaration of element type "local-tx-datasource".
<!-- Specify a jca-jdbc non-XADatasource (local) wrapper, using local transactions --> <!ELEMENT local-tx-datasource (jndi-name , use-java-context?, connection-url , url-delimeter?, url-selector-strategy-class-name?, driver-class, transaction-isolation? , connection-property* , user-name? , password? , (application-managed-security | security-domain | security-domain-and-application)? , min-pool-size? , max-pool-size? , blocking-timeout-millis? , background-validation?, background-validation-minutes?, validate-on-match?, idle-timeout-minutes? no-tx-separate-pools? , new-connection-sql? , check-valid-connection-sql? , valid-connection-checker-class-name? , exception-sorter-class-name? , stale-connection-checker-class-name?, track-statements? , prefill?, use-fast-fail?, prepared-statement-cache-size?, share-prepared-statements? , set-tx-query-timeout?, query-timeout?, metadata?, type-mapping?, depends*)>
This issue got fixed by breaking the "<!DOCTYPE " in the deploy/foobar-ds.xml file by turning it into a comment like "<!-- DOCTYPE " by adding "-- " into it.