This discussion is archived
2 Replies Latest reply: Jun 26, 2013 5:32 AM by Dattaprasad RSS

java.lang.UnsatisfiedLinkError: oracle.jdbc.driver.T2CConnection.getLibrary

765609 Newbie
Currently Being Moderated

I am trying to use OCI driver for my Java application running in a linux machine to connect to the oracle 11g database.

My Java version is :

java version "1.6.0_32"
Java(TM) SE Runtime Environment (build 1.6.0_32-b05)
Java HotSpot(TM) 64-Bit Server VM (build 20.7-b02, mixed mode)

I also installed Oracle instant client for 64 bit.
LD_LIBRARY_PATH and TNS_ADMIN paths are set.

My Java code has ojdbc6.jar as a dependency and I am trying to connect like this

Connection conn = DriverManager.getConnection("jdbc:oracle:oci:@<Service name from tns>", "username", "password");

When I run the program, I am getting

Exception in thread "main" java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(
at sun.reflect.DelegatingMethodAccessorImpl.invoke(
at java.lang.reflect.Method.invoke(
at org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(
Caused by: java.lang.UnsatisfiedLinkError: oracle.jdbc.driver.T2CConnection.getLibraryVersionNumber()I
at oracle.jdbc.driver.T2CConnection.getLibraryVersionNumber(Native Method)
at oracle.jdbc.driver.T2CConnection$
at Method)
at oracle.jdbc.driver.T2CConnection.loadNativeLibrary(
at oracle.jdbc.driver.T2CConnection.logon(
at oracle.jdbc.driver.PhysicalConnection.<init>(
at oracle.jdbc.driver.T2CConnection.<init>(
at oracle.jdbc.driver.T2CDriverExtension.getConnection(
at oracle.jdbc.driver.OracleDriver.connect(
at java.sql.DriverManager.getConnection(
at java.sql.DriverManager.getConnection(

I looked over many threads,but could not find a proper solution.What am I missing?

Any help on this is appreciated.



  • Correct Answers - 10 points
  • Helpful Answers - 5 points