Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

UnsatisfiedLinkError

 
Shaik Riyaz
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic