Hi! All, thank all the people helping me with the problem. It seems that
it is class path problem. I am using JRun in NT. I put CLASSES111.zip
both in CLASSPATH for NT and in the classpath for JSM(JRun's
configuration). But my servlet still cannot find it. Finally, I unzipped
CLASSES111.zip under /jrun/servles directory. It works!

I am so puzzled. Where on earth I should put the path to CLASSES111.zip
to let the servlets work?

Thanks!

Xizhen Wang wrote:
>
> 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

Reply via email to