And have you configured your classpath to include the classes111.zip into
your servlet servlet configuraci�n?
Eric
-----Mensaje original-----
De: Xizhen Wang <[EMAIL PROTECTED]>
Para: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
Fecha: martes 22 de junio de 1999 17:49
Asunto: Connecting to Oracle failed?
>Hi! All, I use JDBC to connect a servlet to ORACLE, but there is always
>an
>error message while connecting -- "java.lang.ClassNotFoundException:
>oracle/jdbc/driver/OracleDriver [oracle.jdbc.driver.OracleDriver]". But
>I have installed oracle.jdbc.driver.OracleDriver (CLASSES111.zip) on the
>machine on which servlet is running.
>
>below is my code:
>
> final String URL="jdbc:oracle:thin@apollo:1521:USERS";
> //apollo is the server where Oracle is installed.
> //1521 is the port number. Do I need to specify it? How?
> //USERS is sid
>
> final String dbUserID = "steve";
> final String dbPassword = "smart";
>
> // set up connection property
> Prop = new Properties();
> Prop.put("user", dbUserID);
> Prop.put("password", dbPassword);
>
> try{
> DriverManager.registerDriver(new
oracle.jdbc.driver.OracleDriver());
>
> con = DriverManager.getConnection(URL, Prop);
>
> } catch( Exception e ){
> throw (new DBException("Database Connection Failed. " +
>e.toString()));
> }//this is where the error is from.
>
>
>Can anyone help?
>Thanks a lot!
>
>___________________________________________________________________________
>To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
>of the message "signoff SERVLET-INTEREST".
>
>Archives: http://archives.java.sun.com/archives/servlet-interest.html
>Resources: http://java.sun.com/products/servlet/external-resources.html
>LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html