Hi all , I am getting the following exception while connecting a sample application using JDBC-OCI driver
Exception in thread "main" java.lang.UnsatisfiedLinkError: do_open at oracle.jdbc.oci8.OCIDBAccess.do_open(Native Method) at oracle.jdbc.oci8.OCIDBAccess.logon(OCIDBAccess.java:309) at oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:198) at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java:251) at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:224) at java.sql.DriverManager.getConnection(DriverManager.java:517) at java.sql.DriverManager.getConnection(DriverManager.java:177) at Employee.main(Employee.java:28)
I have set the LD_LIBRARY_PATH containing the ocijdbc8.dll and classes12.zip is also in the CLASSPATH
Any clues as to why is this error ?
Thanks & Regards ~Parvinder
Robert Brunner
Ranch Hand
Joined: Jul 18, 2001
Posts: 49
posted
0
Show me th code! (OK bad Jerry McGuire reference). Seriously, problems are easiest to diagnose when you include some code. R
Originally posted by Parvinder Arora: Hi all , I am getting the following exception while connecting a sample application using JDBC-OCI driver
Exception in thread "main" java.lang.UnsatisfiedLinkError: do_open at oracle.jdbc.oci8.OCIDBAccess.do_open(Native Method) at oracle.jdbc.oci8.OCIDBAccess.logon(OCIDBAccess.java:309) at oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:198) at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java:251) at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:224) at java.sql.DriverManager.getConnection(DriverManager.java:517) at java.sql.DriverManager.getConnection(DriverManager.java:177) at Employee.main(Employee.java:28)
I have set the LD_LIBRARY_PATH containing the ocijdbc8.dll and classes12.zip is also in the CLASSPATH
Any clues as to why is this error ?
Thanks & Regards ~Parvinder
Parvinder Arora
Greenhorn
Joined: Aug 14, 2001
Posts: 3
posted
0
Hi, The example is very simple Following is the code
import java.sql.*; class Employee { public static void main (String args []) throws SQLException { DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver()); String url = "jdbcracleci8:@(description=(address_list=(address=(protocol=tcp)(port=1521)(host=192.168.5.115)))(connect_data=(sid=orcl1)))"; System.out.println(url); Connection conn = DriverManager.getConnection (url, "path", "path"); Statement stmt = conn.createStatement (); ResultSet rset = stmt.executeQuery ("select primary_email from member"); while (rset.next ()) System.out.println (rset.getString (1)); rset.close(); stmt.close(); conn.close(); } } The above code executes fine if the driver is a thin driver but doesnt executes using the oci driver
Originally posted by Robert Brunner: Show me th code! (OK bad Jerry McGuire reference). Seriously, problems are easiest to diagnose when you include some code. R
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.