FYI, in addition to the workaround of removing the persistence provider from the persistence.xml, you could also include another persistence unit property:
<property name="jboss.as.jpa.classtransformer" value="false"/>
Thank you for providing the test case and jira!
Scott
Where do I find documentation for such property?
I'll try and let you know.
The jboss.as.jpa.classtransformer setting shouldn't have an impact but it does, due to the bug that you reported.
jboss.as.jpa.classtransformer is described at https://docs.jboss.org/author/display/WFLY10/JPA+Reference+Guide#JPAReferenceGuide-Persistenceunitproperties. Once the bug fix for WFLY-6099 is applied, then you will not need jboss.as.jpa.classtransformer to be specified in your persistence.xml.
Thanks a lot, Scott!
So, to summarize, you have to change your persistence provider in persistence.xml from:
<provider>org.hibernate.ejb.HibernatePersistence</provider>
To:
<provider>org.hibernate.jpa.HibernatePersistenceProvider</provider>
And change the datasource in your application.xml from:
<class-name>org.mariadb.jdbc.Driver</class-name>
To (or whatever class implements the DataSource interface:
<class-name>org.mariadb.jdbc.MariaDbDataSource</class-name>
The last commit in the repository also is showing it now: renannprado/datasource_application_xml_test... - GitHub