ClassNotFoundException(oracle.jdbc.driver.OracleDriver) [message #90840] |
Mon, 01 October 2001 02:13 |
Vijayalakshmi.L
Messages: 1 Registered: October 2001
|
Junior Member |
|
|
Hi
I am trying to connect to oracle database on the server, oracle client installed on working m/c, I have placed classes111.zip (from oracle 8) in jdk1.1.8demojrelibext folder and I have set the classpath to the ext folder. The code
try
{
Class.forName("oracle.jdbc.driver.OracleDriver");
}
catch(Exception e)
{
}
when I run this code , error as
[[ java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver ]]
Please reply what are settings I should to to load this oracle driver,
1) Should I download any drivers and install in my m /c
2) Is that classes111.zip is correct ?
----------------------------------------------------------------------
|
|
|
|
|
Re: ClassNotFoundException(oracle.jdbc.driver.OracleDriver) [message #90939 is a reply to message #90840] |
Tue, 18 December 2001 11:24 |
Sudheer Parasker
Messages: 1 Registered: December 2001
|
Junior Member |
|
|
If you still didn't find solution for this problem, try this....
1. unzip classes111.zip in the directory (demojrelibext).
2. while running, run as java -classpath "give the same classpath as you have given for javac" example1
Hope this helps.
----------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
No error and Empty record found [message #92167 is a reply to message #92165] |
Wed, 31 March 2004 01:21 |
Biswajit Jena
Messages: 3 Registered: March 2004
|
Junior Member |
|
|
Hello,
This is my simple code and getting empty value when i am executing.
please let me know the problems.
1.My oracle server name is IBMSERVER
2.Database GAD
3.Username/Password :GADDEV/GADDEV respectively.why it's not working through this driver.
import java.sql.*;
public class orcl
{
public static void main(String args[[]])
{
Connection conn = null;
try
{
Class.forName("oracle.jdbc.driver.OracleDriver");
// Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
conn = DriverManager.getConnection(
"jdbc:oracle:thin:@192.168.100.12",
"gaddev",
"gaddev");
Statement stmt = conn.createStatement();
ResultSet rs = stmt.executeQuery("SELECT * FROM EI_Emp_MH");
while(rs.next())
{
System.out.println(rs.getString("EMP_M"));
}
}catch(SQLException e)
{
e.getMessage();
}
catch(ClassNotFoundException e)
{
System.out.println("ClassNotFoundException: " + e.getMessage());
}
finally {
if(conn != null)
{
try {
conn.close();
}
catch (Exception ignored) {}
}
}
}
}
With regards
Biswajit
|
|
|
|
|
Re: ClassNotFoundException(oracle.jdbc.driver.OracleDriver) [message #92802 is a reply to message #91290] |
Sun, 30 January 2005 21:01 |
pramodmb
Messages: 2 Registered: December 2004
|
Junior Member |
|
|
This might work if we use JDBC thin driver.. which i haven't tried.. but if we use JDBC OCI Driver.. just add classes12.zip in the classpath and add the follwoing entry in the java file
Connection con = DriverManager.getConnection("jdbc.odbc.oci8:@databasename","userid","pwd"); This will surely work.
Regards,
Pramod
|
|
|