Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Problem wit OCI 8

0 views
Skip to first unread message

hli...@my-deja.com

unread,
Aug 19, 1999, 3:00:00 AM8/19/99
to
Hi

I'm using Personal Oracle 8 with W95. I'm just getting into JDBC. There
where some samples given, but none of them works. They all miss some
"oci804jdbc.dll" thing. This driver is DEFINITELY in c:\orawin95\bin !

Anyway, here's the code with the reported error...

/*
* This sample shows how to list all the names from the EMP table
*
* It uses the JDBC OCI8 driver. See the same program in the
* thin or oci7 samples directories to see how to use the other drivers.
*/

// You need to import the java.sql package to use JDBC
import java.sql.*;

class Employee
{
public static void main (String args [])
throws SQLException, ClassNotFoundException
{
// Load the Oracle JDBC driver
Class.forName ("oracle.jdbc.driver.OracleDriver");

// Connect to the database
// You can put a database name after the @ sign in the connection
URL.
Connection conn =
DriverManager.getConnection ("jdbc:oracle:oci8:@", "scott",
"tiger");

// Create a Statement
Statement stmt = conn.createStatement ();

// Select the ENAME column from the EMP table
ResultSet rset = stmt.executeQuery ("select ENAME from EMP");

// Iterate through the result and print the employee names
while (rset.next ())
System.out.println (rset.getString (1));
}
}


/* ------ THIS IS THE ERROR-MESSAGE -------
C:\jdk1.2\bin\java.exe Employee
Working Directory - D:\Daten\Holger\oracle\
Class Path - C:\orawin95\jdbc\lib\CLASSES111.zip;C:\JDK1.2\SRC.JAR;D:
\DATEN\HOLGER\ORACLE\;D:\DATEN\HOLGER\ORACLE \;.;C:
\Programme\Kawa\classes.zip;c:\jdk1.2\lib\tools.jar;c:\jdk1.2
\jre\lib\rt.jar
java.lang.UnsatisfiedLinkError: c:\oracle95\bin\oci804jdbc.dll: Die zum
Ausfhren dieser Anwendung notwendige Bibliothekdatei wurde nicht
gefunden
>> This is German and means: The library needed for executing this
application was not found
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(Compiled Code)
at java.lang.ClassLoader.loadLibrary(Compiled Code)
at java.lang.Runtime.loadLibrary0(Runtime.java:470)
at java.lang.System.loadLibrary(System.java:745)
at oracle.jdbc.oci7.OCIDBAccess.logon(OCIDBAccess.java:138)
at oracle.jdbc.driver.OracleConnection.<init>
(OracleConnection.java:93)
at oracle.jdbc.driver.OracleDriver.connect
(OracleDriver.java:147)
at java.sql.DriverManager.getConnection(Compiled Code)
at java.sql.DriverManager.getConnection(DriverManager.java:137)
at Employee.main(Compiled Code)

Exception in thread "main" Process Exit...

Any suggestions ?

Greetings
Holger

Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.

0 new messages