JBoss AS is sensitive to the format of the JDBC data source definiton XML file. It is common for people who have built one from scratch to experience deployment issues. To avoid these, please ensure that you follow the following rules:
1) The file name should always end with -ds.xml
2) Use a more advanced text editor than Windows Notepad such as UltraEdit, SlickEdit etc.
3) Save the text file in the UTF-8 format
4) Use UNIX-style line terminators (only the Line Feed character LF, not Carriage Return (CR) and LF as in Windows)
5) Choose not to add the Byte Order Mark (BOM). According to Unicode.org, BOM “…consists of the character code U+FEFF at the beginning of a data stream, where it can be used as a signature defining the byte order and encoding form, primarily of unmarked plaintext files…”. More details available here.