-
1. Re: Wildfly missing dependencies when trying to deploy after adding a persistence unit. Netbeans
mayerw01 May 16, 2016 12:27 PM (in response to popescustefanradu)How did you install the driver, as a module or via deployment?
-
2. Re: Wildfly missing dependencies when trying to deploy after adding a persistence unit. Netbeans
popescustefanradu May 16, 2016 12:34 PM (in response to mayerw01)The driver is inside the .WAR Based on that driver I made my data source,tested it and used it to create my hibernate reveng and pojo entities from the reveng.
I want to use the EM and I created the persistence.xml
When i press run in netbeans it recompiles my project and redeploys it on wildfly. That is when i get the error. If i remove the persistence.xml the error doesn't go away, do i have to remove the entire project.
-
3. Re: Wildfly missing dependencies when trying to deploy after adding a persistence unit. Netbeans
popescustefanradu May 16, 2016 4:12 PM (in response to mayerw01)Update. I put the mysql connector jar in deployment, outside of the .war and used that one for my datasource. Now instead of that error I get:
"{\"WFLYCTL0080: Failed services\" => {\"jboss.persistenceunit.\\\"WAD.war#WAD\\\"\" => \"org.jboss.msc.service.StartException in service jboss.persistenceunit.\\\"WAD.war#WAD\\\": java.lang.ClassCastException: org.dom4j.DocumentFactory cannot be cast to org.dom4j.DocumentFactory
Caused by: java.lang.ClassCastException: org.dom4j.DocumentFactory cannot be cast to org.dom4j.DocumentFactory\"}}"
-
4. Re: Wildfly missing dependencies when trying to deploy after adding a persistence unit. Netbeans
mayerw01 May 17, 2016 4:36 AM (in response to popescustefanradu)Such messages indicate a version mismatch.
To approach your problem I'd suggest that you first make sure that your driver is installed correctly. You may refer to JDBC Driver / DataSource Setup | HAL Management Console for more details.
I'd recommend Installing the driver as module (even in standalone mode). But I'd not recommend to use special characters (like dots) in your driver name.
You may verify that your driver is properly installed using jboss-cli, like: /subsystem=datasources/jdbc-driver=mysql:read-resource
You should then verify that your connection is working. This can also be done via cli: /subsystem=datasources/data-source=MySQLDatasourcename:test-connection-in-pool