aspose file tools*
The moose likes JDBC and the fly likes UnsatisfiedLinkError Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "UnsatisfiedLinkError" Watch "UnsatisfiedLinkError" New topic
Author

UnsatisfiedLinkError

Shaik Riyaz
Greenhorn

Joined: Apr 17, 2008
Posts: 7
Hello All,
While connecting to the database using java in unix environment i have encountered java.lang.UnsatisfiedLinkError: Can't find library ocijdbc9 (libocijdbc9.a or .so) in sun.boot.library.path or java.library.path. Please advice how to resovle this issue.

Please observe the below error trace

Exception in thread "main" java.lang.UnsatisfiedLinkError: Can't find library ocijdbc9 (libocijdbc9.a or .so) in sun.boot.library.path or java.library.path
sun.boot.library.path=/usr/java14/jre/bin
java.library.path=/usr/java14/jre/bin:/usr/java14/jre/bin/classic:/usr/java14/jre/bin:.:/opt/projects/gsd/lib:/opt/CA/ServiceDesk/lib:/usr/vacpp/lib:/usr/mqm/lib:/usr/mqm/java/lib:/usr/java14/jre/lib/sparc/client:/opt/controlm/ctm/exe:/usr/lib
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:2044)
at java.lang.Runtime.loadLibrary0(Runtime.java:824)
at java.lang.System.loadLibrary(System.java:910)
at oracle.jdbc.oci8.OCIDBAccess.logon(OCIDBAccess.java:262)
at oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:346)
at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java:468)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:314)
at java.sql.DriverManager.getConnection(DriverManager.java:559)
at java.sql.DriverManager.getConnection(DriverManager.java:189)
at dbmgr.ConnectionPool.newConnection(ConnectionPool.java:191)
at dbmgr.ConnectionPool.initPool(ConnectionPool.java:62)
at dbmgr.ConnectionPool.<init>(ConnectionPool.java:35)
at dbmgr.PoolManager.createPools(PoolManager.java:346)
at dbmgr.PoolManager.init(PoolManager.java:188)
at dbmgr.PoolManager.<init>(PoolManager.java:45)
at dbmgr.PoolManager.getInstance(PoolManager.java:52)
at cne.CneMsgHandler.getDatabaseInfo(CneMsgHandler.java:323)
at cne.CneMsgHandler.<init>(CneMsgHandler.java:128)
at cne.CneMsgHandler.main(CneMsgHandler.java:486)


Thanks in anticipation.
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

This happens on linux when you try to use the Type 2 or 3 Driver (I forget which ) but do not have the orale client installed on the machine.

Personally: use the Type 4 (thin) driver and move on.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: UnsatisfiedLinkError
 
Similar Threads
Can't find library ocijdbc9 (libocijdbc9.so)
Stale connection problem on Oracle 8
Getting DB2 error
no ocijdbc9 in java.library.path
java.sql.SQLException: No suitable driver