Skip to main content

Register MySQL On Wildfly 8(JBOSS SERVER 8)

This is quick trick to register MySQL on Wildfly 8.
 Goto WILDFLY_HOME/modules/system/layers/base/com and create another directories mysql/main
Inside the main directory, paste the myql.jar<version>  file inside  and create a "module.xml" file with the follow lines without the code

    <?xml version="1.0" encoding="UTF-8"?>
        <module xmlns="urn:jboss:module:1.1" name="com.mysql">
            <resources>
                <resource-root path="mysql-connector-java-5.1.30-bin.jar"/>
            </resources>
            <dependencies>
                <module name="javax.api"/>
                <module name="javax.transaction.api"/>
            </dependencies>
        </module>


After this, goto the wildfly[HOME]\standalone\configuration\standalone-full.xml
add the driver name.

     <datasources>
        {...}
        <drivers>
            {...}
            <driver name="mysql" module="com.mysql">
                <driver-class>com.mysql.jdbc.Driver</driver-class>
            </driver>
        </drivers>
    </datasources>


After this restart your server. Then proceed the JBoss management Web Page to configure your new datasource.

NB: make sure the datasource name is the same as the driver name you use above.

Reference: http://wildfly.org/news/2014/02/06/GlassFish-to-WildFly-migration/


Comments

Popular posts from this blog

Fix HTTP error code 513 on Wildfly

The Mysterious Case of TIME_WAIT and IDLE Connections Have you ever encountered a network issue where your server is consistently showing a high number of connections in the TIME_WAIT and IDLE states? This phenomenon can be frustrating, especially when it indicates that the connections are not being closed properly by the server or client. In our investigation, we found that the culprit behind this issue was an HTTP error code 513 being sent to clients from servers. This error code indicates that the server is overloaded and cannot handle more requests. Furthermore, the client was logging a socket close event, which meant it was terminating the connection prematurely. To replicate this issue, we used JMeter and found that the max concurrent connection limit was reached, resulting in an HTTP error code 513. The allowed queue was also full, contributing to the problem. So, what are the consequences of this issue? Performance degradation and resource wastage on both servers and clients ca...

Java Client SSL Setup and Related Errors

Troubleshooting Tips for Effective Configuration Configuring Secure Sockets Layer (SSL) is a crucial step in ensuring the security of your Java client's communication. In this article, we'll walk you through the process of configuring SSL and provide guidance on troubleshooting common errors that may arise during the setup. To troubleshoot issues effectively, follow these steps: - Enable the JVM option -Djavax.net.debug=all - Capture the network traffic dump for faster analysis. Certificate Setup Go to your console and access your <JAVA_HOME>/bin/keytool NB :  The default location for saving the generated files is the user home directory. You can change this by specifying a path. STEP 1: Generate a new key (private key) for a Keystore. This either creates a file called <KEYSTORE_NAME>.keystore or update an existing file if it already exists. The CSR which will be presented to a Certificate Authority (CA) will be generated with this key and alias. <J...