I'm trying to move my Tomcat web service to Wildfly 10. I thought it should be drag and drop into Wildfly's deployment folder and everything should be fine, but it seems not like that.
This is my MariaDB datasource definition in
standalone.xml
:Contribute to goldmann/wildfly-mariadb development by creating an account on GitHub.
then I put
mariadb-java-client-1.4.6.jar
and my WAR file into wildfly/standalone/deployments
, start the Wildfly, and error messages came into my eyes:I cannot let my service connect to DB, do I missed any step?
KaninchenKaninchen
1 Answer
If I look at your configuration, you setup the driver to be a module. So you create it as a module in your server rather than deploying it as a separate jar in the deployments folder.
![Wildfly Mariadb Standalone.xml Wildfly Mariadb Standalone.xml](https://2.bp.blogspot.com/-lvYn9UfmZrE/WXrfvUDAICI/AAAAAAAAbgs/rjYqL37scBcHD2poMx4ZuXiwI7VjBCDcwCLcBGAs/s1600/jboss-datasource-02.jpg)
If you want to setup a datasource where the driver is in the deployments folder, you do something like this:
No separate driver declaration needed, its all contained within the datasource configuration.
GimbyGimby4,05522 gold badges2525 silver badges3838 bronze badges
Not the answer you're looking for? Browse other questions tagged javatomcatwildflyjndi or ask your own question.
Create an SSL certificate
The commands required to create a self-signed certificate for WildFly are shown below:
Enable SSL
If your application includes lines similar to this in its web.xml file, you are forcing secure connections to WildFly:
To achieve this, you must first enable SSL connections in WildFly. Follow the steps below:
- Make sure that you have a SSL certificate for WildFly stored in a keystore. Read more about this in the WildFly documentation.
- Edit your WildFly server configuration file at /opt/bitnami/wildfly/standalone/configuration/standalone.xml and add a new security realm as shown below:
- Modify the default listener in your WildFly configuration file above:
- Restart the WildFly server.