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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Connecting to DB crashes Java

Re: Connecting to DB crashes Java

From: Martin Brehovsky <breh_at_kma.zcu.cz>
Date: Thu, 09 Mar 2000 11:05:53 +0100
Message-ID: <38C77781.49630612@kma.zcu.cz>

Dare Obasanjo wrote:

> Everytime I try to connect to my database using jdbc Java crashes on me.
>
> I use jdk1.2.2 on an Oracle 8.1.5 database on Windows 98SE. Here's my
> problem
>
> /*
> DB access method 1
> ---------------------
> ry{
> Class.forName("oracle.jdbc.driver.OracleDriver");
> }catch(ClassNotFoundException e){
> System.out.println("Could not load Oracle Driver");
> }
>
> String user, pass;
> user = readEntry("userid: ");
> pass = readEntry("password: ");
> Connection conn =
> DriverManager.getConnection("jdbc:oracle:oci8:"+user+"/"+pass+"@orcl.25hoursaday.com");
>
> or
> DriverManager.getConnection ("jdbc:oracle:oci8:@", "scott", "tiger");
>
> or
> DriverManager.getConnection("jdbc:oracle:oci8:"+user+"/"+pass+"@");
>

Try to use thin drivers. I use them with jdk 1.2.2 and they work with oracle 8.1.5 and 7.3.2 as well. (tested on WindowsNT and Solaris 2.6)

Martin
--



Martin Brehovsky (breh_at_kma.zcu.cz)
Department of Mathematics, Section of Geomatics Faculty of Applied Sciences, University of West Bohemia
Received on Thu Mar 09 2000 - 04:05:53 CST

Original text of this message

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