If you are deploying in jboss AS7, then you have to make sure that
a) the datasource is defined in standalone.xml file
b) Use your own transaction manager lookup class (not BTMTransactionManagerLookup) in persistence.xml [Look at https://community.jboss.org/message/646526#646526]