[jboss-jira] [JBoss JIRA] (WFLY-11352) WildFly registers multiple distinct drivers for current MySQL driver jar

Stephen Fikes (Jira) issues at jboss.org
Wed Nov 14 16:33:00 EST 2018


    [ https://issues.jboss.org/browse/WFLY-11352?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13661647#comment-13661647 ] 

Stephen Fikes commented on WFLY-11352:
--------------------------------------

Workarounds are:

# Run once then use the name reported at startup to reference the driver in the datasource (e.g. {{mysql-connector-java-5.1.44-bin.jar_com.mysql.jdbc.Driver_5_1}})
# Edit the MySQL driver's {{META-INF/services/java.sql.Driver}} file and remove the second entry (i.e. the entry for {{com.mysql.fabric.jdbc.FabricMySQLDriver}})
# Deploy the driver as a module

> WildFly registers multiple distinct drivers for current MySQL driver jar
> ------------------------------------------------------------------------
>
>                 Key: WFLY-11352
>                 URL: https://issues.jboss.org/browse/WFLY-11352
>             Project: WildFly
>          Issue Type: Bug
>          Components: JCA
>    Affects Versions: 14.0.1.Final
>            Reporter: Stephen Fikes
>            Assignee: Stefano Maestri
>            Priority: Major
>
> When MySQL drivers are deployed as jars (rather than [modules|https://issues.jboss.org/browse/WFLY-3218]), multiple named drivers:
> ... INFO  [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-3) WFLYJCA0005: Deploying non-JDBC-compliant driver class com.mysql.jdbc.Driver (version 5.1)
> ... INFO  [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-3) WFLYJCA0005: Deploying non-JDBC-compliant driver class com.mysql.fabric.jdbc.FabricMySQLDriver (version 5.1)
> ... INFO  [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-1) WFLYJCA0018: Started Driver service with driver-name = mysql-connector-java-5.1.44-bin.jar_com.mysql.jdbc.Driver_5_1
> ... INFO  [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-1) WFLYJCA0018: Started Driver service with driver-name = mysql-connector-java-5.1.44-bin.jar_com.mysql.fabric.jdbc.FabricMySQLDriver_5_1
> Consequently, references to the driver by name (such as the below) fail to resolve
> {code}
>                 <datasource jndi-name="java:jboss/datasources/mysql" pool-name="MySQL" enabled="true">
>                     ...
>                     <driver>mysql-connector-java-5.1.44-bin.jar</driver>
>                     ...
>                 </datasource>
> {code}
> This issue was [already resolved|https://issues.jboss.org/browse/WFLY-3218] for the case where a module was used to deploy the driver.



--
This message was sent by Atlassian Jira
(v7.12.1#712002)


More information about the jboss-jira mailing list