JBoss (WildFly) Standalone XML Configuration For Mysql
Answered
Hi,
I changed wildfly's standalone.xml configuration and add a module folder for mysql. My database has a schema called it2526.
But server cannot connect to database; first two line of the error message is this:
22:00:22,351 ERROR [org.jboss.msc.service.fail] (ServerService Thread Pool -- 74) MSC000001: Failed to start service jboss.persistenceunit."ECommerce_v2_war_exploded.war#NewPersistenceUnit": org.jboss.msc.service.StartException in service jboss.persistenceunit."ECommerce_v2_war_exploded.war#NewPersistenceUnit": javax.persistence.PersistenceException: [PersistenceUnit: NewPersistenceUnit] Unable to build Hibernate SessionFactory
Configurations are between line 151 and 165.
I also add mysql-connector-java-8.0.15.jar file to wildfly-16.0.0.Final ▸ modules ▸ system ▸ layers ▸ base ▸ com ▸ mysql ▸ main folder and its module.xml
These configurations are working on Eclips projects BTW but I would like to work on IntelliJ.
Thank you,
Please sign in to leave a comment.
IDE uses the standalone.xml file from the JBoss installation.
Do you have JBoss logs with full error/exception? Right now it is not clear what the root cause of the error might be.
Compare and make sure the artifact structure you deploy in Eclipse is the same in in IntelliJ IDEA.
Make sure to check with the version from https://www.jetbrains.com/idea/download
Thank you for your reply Andrey Dernov
This is the Error Log
Jboss can not connect to database due to incorrect user/password:
Make sure you use the same configuration in Eclipse as you do in IntelliJ IDEA. Note that IDE only starts the Wildfly server with the configuration provided. The log shows that the standalone.xml from the /Library/WildFly/wildfly-16.0.0.Final/standalone/configuration/ directory is used. So if it fails it means that the configuratio is not correct. Double check you set it all right, consult the Wildfly documenation: http://docs.wildfly.org/16/Admin_Guide.html#DataSource
Thank you for your response Andrey.
I found the solution here https://stackoverflow.com/questions/22749570/wildfly-configuration-with-datasource
Thank you,