im trying to deploy a JPA rest application and getting the following error trying to deploy on Wildfly 10.
Error:
"{
\"WFLYCTL0412: Required services that are not installed:\" => [
\"jboss.naming.context.java.app.\\\"internal-1.0\\\".newDevConnection\",
\"jboss.naming.context.java.jboss.datasources.ExampleDS\"
],
\"WFLYCTL0180: Services with missing/unavailable dependencies\" => [
\"jboss.naming.context.java.module.\\\"internal-1.0\\\".\\\"internal-1.0\\\".DefaultDataSource is missing [jboss.naming.context.java.jboss.datasources.ExampleDS]\",
\"jboss.persistenceunit.\\\"internal-1.0.war#com.e24_MavenProjectTest_war_1.0-SNAPSHOTPU\\\" is missing [jboss.naming.context.java.app.\\\"internal-1.0\\\".newDevConnection]\",
\"jboss.persistenceunit.\\\"internal-1.0.war#com.e24_MavenProjectTest_war_1.0-SNAPSHOTPU\\\".__FIRST_PHASE__ is missing [jboss.naming.context.java.app.\\\"internal-1.0\\\".newDevConnection]\"
]
}"
persistance.xml
<persistence-unit name="app-pu" transaction-type="JTA">
<jta-data-source>java:/newDevConnection</jta-data-source>
<exclude-unlisted-classes>false</exclude-unlisted-classes>
<properties/>
</persistence-unit>
datasource in standalone.xml
<datasources>
<datasource jndi-name="java:/newDevConnection" pool-name="secret" enabled="true" use-java-context="true">
<connection-url>jdbc:mysql://secret...</connection-url>
<driver>mysql</driver>
<security>
<user-name>secret</user-name>
<password>secret</password>
</security>
</datasource>
<drivers>
<driver name="com.mysql" module="mysql.mysql-connector-java">
<xa-datasource-class>com.mysql.jdbc.jdbc2.optional.MysqlXADataSource</xa-datasource-class>
</driver>
<driver name="mysql" module="org.mysql">
<driver-class>com.mysql.jdbc.Driver</driver-class>
</driver>
</drivers>
</datasources>
Edit: mysql jdbc driver
is located in project/WEB-INF/lib
folder
And what is the difference in an "xa-datasource" and "non-xa-datasource"?
Am i on the right track here? thanks in advance / Marcus