ClassNotFoundException: oracle.jdbc.driver.OracleDriver



Hi.
I try play a little bit with a oracle, tomcat, apache. I setup apache,
tomcat, and the oracle 10g. Now I try login to my database by website using
jsp files.
Base on website : http://elab.bus.umich.edu/how-to-oracle-jsp.php
I made the page to pull up some records - just to see if this works.
When I point in the webbrowser to this file i receive error:

ClassNotFoundException: oracle.jdbc.driver.OracleDriver

When I am login on that server I can use sqlplus.
What could be problem?
I use a debian system with oracle10g, tomcat 5.5.9 and jdk1.5.

Please point me to some useful documents, examples.
Thanks for help.
Mariusz

Here is a code what I used:

<%@ page import="java.sql.*" %>
<HTML>
<HEAD><TITLE>Simple Oracle Example</TITLE></HEAD>
<BODY BGCOLOR="#FFFFFF">
<CENTER>
<B>Employees</B>
<BR><BR>

<%
Connection conn = null;
try
{
Class.forName("oracle.jdbc.driver.OracleDriver");

conn = DriverManager.getConnection(
"jdbc:oracle:thin:@192.168.1.20:1521:orcl",
"orauser",
"2005or");

Statement stmt = conn.createStatement();
ResultSet rs = stmt.executeQuery("SELECT * FROM NMS_DATA");

//Print start of table and column headers
out.println("<TABLE CELLSPACING=\"0\" CELLPADDING=\"3\"
BORDER=\"1\">");
out.println("<TR><TH>ID</TH><TH>NAME</TH></TR>");

//Loop through results of query.
while(rs.next())
{
out.println("<TR>");
out.println("<TD>" + rs.getString("EmpID") + "</TD>");
out.println("<TD>" + rs.getString("Name") + "</TD>");
out.println("</TR>");
}

out.println("</TABLE>");
}
catch(SQLException e)
{
out.println("SQLException: " + e.getMessage() + "<BR>");
while((e = e.getNextException()) != null)
out.println(e.getMessage() + "<BR>");
}
catch(ClassNotFoundException e)
{
out.println("ClassNotFoundException: " + e.getMessage() + "<BR>");
}
finally
{
//Clean up resources, close the connection.
if(conn != null)
{
try
{
conn.close();
}
catch (Exception ignored) {}
}
}
%>

</CENTER>
</BODY>
</HTML>
.



Relevant Pages

  • Re: ClassNotFoundException: oracle.jdbc.driver.OracleDriver
    ... > I try play a little bit with a oracle, tomcat, apache. ... I setup apache, ... * FirstSQL/J Object/Relational DBMS ...
    (comp.lang.java.databases)
  • Re: ClassNotFoundException: oracle.jdbc.driver.OracleDriver
    ... >> I try play a little bit with a oracle, tomcat, apache. ... I setup apache, ... Lee Fesperman, FFE Software, Inc. ...
    (comp.lang.java.databases)
  • RE: Cant pass form to sub/function and...
    ... I'll work the login form some more and see if that doesn't change anything. ... I'm sorry, but I don't have any experience using Oracle, so I guess there is ... Set rstEstData = CurrentDb.OpenRecordset ... I create a new recordset object. ...
    (microsoft.public.access.modulesdaovba)
  • Tomcat & Microsoft word seem to hate each other.
    ... HTTP Status 400 - Invalid Direct Reference to form login page ... Tomcat knows the user has ... Tomcat then redirects the browser to the main login page. ...
    (comp.lang.java.help)
  • Re: Login problem of oracle DB
    ... > When I login to oracle database, a strange problem occurs, here comes the ... Create database, sid = TEST. ... > Copyright 2000 Oracle Corporation. ...
    (comp.databases.oracle.server)