Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Jdbcodbc Bridge to servlet implementations problem

1 view
Skip to first unread message

Wray Smallwood

unread,
Jul 23, 1997, 3:00:00 AM7/23/97
to

I am attempting to implement a JDBCODBC Bridge using a Netscape
Fastrack Server on Windows 95. The purpose would be to invoke
a servlet that accesses a local database on the same system. Although
irrelevant to the troubleshooting, the ODBC compliant database is
MSACCESS 97. This eventually would be migrated to both an Enterprise
Server on Unix and an IIS server on NT.

The JDBCODBC servlet works great when run by calling it from a local
Java application.

(I also have had success in getting the servlet to open a dbAnywhere
connection from a browser using the Fastrack server, but this is a
different mechanism because it uses a different driver that doesn't
require a native library, i.e. it's pure Java, and the classes
are simply put in the Netscape local-classes directory)

However direct JDBCODBC bridge connections from the server have been
a no win situation.

When I do a DriverManager.setLogStream(new FileOutputStream("jdbc.log"))
just before doing the DriverManager.getConnection(url,properties),
I find that I get the following log.

DriverManager.getConnection("jdbc:odbc:MyDatabase")
trying
driver[className=sun.jdbc.odbc.JdbcOdbcDriver,context=null,sun.jdbc.odbc.JdbcOdbcDriver@400138e8]
*Driver.connect (jdbc:odbc:MyDatabase)
JDBC to ODBC Bridge: Checking security
No SecurityManager present, assuming trusted application/applet
JDBC to ODBC Bridge 1.2001
Current Date/Time: Wed Jul 23 08:23:57 1997
Loading JdbcOdbc library
Unable to load JdbcOdbc library
java.sql.SQLException: Unable to load JdbcOdbc library
at sun.jdbc.odbc.JdbcOdbc.<init>(JdbcOdbc.java:91)
at sun.jdbc.odbc.JdbcOdbcDriver.initialize(JdbcOdbcDriver.java:321)
at sun.jdbc.odbc.JdbcOdbcDriver.connect(JdbcOdbcDriver.java:159)
at java.sql.DriverManager.getConnection(DriverManager.java:90)
..etc stack trace....
Unable to load JdbcOdbc library
Unable to allocate environment
getConnection: no suitable driver
java.sql.SQLException: No suitable driver
at java.sql.DriverManager.getConnection(DriverManager.java:110)

...etc stack trace...

This first error disquises itself as a SQLException: No Suitable driver
message, so the log was very useful.

I can duplicate this with the local servlet by deleting the jdbcodbc.dll
file in it's path, so it looks like the JdbcOdbc.class cannot find
the dll. However it's in my path and just about every other directory,
including the Java/bin directory for Netscape server (in the plugins),
the class directories themselves, the WINDOWS\SYSTEM directory, the
Netscape classes directory, the Netscape local-classes directory
(both in plugins) even the servlet directory has been tried.

Question: Has anyone successfully implemented anything similar to this.

If this worked it's a very viable alternative to using any sort of
pure Java driver to access an ODBC compliant database, because the
servlet can be put on the same system as a database. i.e. if Java can
access a database with a local JdbcOdbc application, then this would
work with any server that was servlet compliant including Netscape, IIS
and JavaServer.

Thornton Prime

unread,
Jul 27, 1997, 3:00:00 AM7/27/97
to

In article <33D628...@hp.com>, Wray Smallwood <wray_sm...@hp.com> wrote:
>I am attempting to implement a JDBCODBC Bridge using a Netscape
>Fastrack Server on Windows 95. The purpose would be to invoke
>a servlet that accesses a local database on the same system. Although
>irrelevant to the troubleshooting, the ODBC compliant database is
>MSACCESS 97. This eventually would be migrated to both an Enterprise
>Server on Unix and an IIS server on NT.

Netscape's server products do not yet support JNI as far as I
know. The JDBC-ODBC bridge depends on JNI.

Thornton

0 new messages