What is in your jboss-ds.xml file? You should have something like this:
<datasources> <local-tx-datasource> <jndi-name>jdbc/XWikiDS</jndi-name> . . . </local-tx-datasource> </datasource>
You might also have to add a WEB-INF/jboss-web.xml file to the xwiki war file:
<jboss-web> <resource-ref> <res-ref-name>jdbc/XWikiDS</res-ref-name> <jndi-name>java:jdbc/XWikiDS</jndi-name> </resource-ref> </jboss-web>
I got the same error, and after commenting the <resource-ref> out in the web.xml file I got another error. I didn't copy the error but it referenced the Log4j.jar file. I moved the [jboss-server-dir]\xwiki.war\WEB-INF\lib\log4j-1.2.13.jar file into another directory. There are probably other jar files that can be moved (deleted) so the jar files that ship with jboss are used.
After I got rid of the Log4j parse error I added in the jboss-web.xml file as PeterJ suggested with the modification "<jndi-name>java:/XWikiDS</jndi-name>" -- I removed the "jndi" after the colon.
After that it ran -- with other errors, but I managed to log in using "admin" and "admin" then importing the .xar example file. It's running -- for now. I'll be checking it out more later.