3 Replies Latest reply on Oct 26, 2011 10:37 AM by jesper.pedersen

    [Newbie] Cannot create a ODBC-JdBC Datasource

    michelmemeteau

      Hi, I'm a Jboss beginner .

       

       

      i want to connect to an access database and so am trying to use the SUN JDBC-ODBC bridge :

       

      in standalone.xml I added  a driver

       

         <driver name="com.gemalto.odbc" module="com.xxx.odbc">

                              <driver-class>sun.jdbc.odbc.JdbcOdbcDriver</driver-class>

                              <datasource-class>

                                  sun.jdbc.odbc.JdbcOdbcDriver

                              </datasource-class>

             </driver>

       

       

      And created the correct path in module  /com/xxx/odbc containing a module.xml :

       

       

      <module xmlns="urn:jboss:module:1.0" name="com.xxx.odbc">

        <resources>

          <resource-root path="rt.jar"/>

              <!-- Insert resources here -->

        </resources>

        <dependencies>

          <module name="javax.api"/>

        </dependencies>

      </module>

       

       

       

      I then created a DataSource that use this new  driver and get the following log at startup :

       

       

      New missing/unsatisfied dependencies:

            service jboss.jdbc-driver.com_xxx_odbc (missing)

       

       

       

      - If I use the same syntax but for MySQL JDBC driver it works great.

       

       

      Two questions :

       

       

      - How can I get a detailed log of the Phase where it tries to lookup the sun.jdbc.odbc.JdbcOdbcDriver class from the module info ? I guess it just cannot find the Class although it's right in the rt.jar of my JDK 1.6 ( I've tested with a sample java code that works with this ODBC driver)

       

       

      - Is this the right way to connect to this kind of JDBC driver ? I guess the fact that it's not JDBC 4.0 compliant has someting to do with my problem ?

       

       

       

      Regards