LD_LIBRARY_PATH error Caused by: java.lang.UnsatisfiedLinkError: no nddsjavad in java.library.path

4 posts / 0 new
Last post
Offline
Last seen: 7 years 1 month ago
Joined: 07/05/2015
Posts: 2
LD_LIBRARY_PATH error Caused by: java.lang.UnsatisfiedLinkError: no nddsjavad in java.library.path

Hi everyone,

My program in not running because of below error and I am using RHEL7 and Eclipse Mars. If anybody know about it please help me and thanks in advance.

The library libnddsjavad.so could not be loaded by Linux.
Make sure that the library is in your LD_LIBRARY_PATH environment variable.
Exception in Application init method
java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at com.sun.javafx.application.LauncherImpl.launchApplicationWithArgs(LauncherImpl.java:389)
    at com.sun.javafx.application.LauncherImpl.launchApplication(LauncherImpl.java:328)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at sun.launcher.LauncherHelper$FXHelper.main(LauncherHelper.java:767)
Caused by: java.lang.RuntimeException: Exception in Application init method
    at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:912)
    at com.sun.javafx.application.LauncherImpl.lambda$launchApplication$155(LauncherImpl.java:182)
    at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.UnsatisfiedLinkError: no nddsjavad in java.library.path
    at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1867)
    at java.lang.Runtime.loadLibrary0(Runtime.java:870)
    at java.lang.System.loadLibrary(System.java:1122)
    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 iaccs.batch1.DDS.DDSManager.<init>(DDSManager.java:53)
    at iaccs.batch1.DDS.DDSManager.getInstance(DDSManager.java:44)
    at iaccs.batch1.MainApp.init(MainApp.java:46)
    at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:841)
    ... 2 more
Exception running application iaccs.batch1.MainApp

AttachmentSize
Plain text icon error file2.07 KB
Organization:
gianpiero's picture
Offline
Last seen: 3 months 1 week ago
Joined: 06/02/2010
Posts: 177

Hello,

What jar file are you using? nddsjava.jar or nddsjavad.jar?

If you use the second one (nddsjavad.jar), i think it may try to load the debug version of the native libs (nddsjavad.so)..

Can you check and try to use nddsjava.jar instead?

Best,
  Gianpiero

Fernando Garcia's picture
Offline
Last seen: 5 months 1 day ago
Joined: 05/18/2011
Posts: 199

Hi,

You will need to add the LD_LIBRARY_PATH to your Run or Debug Configuration in Eclipse. To modify your Run or Debug configuration go to Run->(Run Configurations or Debug Configuration) and select the one you are launching. This will popup a dialog in which you can configure things like arguments, classpath, and environment variables for your application. In this case, you need to export the LD_LIBRARY_PATH environment variable; so click on Environment->New and enter:

  • Name: LD_LIBRARY_PATH
  • Value: /path/to/your/installation/rti_connext_dds-x.y.z/lib/x64Linux3gcc4.8.2 (or your architecture name)

Eclipse Java Run Configuration

Also, note that when you generate an example project using rtiddsgen as follows, it automatically creates an Eclipse project that you can import using File->Import and pointing to the folder where you have generated the example.

./bin/rtiddsgen -example x64Linux3gcc4.8.2 -language Java ShapeType.idl

Please, let me know if this helps.

Fernando.

Offline
Last seen: 7 years 1 month ago
Joined: 07/05/2015
Posts: 2