1 Reply Latest reply on Aug 19, 2003 1:01 PM by kflagg

    Sybase: wrong driver class?

    kflagg

      Hi. I've been trying to set up Sybase as a datasource for Jboss 3.2.2RC2 with Tomcat. My sybase-ds.xml file is:


      <local-tx-datasource>
      <jndi-name>jdbc/SybaseDB</jndi-name>
      <!-- Sybase jConnect URL for the database.
      NOTE: The hostname and port are made up values. The optional
      database name is provided, as well as some additinal Driver
      parameters.
      -->
      <connection-url>URL=jdbc:sybase:Tds:host:port/mydb?charset=iso_1&JCONNECT_VERSION=5</connection-url>
      <driver-class>com.sybase.jdbc2.jdbc.SybDataSource</driver-class>
      <user-name>x</user-name>
      y
      <exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.SybaseExceptionSorter</exception-sorter-class-name>
      </local-tx-datasource>



      When I attempt to get a connection, I get the following jboss resource exception:

      org.jboss.resource.JBossResourceException: Apparently wrong driver class specified for URL

      If I change the driver class to SybDriver, it leaves out the "Apparently" bit. I've been unable to set up Sybase as an XADataSource becase a) there is no setURL method in the SybXADataSource or SybDataSource classes and b) the class org.jboss.pool.jdbc.xa.wrapper.XADataSourceImpl does not seem to come with the latest JBoss distro.

      So, I am wondering if anyone has had success getting Sybase to work with JBoss, and precisely how they did it.

        • 1. Re: Sybase: wrong driver class?
          kflagg

          Never mind, the URL was incorrect - I took out the URL= at the beginning and everything worked fine.

          It would still be interesting to find out how to set it up as an XADataSource, though. I got the XADataSourceImpl from jboss2.4 but it required an older version of log4j and I didn't want to get into a situation where I was compromising the version integrity of the system.