8 Replies Latest reply on Jul 24, 2002 9:18 AM by David Jencks

    JDBC-ODBC  examle service xml

    seshu kumar Newbie

      I have a proprietery database which allows querying through a C API and ODBC.

      For now I want to use jdbc-odbc bridge.
      How do i write the service xml for this resource??

        • 1. Re: JDBC-ODBC  examle service xml
          David Jencks Master

          I think the ms access example also uses jdbc-odbc, you could try starting with that. My understanding is that due to limitations of the jdbc-odbc driver this is not going to be very usable in a multi-user environment, but I've never tried it.

          • 2. Re: JDBC-ODBC  examle service xml
            seshu kumar Newbie

            Can you tell me where i can get the example of msaccess.

            • 3. Re: JDBC-ODBC  examle service xml
              Tung Dang Novice

              Here is the url, where the service files locate:


              You find one for ms access, too.


              • 4. Re: JDBC-ODBC  examle service xml
                Feroz Newbie


                I am trying to connect to an MS Access DB using JDBC-ODBC bridge. I downloaded the msaccess-service.xml and msaccess-ds.xml files from the CVS. Modified the DS and JNDI name in the the files and placed both of them into the default/deploy folder. It deploys the service file allright, but for the ds file, i get the message saying "Waiting for appropriate deployer". Anyway, none of the other samples seem to have the DS file. Can anyone explain to me what do I do with this file. Moreover, when I try to get the DataSource, I get a NameNotFound exception.
                Has anyone successfully connected to MS Access DB, please respond.


                • 5. Re: JDBC-ODBC  examle service xml
                  David Jencks Master

                  You need to be very careful to match the cvs version of the sample file with the version of jboss you are using. I don't know a good way to automate this.

                  The -ds.xml files ONLY work with cvs HEAD (3.1) as of 7/23/2002, and the cvs HEAD (3.1) versions are incompatible with Branch_3_0 (3.0.1).

                  The msaccess-service.xml file, like all the other examples, was submitted by someone who claimed to have gotten it working. I see no reason to doubt this. With the exception of hsqldb-ds.xml, all the -ds.xml files are untested, I wrote them based on the -service.xml files.

                  • 6. Re: JDBC-ODBC  example : JDK1.3 and ODBC Version
                    seshu kumar Newbie

                    I have one more problem.

                    For now I'm not using Datasource. I'm directly using jdbc code in my EJB.

                    I get the following errors when i connect,
                    a) Unsupported Result set type
                    b)When the connection is being finalised i get an EXCEPTION ACCESS VIOLATION error and jBoss crashes.

                    I tried it with standalone java program using jdk1.3 i get the same crash (Dr Waatson error)

                    The documentation of my ODBC driver says it is compliant with ODBC 2 and also ODBC 3.

                    The same code works well with jdk1.2.2.

                    How do i rectify this?

                    • 7. Re: JDBC-ODBC  example : JDK1.3 and ODBC Version
                      seshu kumar Newbie

                      I'm pasting the actual exception trace

                      a) First this error occurs in my bean

                      java.sql.SQLException: The result set type is not supported.
                      at sun.jdbc.odbc.JdbcOdbcStatement.initialize(JdbcOdbcStatement.java:156)
                      at sun.jdbc.odbc.JdbcOdbcConnection.createStatement(JdbcOdbcConnection.java:420)
                      at sun.jdbc.odbc.JdbcOdbcConnection.createStatement(JdbcOdbcConnection.java:394)
                      at eai.common.IP21Adaptor.getProcessTagConfigInfo(IP21Adaptor.java:285)

                      b) After some time, (when gc is collecting the connection)i get

                      An unexpected exception has been detected in native code outside the VM.
                      Unexpected Signal : EXCEPTION_ACCESS_VIOLATION occurred at PC=0xb3e4b20
                      Function name=(N/A)

                      NOTE: We are unable to locate the function name symbol for the error
                      just occurred. Please refer to release documentation for possible
                      reason and solutions.

                      Current Java thread:
                      at sun.jdbc.odbc.JdbcOdbc.freeStmt(Native Method)
                      at sun.jdbc.odbc.JdbcOdbc.SQLFreeStmt(JdbcOdbc.java:2762)
                      at sun.jdbc.odbc.JdbcOdbcStatement.close(JdbcOdbcStatement.java:483)
                      at sun.jdbc.odbc.JdbcOdbcStatement.finalize(JdbcOdbcStatement.java:78)
                      at java.lang.ref.Finalizer.invokeFinalizeMethod(Native Method)
                      at java.lang.ref.Finalizer.runFinalizer(Finalizer.java:86)
                      at java.lang.ref.Finalizer.access$100(Finalizer.java:17)
                      at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:163)

                      • 8. Re: JDBC-ODBC  example : JDK1.3 and ODBC Version
                        David Jencks Master

                        I'd say contact your db/driver vendor for these problems, they appear to have nothing to do with jboss. I suspect some java code needs to be recompiled on a post-1.2.2 jvm. For instance, the Interbase Interclient driver as supplied from Borland did not work on jdk 1.3 unless recompiled from source.