• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JDBC help required.

 
Suresh Selvaraj
Ranch Hand
Posts: 104
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I 've developed a JSP that accesses Oracle database. I get an error stating "oracle.jdbc.driver.OracleDriver" not found.
Here are the statements...
<%@ page import="java.io.*, javax.servlet.jsp.*, java.sql.*" %>
<%@ page import="java.net.*, javax.servlet.jsp.*, javax.servlet.* " %>
<%@ page import="javax.servlet.http.*" %>
<%@ page import="oracle.jdbc.driver.*" %>
<h4>Metrics Report Generation System</h4>
<%<br /> Class.forName("oracle.jdbc.driver.OracleDriver");
//DriverManager.registerDriver( new oracle.jdbc.driver.OracleDriver() );
Connection con;
// con=DriverManager.getConnection("jdbc racle ci8:@", "userID", "PSWD");
con=DriverManager.getConnection("jdbc racle:thin:@st052:1521:ORCL", "userID", "PSWD");
I am using Javawebserver2.0 just for Testing this application.
The classpaths have SERVLET.jar and JSP.jar.
I even tried to create a jar file containing the oracle driver classes and concatenated to the above mentioned class path.
Can anybody help in solving this problem.
Thanks in advance,
Suresh Selvaraj

[This message has been edited by Thomas Paul (edited March 20, 2001).]
 
Thomas Paul
mister krabs
Ranch Hand
Posts: 13974
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The oracle driver should have been in a jar file to start with?! All you need to do is make sure that the jar file is in your classpath.
 
Suresh Selvaraj
Ranch Hand
Posts: 104
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Paul,
Thanks for your reply. After including the oracle.jar in the classpath and restarting the server, I was able to run the JSP successfully.
Thanks,
Suresh Selvaraj
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic