user10501920
user10501920

Reputation: 1

How to use MySQL8.0.19 in JBoss 7.1.1?

I have to use Mysql 8.0.19 as database in Jboss-as-7.1.1
I put driver "mysql-connector-java-8.0.19.jar in "D:\jboss-as-7.1.1.Final\modules\com\mysqldatabase\mysql\main" and create module.xml

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

and I also edit "D:\jboss-as-7.1.1.Final\standalone\configuration\standalone.xml".

<datasource jndi-name="java:jboss/datasources/MySqlDS" pool-name="MySqlDS" enabled="true" use-java-context="true">
                    <connection-url>jdbc:mysql://localhost:3306/test</connection-url>
                    <driver>mysql</driver>
                    <security>
                        <user-name>root</user-name>
                        <password>123456</password>
                    </security>
                </datasource>

and driver

<driver name="mysql" module="com.mysqldatabase.mysql">
                        <driver-class>com.mysql.cj.jdbc.Driver</driver-class>
                        <xa-datasource-class>com.mysql.jdbc.jdbc2.optional.MysqlXADataSource</xa-datasource-class>
                    </driver>

But it doesn't work:

enter image description here

Upvotes: 0

Views: 820

Answers (1)

wfink
wfink

Reputation: 357

It seems that there is a problem with the XML. I would add the configuration and module step by step to locate the wrong XML. And check which editor you use with some Windows editors you might add unwanted chars.

Upvotes: 0

Related Questions