Re: Unable to load JdbcOdbc library

From: Kingsley Idehen (kidehen_at_openlinksw.com)
Date: 10/15/04


Date: Fri, 15 Oct 2004 20:35:33 GMT

10/11/2004 11:55:40 AM
SteveE <steveedw@yahoo.com> wrote in message
<7641d758.0410110755.6ea5a965@posting.google.com>

> I am trying to connect to an Informix database on a stand-alone
> Solaris server. The database only exposes ODBC for external
> connections, not JDBC.
>
> On a PC I set up a system DSN for the database under ODBC, then
using
> JdbcOdbc bridge am able to successfully access the database
> successfully.
>
> On the Solaris side (where our code has to run from), we have the
> Solaris OpenLink ODBC driver loaded. Using the odbctest program,
we
> are able to connect to the database successfully. However, when I
try
> to run our JAVA application and access via the JdbcOdbc bridge, a
> NullPointerException is thrown, and I get the message "Unable to
load
> JdbcOdbc library".
>
> My JDK version is j2se1.4.1.01.
>
> --- code snip ---
> // Note that in real code, server, uid and pwd were
provided
> String url =
> "jdbc:odbc:cms;SERVER=<server>;UID=<userid>;PWD=<password>;";
>
> try
> {
> Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
>
> ((sun.jdbc.odbc.JdbcOdbcDriver)
> DriverManager.getDriver("jdbc:odbc:cms")).setWriter(new
> java.io.PrintWriter(System.err));
> //Class.forName("com.informix.jdbc.IfxDriver");
> Connection conn = DriverManager.getConnection(url);
>
> --- end code snip ---
>
> --- output ---
> *Driver.connect (jdbc:odbc:cms;SERVER=<server>;UID=<userid>;
PWD=<password>;)
> JDBC to ODBC Bridge: Checking security
> No SecurityManager present, assuming trusted application/applet
> JDBC to ODBC Bridge 2.0001
> Current Date/Time: Mon Oct 11 11:40:53 EDT 2004
> Loading JdbcOdbc library
> Unable to load JdbcOdbc library
> Exception occurred
> java.lang.NullPointerException
> at sun.jdbc.odbc.JdbcOdbcDriver.initialize(JdbcOdbcDriver.
java:435)
> at sun.jdbc.odbc.JdbcOdbcDriver.connect(JdbcOdbcDriver.
java:153)
> at java.sql.DriverManager.getConnection(DriverManager.
java:512)
> at java.sql.DriverManager.getConnection(DriverManager.
java:193)
> at com.yd.test.TestOdbc.runTest(TestOdbc.java:37)
> at com.yd.test.TestOdbc.main(TestOdbc.java:23)
> --- end output ---
OpenLink does provides an alternative ODBC-JDBC Bridge Driver that
will work with our Solaris based ODBC Driver for Informix.
Information on the Single-Tier Edition of this JDBC-ODBC Driver is
available at: http://uda.openlinksw.com/jdbc/st/jdbc-odbc-st/

Regards,

Kingsley Idehen Weblog: http://www.openlinksw.com/blog/~kidehen
OpenLink Software Web: http://www.openlinksw.com
Universal Data Access & Universal Integration Middleware Providers.



Relevant Pages

  • Re: Unable to load JdbcOdbc library
    ... The database only exposes ODBC for external ... > On the Solaris side, ... IBM offers a 100% Java driver for Informix ...
    (comp.lang.java.databases)
  • Unable to load JdbcOdbc library
    ... I am trying to connect to an Informix database on a stand-alone ... On a PC I set up a system DSN for the database under ODBC, ... On the Solaris side, ... JDBC to ODBC Bridge: Checking security ...
    (comp.lang.java.databases)
  • Re: Trying to create a database in a MS Access DB via JDBC drivers
    ... > Access maps one database to ... > bridge you can access to a db ... > either via DSN (see ODBC ...
    (comp.lang.java.databases)
  • Re: Trying to create a database in a MS Access DB via JDBC drivers
    ... > Access maps one database to ... > bridge you can access to a db ... > either via DSN (see ODBC ...
    (comp.lang.java.programmer)
  • Re: Nameless CREATE
    ... The starting point is either an existing database or one that is ... "Describe" involves issuing an SQLDescribeCol function to ODBC ... essentially much the same as character data type apart from all 8 bits ... ALTER TABLE tablename ADD COLUMN BinaryColumn BINARY ...
    (comp.lang.forth)