hi,
   I an trying to connect to an oracle database with the code given below.I
am getting the error

   java.lang.NoClassDefFoundError: oracle/jdbc/driver/OracleDriver.

I have got oracle111.zip(drivers) installed and i have given it in class
path when i compiled the program.could anybody help me out?
                          Thanks
                                                vinay


import javax.servlet.*;
import javax.servlet.http.*;
import java.io.*;
import java.sql.*;
import oracle.jdbc.driver.*;

public class testdata extends HttpServlet {
   Connection con;
    public void init(ServletConfig config) throws ServletException {
try{
             super.init(config);
             Class.forName("oracle.jdbc.driver.OracleDriver");
             DriverManager.registerDriver(new
oracle.jdbc.driver.OracleDriver());
con=DriverManager.getConnection("jdbc:oracle:thin:@database","user","password");
}catch(Exception e) {
    System.out.println(e);
}
}
}


_______________________________________________________________
Get Free Email and Do More On The Web. Visit http://www.msn.com

___________________________________________________________________________
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