libnddsjava.so not found

9 posts / 0 new
Last post
Offline
Last seen: 13 years 1 month ago
Joined: 10/19/2011
Posts: 2
libnddsjava.so not found

Hello everyone,

 

I'm supervising a group of students using RTI DDS for some projects in a Distributed Systems class. RTI DDS is installed in six CentOS machines, in the default location /opt/RTI. Now, some students are having problems either compiling or running their code. Here's one example of the output:

 

 

[bjohnson@rti-dds-02 project1java]$ gmake -f makefile_little_i86Linux2.6gcc4.1.1jdk LittleMsgPublisher
java -classpath ".:/opt/RTI/ndds.4.5c/class/nddsjava.jar"  LittleMsgPublisher 
The library libnddsjava.so could not be loaded by Linux.
Make sure that the library is in your LD_LIBRARY_PATH environment variable.
Exception in thread "main" java.lang.UnsatisfiedLinkError: /opt/RTI/ndds.4.5c/lib/i86Linux2.6gcc4.1.1jdk/libnddsjava.so: /opt/RTI/ndds.4.5c/lib/i86Linux2.6gcc4.1.1jdk/libnddsjava.so: wrong ELF class: ELFCLASS32 (Possible cause: architecture word width mismatch)
    at java.lang.ClassLoader$NativeLibrary.load(Native Method)
    at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1750)
    at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1675)
    at java.lang.Runtime.loadLibrary0(Runtime.java:840)
    at java.lang.System.loadLibrary(System.java:1047)
    at com.rti.dds.util.NativeInterface.loadNativeLibrary(Unknown Source)
    at com.rti.dds.util.NativeInterface.loadNativeLibraries(Unknown Source)
    at com.rti.dds.domain.DomainParticipantFactory.<clinit>(Unknown Source)
    at LittleMsgPublisher.publisherMain(LittleMsgPublisher.java:127)
    at LittleMsgPublisher.main(LittleMsgPublisher.java:95)
gmake: *** [LittleMsgPublisher] Error 1

 

 

I highlighted a couple of lines that caught my attention. Did anyone have similar problems in the past? 

 

Any help will be appreciated. Thanks in advance,

 

Dario.

 


rose's picture
Offline
Last seen: 3 years 4 months ago
Joined: 08/22/2011
Posts: 148

Hello Dario,

 

Are these 64-bit machines or 32-bit machines?

 

You can tell by using uname -m.

 

If they are 64-bit machines, you must put the 64-bit libraries into your LD_LIBRARY_PATH.

 

Thank you,

Rose

Offline
Last seen: 13 years 1 month ago
Joined: 10/19/2011
Posts: 2

Hello Rose, thanks for the reply. They're 64 bit machines (x86_64).

rose's picture
Offline
Last seen: 3 years 4 months ago
Joined: 08/22/2011
Posts: 148

Hello Darío,

 

If the machines are 64-bit, you should put the 64 bit DDS libraries into your path.  Instead of i86Linux... they should be x64Linux...

 

Thank you!

Rose

Gerardo Pardo's picture
Offline
Last seen: 3 weeks 1 day ago
Joined: 06/02/2010
Posts: 602
Hello Dario,
Are you aware of the Linux LiveCD distribution or RTI DDS:
This is available from:
http://community.rti.com/content/page/download-live-cd
In the past when I have set up computers for class use I found this very useful.
You can even put the ISO on a USB and use it to boot the computer from the ISO and you immediately have your environment totally set to work with RTI DDS... Then reboot again and you are back to the original environment...
Ragards,
Gerardo
Offline
Last seen: 12 years 1 month ago
Joined: 10/23/2012
Posts: 3

Hello,

This is an old thread I would like to revive because I am having issues running an application through Eclipse with RTI installed. I am running Win XP 64-bit, but 32-bit Eclipse and Java [only because one of the Elcipse plugins I'm using isn't supported in 64-bit yet]. I have set the NDDSHOME, NDDSLIB, and NDDSSCRIPTS environment variables and have set the path to include the %NDDSHOME%/lib/<architecture>; I have tried both the 32-bit and 64-bit versions of RTI neither of them work and I receive this error:

The library nddsjava.dll could not be loaded on Windows.
Make sure that the library is in your Path environment variable.
Exception in thread "main" java.lang.UnsatisfiedLinkError: no nddsjava in java.library.path

I have checked all my environment variables in Windows, and even added the PATH and NDDS variables within Eclipse's run time environment but with no success. The specified .dll and .jar files both exist in the path, and I have even added the nddsjava.jar as an external jar to the project.

Am I missing something really obvious?

Any help would be greatly appreciated thanks!

 

Emily 

Gerardo Pardo's picture
Offline
Last seen: 3 weeks 1 day ago
Joined: 06/02/2010
Posts: 602

I have not tried to run the 32 bit DLLs on 64 bit windows so I cannot attest that this configuration works...

If I recall correctly on Windows it should be enough to set the PATH variable to the directory that contains the DLL and the CLASSPATH to include the nddsjava.jar file.

One way to determine whether this is an issue with the Eclipse configuration, the paths, or the 32-bit DLL in 64-bit windows might be to try to run the example under "examples/JAVA/Hello_simple" first setting the PATH to point to the directory containing the 64 bit library and then the directory containing the 32-bit one.  See the runPub.cmd script in that directory for the commands used to run the example.

If you can get this to work I would suspect something is not being set correctly on the eclipse configuration.

Gerardo

Offline
Last seen: 12 years 1 month ago
Joined: 10/23/2012
Posts: 3

Hi Gerardo,

Thanks for the response. I have tried both the 32 bit and 64 bit DLLs, neither of them work. I have set the PATH to include the directory where the DLL resides, as well as the CLASSPATH to include the nddsjava.jar.

I can't run the Hello_simple file because I am having issues building it. (The version of RTI NDDS I have doesn't have the examples pre-compiled).I'm not sure what other Eclipse configuration would be required? I have the nddsjava.jar included in the project as an external jar, as well as an added variable to point to the DLL file.

Any other ideas?

 

Emily

Offline
Last seen: 12 years 1 month ago
Joined: 10/23/2012
Posts: 3

It turns out that jre7 was not happy with RTI. I got it to run succesfully with jdk1.6 instead, lucky me!

Thanks again for your help!

Emily