File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Linux / UNIX and the fly likes Hello Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Linux / UNIX
Bookmark "Hello " Watch "Hello " New topic


mahendranag manchinasetty

Joined: Dec 30, 2008
Posts: 4
Hello friends,

This is my error iam not getting any output iam getting this java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver .even i set class path also .i am getting this java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver ..what to do with this.can any one slove this please.this is my program..

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.ResultSetMetaData;
import java.sql.SQLException;

import javax.servlet.*;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public class getting extends HttpServlet
public void doGet(HttpServletRequest request,HttpServletResponse response)throws ServletException,IOException
PrintWriter pw=response.getWriter();
Connection con = null;
String url="jdbc racle:thin:@localhost:1521 atab";
PreparedStatement pst=con.prepareStatement("Select * from empsal");
ResultSet rs=pst.executeQuery();
ResultSetMetaData rsmd=rs.getMetaData();
int no=rsmd.getColumnCount();
pw.println("The name of the columns are:
for(int i=0;i<=no;i++)
String s=rsmd.getColumnName(i);
catch(Exception e)

Peter Lawrey
Ranch Hand

Joined: Dec 21, 2008
Posts: 62
> Hello.
Hello. How are you doing?

> .i am getting this java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver
Sounds like it could not find the class OracleDriver. It has to be in one of the jars in your class path.
It could be one of these Find Jar for OracleDriver
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 17410

A long time ago, Oracle distributed the driver in a file named

You shouldn't be using that one, since it changed in Oracle 9, and Oracle 8 is no longer supported that I know of.

However, the classpath jars have to have names ending in ".jar", so the had to be renamed.

An IDE is no substitute for an Intelligent Developer.
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 15082

Welcome to JavaRanch. Please use a meaningful subject line when you post a question.

Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 8 API documentation
I agree. Here's the link:
subject: Hello
jQuery in Action, 3rd edition