Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> jdbc:odbc driver connection issues within the db JVM

jdbc:odbc driver connection issues within the db JVM

From: Oxnard <shankeypNO_SPAM_at_comcast.net>
Date: Sun, 9 Apr 2006 13:35:26 -0500
Message-ID: <m9ednaX4249szqTZnZ2dnUVZ_sCdnZ2d@comcast.com>


I need to use the jdbc:odbc driver to access a non-oracle db from a jsp. I am sure my dsn is fine as I can use a non JSP java app to connect to the odbc db. I have loaded the sun.jdbc.odbc classes in the schema I am working in as it is not loaded by default in 9.2.0.7 currently I am on a windows system. I have found the following:

public static void doTest()throws Exception{
// load the local Oracle Driver

DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver()); connLocalOracle = new OracleDriver().defaultConnection();

// load the odbc driver

Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); //
if I exit at this point the jsp does not through an exception however if I include the line:

connODBC = DriverManager.getConnection(odbcURL,"XX","XX");

I get the error:

SQL> execute do_jdbc_odbc_test;
BEGIN do_jdbc_odbc_test; END;

*
ERROR at line 1:
ORA-29532: Java call terminated by uncaught Java exception: java.lang.UnsatisfiedLinkError: sun.jdbc.odbc.JdbcOdbc.allocConnect ORA-06512: at "TU1.DO_JDBC_ODBC_TEST", line 0 ORA-06512: at line 1

So I am assuming I am loading the driver but the driver is not talking to the odbc configuration in windows.
What permissions would I need to give to the user to allow this connection to occur?
How can I find out if this is indeed the case? If not how can I make this connection happen using ODBC?

Thanks for your time. Received on Sun Apr 09 2006 - 13:35:26 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US