• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

UnsatisfiedLinkError

 
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,
I am trying to execute some tests on Solaris using an Oracle 9i database and using the Oracle ojdbc14.jar driver. However each time I try to make a call I get the following error:
java.lang.UnsatisfiedLinkError:
/export/home3/oracle/product/9.2.0.4/lib/libocijdbc9.so:
ld.so.1: java:
fatal: /export/home3/oracle/product/9.2.0.4/lib/libocijdbc9.so: wrong ELF class: ELFCLASS64

Now from what Ive read an UnsatisfiedLinkError occurs when a native method cannot be called correctly. My tests are being executed on Solaris and from the Java manuals it says that shared libraries for native method implementations are found using the LD_LIBRARY_PATH environment variable. Ive checked the value of this variable against another its value for another user account on which the tests work and the values of the variable are identical. What I am wondering is if there is any other environment variable that could be affecting how the JVM locates native methods?
Cheers,
John
 
Ranch Hand
Posts: 1879
MySQL Database Suse
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by John Ryan:
Hi all,
I am trying to execute some tests on Solaris using an Oracle 9i database and using the Oracle ojdbc14.jar driver. However each time I try to make a call I get the following error:
java.lang.UnsatisfiedLinkError:
/export/home3/oracle/product/9.2.0.4/lib/libocijdbc9.so:
ld.so.1: java:
fatal: /export/home3/oracle/product/9.2.0.4/lib/libocijdbc9.so: wrong ELF class: ELFCLASS64

Now from what Ive read an UnsatisfiedLinkError occurs when a native method cannot be called correctly. My tests are being executed on Solaris and from the Java manuals it says that shared libraries for native method implementations are found using the LD_LIBRARY_PATH environment variable. Ive checked the value of this variable against another its value for another user account on which the tests work and the values of the variable are identical. What I am wondering is if there is any other environment variable that could be affecting how the JVM locates native methods?
Cheers,
John


Everything I've read says this is caused by using the 64bit libraries instead of the 32bit ones. Change your LD_LIBRARY_PATH to point to $ORACLE_HOME/lib32.

Jamie
 
John Ryan
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Jamie, Tried this and my tests work correctly now. Need to spend some time figuring ot why this fixed it now. Dont fully understand that yet.....
 
So you made a portal in time and started grabbing people. This tiny ad thinks that's rude:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic