Uploaded image for project: 'JBoss Enterprise Application Platform'
  1. JBoss Enterprise Application Platform
  2. JBEAP-16515

service created for first jdbc driver class in services/j.s.Driver has different name

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Blocker
    • 7.3.0.CD16
    • 7.3.0.CD16
    • JCA
    • None
    • Regression
    • Hide
      1. Deploy MySQL Connector/J 5 which has more classes defined in META-INF/services/java.sql.Driver
      2. add datasource using that driver
        [standalone@localhost:9990 /] deploy mysql-connector-java-5.1.38-bin.jar
        [standalone@localhost:9990 /] /subsystem=datasources/data-source=mysqlDS:add(connection-url="foo", driver-name="mysql-connector-java-5.1.38-bin.jar_com.mysql.jdbc.Driver_5_1", jndi-name="java:jboss/datasources/mysqlDS"
        {
            "outcome" => "failed",
            "failure-description" => {
                "WFLYCTL0412: Required services that are not installed:" => ["jboss.jdbc-driver.mysql-connector-java-5_1_38-bin_jar_com_mysql_jdbc_Driver_5_1"],
                "WFLYCTL0180: Services with missing/unavailable dependencies" => [
                    "jboss.driver-demander.java:jboss/datasources/mysqlDS is missing [jboss.jdbc-driver.mysql-connector-java-5_1_38-bin_jar_com_mysql_jdbc_Driver_5_1]",
                    "org.wildfly.data-source.mysqlDS is missing [jboss.jdbc-driver.mysql-connector-java-5_1_38-bin_jar_com_mysql_jdbc_Driver_5_1]"
                ]
            },
            "rolled-back" => true
        }
        
      Show
      Deploy MySQL Connector/J 5 which has more classes defined in META-INF/services/java.sql.Driver add datasource using that driver [standalone@localhost:9990 /] deploy mysql-connector-java-5.1.38-bin.jar [standalone@localhost:9990 /] /subsystem=datasources/data-source=mysqlDS:add(connection-url= "foo" , driver-name= "mysql-connector-java-5.1.38-bin.jar_com.mysql.jdbc.Driver_5_1" , jndi-name= "java:jboss/datasources/mysqlDS" { "outcome" => "failed" , "failure-description" => { "WFLYCTL0412: Required services that are not installed:" => [ "jboss.jdbc-driver.mysql-connector-java-5_1_38-bin_jar_com_mysql_jdbc_Driver_5_1" ], "WFLYCTL0180: Services with missing/unavailable dependencies" => [ "jboss.driver-demander.java:jboss/datasources/mysqlDS is missing [jboss.jdbc-driver.mysql-connector-java-5_1_38-bin_jar_com_mysql_jdbc_Driver_5_1]" , "org.wildfly.data-source.mysqlDS is missing [jboss.jdbc-driver.mysql-connector-java-5_1_38-bin_jar_com_mysql_jdbc_Driver_5_1]" ] }, "rolled-back" => true }

    Description

      discovered with WildFly 16

      WFLY-11352 changed the way how services for JDBC driver classes are created when there are more drivers in META-INF/services/java.sql.Driver

      Before WFLY-11352 created services had names like

      jar_name_driverClassName1_majorVersion_minorVersion;
      jar_name_driverClassName2_majorVersion_minorVersion;
      

      After WFLY-11352 it is

      jar_name
      jar_name_driverClassName2_majorVersion_minorVersion;
      

      For first driver in META-INF/services/java.sql.Driver service name is just jar name. Which is expected resolution of WFLY-11352, but this change breaks existing configurations which use old naming.

      Attachments

        Issue Links

          Activity

            People

              smaestri@redhat.com Stefano Maestri
              msimka@redhat.com Martin Simka
              Martin Simka Martin Simka
              Martin Simka Martin Simka
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: