java.lang.UnsatisfiedLinkError: /opt/oracle/lib/libocijdbc10.jnilib

L

laredotornado

Hi,

I"m using Mac 10.5.6 (Intel 32 bit) and trying to connect to an Oracle
10g server via JDBC (Java 1.5). I just installed the Mac OS X 10.2
Instant Client Package - Basic Lite from here --
http://www.oracle.com/technology/software/tech/oci/instantclient/htdocs/intel_macsoft.html.
Sadly, when I try and run my console app to connect, I get this
error ...

Exception in thread "main" java.lang.UnsatisfiedLinkError: /opt/oracle/
lib/libocijdbc10.jnilib:
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1822)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1739)
at java.lang.Runtime.loadLibrary0(Runtime.java:822)
at java.lang.System.loadLibrary(System.java:993)
at oracle.jdbc.driver.T2CConnection$1.run(T2CConnection.java:3135)
at java.security.AccessController.doPrivileged(Native Method)
at oracle.jdbc.driver.T2CConnection.loadNativeLibrary
(T2CConnection.java:3131)
at oracle.jdbc.driver.T2CConnection.logon(T2CConnection.java:221)
at oracle.jdbc.driver.PhysicalConnection.<init>
(PhysicalConnection.java:414)
at oracle.jdbc.driver.T2CConnection.<init>(T2CConnection.java:132)
at oracle.jdbc.driver.T2CDriverExtension.getConnection
(T2CDriverExtension.java:78)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:801)
at java.sql.DriverManager.getConnection(DriverManager.java:525)
at java.sql.DriverManager.getConnection(DriverManager.java:140)
at
org.hibernate.connection.DriverManagerConnectionProvider.getConnection
(DriverManagerConnectionProvider.java:133)
at org.hibernate.cfg.SettingsFactory.buildSettings
(SettingsFactory.java:111)
at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:
2097)
at myco.dor.dmv.driver.youthful.database.YouthfulDriverDatabase.<init>
(YouthfulDriverDatabase.java:77)
at
myco.dor.dmv.driver.youthful.database.YouthfulDriverDatabase.getInstance
(YouthfulDriverDatabase.java:83)
at myco.dor.dmv.driver.youthful.AddressFileProcessor.execute
(AddressFileProcessor.java:86)
at myco.dor.dmv.driver.youthful.AddressFileProcessor.main
(AddressFileProcessor.java:81)

Any ideas? My CLASSPATH is set to include /opt/oracle/lib/
classes12.jar. How can I troubleshoot this further?

Thanks, - Dave
 
J

John B. Matthews

laredotornado said:
I"m using Mac 10.5.6 (Intel 32 bit) and trying to connect to an
Oracle 10g server via JDBC (Java 1.5). I just installed the Mac OS X
10.2 Instant Client Package - Basic Lite from here --
<http://www.oracle.com/technology/software/tech/oci/instantclient/htdocs/intel_macsoft.html>.
Sadly, when I try and run my console app to connect, I get this error:

Exception in thread "main" java.lang.UnsatisfiedLinkError: /opt/oracle/
lib/libocijdbc10.jnilib: [...]
Any ideas? My CLASSPATH is set to include /opt/oracle/lib/
classes12.jar. How can I troubleshoot this further?

You might see if setting the library path helps:

java -Djava.library.path="..."

Alternatively, the Oracle thin drivers are here:

<http://www.oracle.com/technology/software/tech/java/sqlj_jdbc/htdocs/\jdbc_10201.html>
 
L

Lew

John said:
laredotornado said:
I"m using Mac 10.5.6 (Intel 32 bit) and trying to connect to an
Oracle 10g server via JDBC (Java 1.5). I just installed the Mac OS X
10.2 Instant Client Package - Basic Lite from here --
<http://www.oracle.com/technology/software/tech/oci/instantclient/htdocs/intel_macsoft.html>.
Sadly, when I try and run my console app to connect, I get this error:

Exception in thread "main" java.lang.UnsatisfiedLinkError: /opt/oracle/
lib/libocijdbc10.jnilib: [...]
Any ideas? My CLASSPATH is set to include /opt/oracle/lib/
classes12.jar. How can I troubleshoot this further?

You might see if setting the library path helps:

java -Djava.library.path="..."

Alternatively, the Oracle thin drivers are here:

<http://www.oracle.com/technology/software/tech/java/sqlj_jdbc/htdocs/\jdbc_10201.html>

One wonders why the OP is using classes12.jar and not ojdbc5.jar. The former
was supplanted by the Java 1.4 version over seven and a half years ago, and
that version became obsolete with Java 1.4 itself about a year ago. With Java
5 just about two weeks away from its own end-of-service-life date, shouldn't
we be using at least the Java 5 libraries?

I'm not even sure classes12.jar fully groks all the capabilities of Oracle 10g.

The price is right; update your Oracle JDBC driver library.
 
J

John B. Matthews

[QUOTE="Lew said:
laredotornado said:
I"m using Mac 10.5.6 (Intel 32 bit) and trying to connect to an
Oracle 10g server via JDBC (Java 1.5). I just installed the Mac OS
X 10.2 Instant Client Package - Basic Lite from here --
<http://www.oracle.com/technology/software/tech/oci/instantclient/h
tdocs/in tel_macsoft.html>. Sadly, when I try and run my console
app to connect, I get this error:

Exception in thread "main" java.lang.UnsatisfiedLinkError: /opt/oracle/
lib/libocijdbc10.jnilib: [...]
Any ideas? My CLASSPATH is set to include /opt/oracle/lib/
classes12.jar. How can I troubleshoot this further?
[...]

One wonders why the OP is using classes12.jar and not ojdbc5.jar.
The former was supplanted by the Java 1.4 version over seven and a
half years ago, and that version became obsolete with Java 1.4 itself
about a year ago. With Java 5 just about two weeks away from its own
end-of-service-life date, shouldn't we be using at least the Java 5
libraries?

I'm not even sure classes12.jar fully groks all the capabilities of
Oracle 10g.

The price is right; update your Oracle JDBC driver library.[/QUOTE]

Egad, you're right; I'd overlooked the old JAR. The file ojdbc14.jar
appears to be intended for use with JDK 1.4 or 1.5. Although
ojdbc14.jar is already in the OP's Basic Lite download, let me take
another stab at a working link:

<http://www.oracle.com/technology/software/tech/java/sqlj_jdbc/htdocs/jdbc_10201.html>
 
Joined
Nov 18, 2016
Messages
4
Reaction score
0
Hello,

I am also facing similar issue .

Trying to migrate application from JBoss to tomcat8 .
We are using a .so native lib for a specific functionality .

Everytime this function is called we need to load .so file but it throws error :
Native code library failed to load. java.lang.UnsatisfiedLinkError:

I have tried multiple things
1. set -Djava.library.path = XX folder path of native lib explicitly through tomcat VM argument
2. copy xxx.so file to /usr/lib/ folder and give the -Djava.library.path= /usr/lib
3. Also tried installing tomcat-APR and tomcat-Native libraries
4. Tried to Load file using below line to check where native lib is getting loaded or not
System.loadLibrary(so filename );

5.Tried settign export LD_LIBRARY_PATH=/usr/local/apr/lib

But NO LUCK :(:(

Please someone help with this .
Why my xxx.so file is not getting loaded


-Varsha
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,983
Messages
2,570,187
Members
46,747
Latest member
jojoBizaroo

Latest Threads

Top