Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> JDBC or TCP/IP problem with Oracle
I am trying to connect to Personal Oracle 8 on a Windows 95 system using the JDBC drivers. Even though I use "localhost" or "127.0.0.1" as the host address, it appears that my machine is trying to go out on to the network!
I am using the sample Employee.java file which came in the downloaded demo file from Oracle. I used JDK1.2.2 to compile and started the database. Here are the results using the following compilation commands:
javac -classpath .;H:\orawin95\jdbc\lib\816classes12.zip Employee.java java -cp .;H:\orawin95\jdbc\lib\816classes12.zip Employee
cd h:/orawin95/jdbc/demo/samples/oci8/basic-samples/
java -cp .;H:\orawin95\jdbc\lib\816classes12.zip Employee
java.sql.SQLException: The Network Adapter could not establish the
connection
at oracle.jdbc.dbaccess.DBError.check_error(DBError.java:406)
at
oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:169)
at
oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java:231)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:208)
at java.sql.DriverManager.getConnection(DriverManager.java:457) at java.sql.DriverManager.getConnection(DriverManager.java:137) at Employee.main(Employee.java, Compiled Code)Exception in thread "main"
// Connect to the database
// You can put a database name after the @ sign in the connection
URL.
Connection conn =
DriverManager.getConnection
("jdbc:oracle:oci8:@localhost:1521:ORCL", "scott", "tiger");
cd h:/orawin95/jdbc/demo/samples/oci8/basic-samples/ java -cp .;H:\orawin95\jdbc\lib\816classes12.zip Employee java.lang.UnsatisfiedLinkError: no ocijdbc8 in java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1249) at java.lang.Runtime.loadLibrary0(Runtime.java:470) at java.lang.System.loadLibrary(System.java:768)at oracle.jdbc.oci8.OCIDBAccess.logon(OCIDBAccess.java:202) at
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:208)
at java.sql.DriverManager.getConnection(DriverManager.java:457) at java.sql.DriverManager.getConnection(DriverManager.java:137) at Employee.main(Employee.java, Compiled Code)Exception in thread "main"
I could not get the bequeth protocol (beq-local.world) to work either as it appears that the JDBC connect command needs a TCP/IP address.
Can anyone help?
Cheers,
Carol
Received on Wed Sep 22 1999 - 00:15:18 CDT
![]() |
![]() |