3 Replies Latest reply on May 14, 2010 9:19 AM by peterj

    driver-class doesn't make a difference -- Oracle

      I'm attempting to use an SQL logger to wrap a database driver. As part of the configuration I'm supposed to used the wrappers driver instead to the standard oracle driver.

       

      In trying to implement this I have discovered that the driver-class attribute doesn't matter. I have changed it to random text and tried to use the jdbc logger driver.

       

      In both cases I can happily connect to the oracle database as if I hadn't changed anything. It only complains if I don't put in a driver-class at all.

       

      My Datasource.....

       

      <local-tx-datasource>
              <jndi-name>jdbc/myDS</jndi-name>
              <connection-url>jdbc:oracle:thin:@localhost:1521:xe</connection-url>
              <driver-class>grrrr</driver-class>
              <user-name>user</user-name>
              <password>pass</password>   
              <min-pool-size>1</min-pool-size>
              <max-pool-size>2</max-pool-size>
              <blocking-timeout-millis>5000</blocking-timeout-millis>
              <idle-timeout-minutes>5</idle-timeout-minutes>
        </local-tx-datasource>

       

       

      Any help would be appreciated, I'm using Jboss 5 eap

       

       

      Thanks

       

       

      Steve

        • 1. Re: driver-class doesn't make a difference -- Oracle
          peterj

          Do you have another *-ds.xml file that define an Oracle data source? If so, all it takes is one to load the proper driver class, then when the URL is passed to the driver manager and it polls the driver classes, the Oracle driver will claim the URL.

          1 of 1 people found this helpful
          • 2. Re: driver-class doesn't make a difference -- Oracle

            Thanks for getting back to me Peter,

             

            Sorry about the delay in my response, it has been one of those weeks. I've just removed all other datasources from my file and the same issue still seems to be occurring.

             

            I've also searched through my jboss configuration and can't find a mention of 'OracleDriver'

             

             

            Regards

             

            Stephen

            • 3. Re: driver-class doesn't make a difference -- Oracle
              peterj

              Then there must be some code somewhere that is loading the Oracle driver class. If you add "-verbose:class" to the JVM options in the run script, the JVM will print out the classes loaded and the JAR file each one came from. With this setting you should be able to see the driver being loaded at some point; unfortunately that will not help you identify what is loading the driver.

               

              Just had another thought - look in the jmx console at what data sources are registered. Of course, this won't list cases where code is loading the driver.