473,769 Members | 7,558 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.dr iver.OracleDriv er" );
DriverManager.r egisterDriver(n ew oracle.jdbc.Ora cleDriver());
}

catch(ClassNotF oundException e)
{
out.println("Co uld not load the driver");
e.printStackTra ce ();
}

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 4890


"sufia" <ze*******@yaho o.com> wrote in message
news:90******** *************** ***@posting.goo gle.com...
| hi,
|
| Everytime i try to run the following code (which is a part of my
| servlet):
| try
| {
|
| Class.forName( "oracle.jdbc.dr iver.OracleDriv er" );
| DriverManager.r egisterDriver(n ew oracle.jdbc.Ora cleDriver());
| }
|
|
|
| catch(ClassNotF oundException e)
| {
| out.println("Co uld not load the driver");
| e.printStackTra ce ();
| }
|
|
|
| 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
3148
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 suitable driver. i'm using jdk1.4 installed on a Windows NT 2000 machine. I don't have any oracle client installed on my machine. I'm basically connected to
1
2891
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 update information from an Oracle DB (ver 8.1.6 -- ancient, I know). Anyway, the site worked fine as long as the machine accessing the ASP page was running Win 2k but when an XP machine tried to view the page, the client got an error: Microsoft...
3
17885
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 oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134) at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179) at oracle.jdbc.oci8.OCIDBAccess.check_error(OCIDBAccess.java:2364) at oracle.jdbc.oci8.OCIDBAccess.logon(OCIDBAccess.java:480)
1
8219
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 that the component context in the distributed transaction (in our case two different COM components) cannot hold onto the same ODBC connection. Or it may be that the database session is changed dynamically for the ODBC connection, so that...
1
5133
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 Oracle}; Server=our_tnsname; UID=my_userid; PWD=my_password However, our DBAs are concerned about this driver and have insisted we use the Oracle ODBC Driver instead.
5
9652
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 this error? Oracle error occurred, but error message could not be retrieved from Oracle. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the...
2
9950
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 problems dealing with Oracle's Numeric Data Type, so I decided to use Microsoft's OLE DB for ODBC Provider and an Oracle ODBC source. When using the Microsoft ODBC for Oracle Driver in my ODBC source I have inconsistent behavior. Sometimes my queries...
2
10269
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 the error I get depending on the connection string: Using the right server (Oracle 9i), and the Native Oracle Driver
3
2570
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 both of the following drivers, as well. Oracle ODBC Driver (version 8.01.05.00) Microsoft ODBC for Oracle Basically, I end up with the same generic error no matter what I try. Here's my code. Try
0
10214
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10048
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9996
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8872
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7410
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6674
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5447
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3963
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3563
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.