File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JDBC and Relational Databases and the fly likes sun.jdbc.odbc.JdbcOdbcDriver Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "sun.jdbc.odbc.JdbcOdbcDriver" Watch "sun.jdbc.odbc.JdbcOdbcDriver" New topic


Vernon Gibson
Ranch Hand

Joined: Dec 01, 2000
Posts: 35
I posted this question under JSP's and responded to my own question prematurely.
I've developed a jsp with the java code embeded in the HTML document. This page has no problem finding class sun.jdbc.odbc.JdbcOdbcDriver.
I then ported the java code to a Bean, and when it executes I get a ClassNotFound exception trying to find sun.jdbc.odbc.JdbcOdbcDriver.
Both modules were run in the same environment: NT, IIS, JRun, MySQL.
Anyone got any ideas?
Monty Ireland
Ranch Hand

Joined: Oct 03, 2000
Posts: 161
You need to put your JDBC DRIVER into your CLASSPATH...
Depending on which container you are using... you may need to define you driver to your server.
Hope this helps... I'm a few weeks behind you on this one...

Multi-Platform Database Developer

Multi Platform Database Developer & DBA on E.S.T.
Vernon Gibson
Ranch Hand

Joined: Dec 01, 2000
Posts: 35
Thanks Monty,
But it seems that the class was not being found because of a problem with my properties files. When I hardcoded the driver string and url the program works fine.
Now to debug my properties logic.....
Thomas Paul
mister krabs
Ranch Hand

Joined: May 05, 2000
Posts: 13974
If you are using a properties file, you need to make sure that the properties file is accessible. I'm not sure what directory JRun searches in if you don't specify a path. Try putting it in various directories in the JRun direcory structure until you get a hit.

Associate Instructor - Hofstra University
Amazon Top 750 reviewer - Blog - Unresolved References - Book Review Blog
Vernon Gibson
Ranch Hand

Joined: Dec 01, 2000
Posts: 35
Hi Tom,
Your suggestion was right on the button. Since I'm deploying my application on the default server, my properties file needed to be in the default folder, versus the jrun/lib folder where all of the other properties files are found.
I agree. Here's the link:
subject: sun.jdbc.odbc.JdbcOdbcDriver
It's not a secret anymore!