I\'m new in developing apps in JBoss so I followed their tutorials specially in making the Ticket Monster. For now, I\'ve created an Event JPA Entity and in the run, it shows th
So after I posted on the jboss forum, here's the link Wildfly 10: Cannot upload deployment , Wolfgang Mayer answered that I should not declared a datasource more than once. Here's the step.
1.You can set a datasource via your Admin Console(localhost:9990) or via your Project(*-ds.xml), not both. Please remember the JNDI(Java Naming and Directory Interface) of your Datasource.
Example:
Datasource
Name:PostgresDS
JNDI:java:/PostgresDS
Connection URL:
jdbc:postgresql://host:port/databasename
2.Tell your project or war to use your datasource you've created. Edit your pesistence.xml and put the JNDI of your datasource.
Example:
java:/PostgresDS
3.(Optional) If you created your datasource in Admin Console, delete your *-ds.xml file in your project folder to prevent the "Datasource is already registered" error.