Uploaded image for project: 'Application Server 7'
  1. Application Server 7
  2. AS7-3020

Define and use different JDBC driver versions as modules

    XMLWordPrintable

Details

    • Hide

      define two separate modules

      Show
      define two separate modules

    Description

      When defining a JDBC driver as module and providing two versions as follows:

      JBOSS_HOME/modules/com/microsoft/sqlserver/main/
      JBOSS_HOME/modules/com/microsoft/sqlserver/2.0/

      with according jar and module.xml

      and defining the driver as follows in standalone.xml:

      <driver name="mssql" module="com.microsoft.sqlserver" major-version="2" minor-version="0">
      <xa-datasource-class>com.microsoft.sqlserver.jdbc.SQLServerXADataSource</xa-datasource-class>
      </driver>

      the following error is thrown:

      15:53:32,805 ERROR [org.jboss.as.controller] (ServerService Thread Pool – 25) -> JBAS014612: Operation ("add") failed - address: ([
      ("subsystem" => "datasources"),
      ("jdbc-driver" => "mssql")
      ]): java.lang.IllegalStateException: JBAS010435: Specified driver version doesn't match with actual driver version

      When debugging class JdbcDriverAdd, the slot main is always used.

      I also tried to configure the driver as:

      <driver name="mssql" module="com.microsoft.sqlserver" slot="2.0">
      or
      <driver name="mssql" module="com.microsoft.sqlserver:2.0">

      but this does not work and is also not foreseen as from the scheme.

      Also, there is no documentation of how to use major- and minor-version, only the following can be seen in the xsd:

      Specifies the major/minor version of this driver. If the major and minor version is omitted the first available Driver in module will be used.

      Attachments

        1. module_2.0.xml
          0.3 kB
        2. module_main.xml
          0.3 kB
        3. sqljdbc4_2.0.jar
          455 kB
        4. sqljdbc4_3.0.jar
          525 kB

        Activity

          People

            jgreene@redhat.com Jason Greene
            michael.voegele@cloudops Michael Voegele (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: