Re: JDBC driver setup in UNIX

From: Glenn McCall <glenn.mccall_at_ncr.com>
Date: Fri, 5 Dec 2003 16:26:06 +1100
Message-ID: <3fd016f3_at_rpc1284.daytonoh.ncr.com>


Below...

"Jim" <folaany _at_yahoo.com> wrote in message news:5xTzb.59916$Y4R1.22103_at_news04.bloor.is.net.cable.rogers.com...
> Hello,
>
> I am writing a Java program to access Oracle
> database using JDBC. My program works in
> Windows but when I run it in Unix, it shows
> the "SQLException: No suitable driver" error
> message at run time.

This error occurs because it can't find the driver it needs typically because the driver is not installed and/or the classpath is not set up to point to the driver.

>
> I think the driver or environment variables
> like Classpath might not be correctly set up
> in Unix, and I don't what to do.

I am not sure what you don't want to do (or don't know what to do), but you have to have the driver installed and your classpath has to point to it. Also any additional requirements of the driver will need to be satisfied. For example if you are *not* using a Type 4 driver, you might need to set up some gateway software etc.

If you are using a Type 4 driver, at worst case, you should be able to copy the .class or .jar files representing the driver to Unix and worst case stick them in your home directory and extend the classpath to access them. I wouldn't recommend doing this except to try it out. Imaging the chaos if everyone did this?
Ideally, the JDBC driver would be installed in a location that is accessible to everyone and the administrator set the classpath for the system to reference the JDBC driver files.

>
> My Unix system is Solaris with BASH shell.
>
> Could any body, please let me know how can I
> fix the problem.
>
> Thanks.
>
>
>
>
Received on Fri Dec 05 2003 - 06:26:06 CET

Original text of this message