473,385 Members | 1,465 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Cant LOAD the Oracle Driver Error

hi,

Everytime i try to run the following code (which is a part of my
servlet):
try
{

Class.forName( "oracle.jdbc.driver.OracleDriver" );
DriverManager.registerDriver(new oracle.jdbc.OracleDriver());
}

catch(ClassNotFoundException e)
{
out.println("Could not load the driver");
e.printStackTrace ();
}

I seem to end up in an error that says "could not load the
driver", which i guess comes from my catch block above. Can anyone
explain why this is happening?

thanks in advance
sufia
Jul 17 '05 #1
1 4872


"sufia" <ze*******@yahoo.com> wrote in message
news:90**************************@posting.google.c om...
| hi,
|
| Everytime i try to run the following code (which is a part of my
| servlet):
| try
| {
|
| Class.forName( "oracle.jdbc.driver.OracleDriver" );
| DriverManager.registerDriver(new oracle.jdbc.OracleDriver());
| }
|
|
|
| catch(ClassNotFoundException e)
| {
| out.println("Could not load the driver");
| e.printStackTrace ();
| }
|
|
|
| I seem to end up in an error that says "could not load the
| driver", which i guess comes from my catch block above. Can anyone
| explain why this is happening?
|
| thanks in advance
| sufia

I would imagine that the jar containing the driver is not on your classpath.
Is the jar in your WEB_INF/lib directory?

--
-P
"Sometimes I feel so goddam' trapped by everything that I know"
Jul 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Paul | last post by:
hi, i'm getting the following error when i try to run the code below to connect to an oracle db: java.lang.ClassnotfoundException:oracle.jdbc.driver.OracleDriver java.sql.SQLException No...
1
by: simianphile | last post by:
OK, I had a problem that I've now fixed but I can't really understand what was causing it in the first place. I have an intranet site that uses basic authentication to allow users to view and...
3
by: David | last post by:
Hello all, I have been trying to use the OCI driver to connect to Oracle 9i, but have been getting the following error: java.sql.SQLException: Closed Connection at...
1
by: Eirik Tryggeseth | last post by:
During deployment of an application using distributed transactions managed under COM+ on an Oracle 9i RAC database, we encounter situations where the load balancing mechanisms in the RAC result in...
1
by: Bruce Hensley | last post by:
In Access 97, I have successfully created a DSN-less pass-thru query to Oracle using the MS ODBC For Oracle driver. I used a connection string like this: ODBC;Driver={Microsoft ODBC For...
5
by: petro | last post by:
Hello all, My asp.net web application works on my machine but I get the following error on our test web server, There is only one oracle home on the test server. Does anyone know how to resolve...
2
by: Crazy Cat | last post by:
Hi all, I am having trouble getting linked Oracle 9 server in MS SQL Server 2005 Express to work properly. My machine is running Windows XP. The Microsoft and Oracle OLE DB Providers have...
2
by: Ben | last post by:
Hi, I have a problem connecting to Oracle using and ODBC connection in a ASP.Net web page. The TNS Names works fine because when I create a DSN it works, and it works in SQL Plus. Here are...
3
by: zombiechewtoy | last post by:
I'm having trouble making an ODBC connection using VB.NET 2005. I have tried nearly every connection string found on connectionstrings.com, in almost every format I can think of. I have tried...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.