0

I have a standalone java program which uses Xuggle to do video conversion. The version of Xuggle is xuggle-xuggler-5.4.jar. I have added it to build path.

The java program works fine on

Fedora

Linux localhost.localdomain 3.6.10-4.fc18.x86_64 #1 SMP Tue Dec 11 18:01:27 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux

and

Ubuntu

Linux ubuntu 3.5.0-23-generic #35~precise1-Ubuntu SMP Fri Jan 25 17:13:26 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

But when running it on Redhat

Linux localhost.localdomain 2.6.32-358.2.1.el6.x86_64 #1 SMP Wed Feb 20 12:17:37 EST 2013 x86_64 x86_64 x86_64 GNU/Linux 

I encountered an error:

Exception in thread "Thread-1" java.lang.UnsatisfiedLinkError: no xuggle in java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1738)
at java.lang.Runtime.loadLibrary0(Runtime.java:823)
at java.lang.System.loadLibrary(System.java:1028)
at com.xuggle.ferry.JNILibraryLoader.loadLibrary0(JNILibraryLoader.java:268)
at com.xuggle.ferry.JNILibraryLoader.loadLibrary(JNILibraryLoader.java:171)
at com.xuggle.ferry.JNILibrary.load(JNILibrary.java:161)
at com.xuggle.ferry.FerryJNI.<clinit>(FerryJNI.java:16)
at com.xuggle.ferry.Ferry.<clinit>(Ferry.java:25)
at com.xuggle.xuggler.XugglerJNI.<clinit>(XugglerJNI.java:19)
at com.xuggle.xuggler.IContainer.<clinit>(IContainer.java:1622)
at com.xuggle.mediatool.MediaReader.<init>(MediaReader.java:137)
at com.xuggle.mediatool.ToolFactory.makeReader(ToolFactory.java:77)
at com.hkmci.standalone.videoconversion.MediaConvertor$VideoThread.convert(MediaConvertor.java:238)
at com.hkmci.standalone.videoconversion.MediaConvertor$VideoThread.run(MediaConvertor.java:351)
at java.lang.Thread.run(Thread.java:662)

Is there anyone able to help me on this issue? I have studied in it for a long time, but no clues... Thanks.

Grace
  • 5
  • 1
  • 4

1 Answers1

0

Check your PATH on Redhat. The Xuggle libraries (.so) should be in the PATH of the process calling your java program.

The problem could also comes from libraries dependencies. I had encounter the problem on Windows 7; to solve it I manually check all dll dependencies and load them in my Java code one by one in the correct order.

Also you can try to modify the java library path java -Djava.library.path=/path/to/xuggle_install

Community
  • 1
  • 1
zeropouet
  • 124
  • 3
  • 11
  • Thanks for your reply. I am totally new to Linux. Could you please explain more on the solution? I didn't install anything on Ubuntu,Fedora,etc which can run the standalone java program smoothly. Is there anything difference among ubuntu,fedora and redhat? Do I need to install sth to support Xuggler in redhat? BTW, is it related to gcc/g++? – Grace Jun 28 '13 at 08:46
  • In a shell verify the differences between your Fedora, Ubuntu & Redhat. Type `echo $PATH` to display which directories are included in your environment. It is not related to g++/gcc if you didn't compile Xuggle yourself. The most probable root cause is that the libraries installed on Redhat are not compatible with xuggles ones. Fedora and Ubuntu have probably newer version installed. You should verify the prerequisites for xuggle 5.4 and check that there are met on Redhat. – zeropouet Jun 28 '13 at 09:55
  • I have checked my PATH on Fedora. There is no Xuggle libraries(.so) in the PATH. But I can convert videos successfully. Does it mean it is not related to the PATH configuration ? – Grace Jul 02 '13 at 04:07
  • @Grace I have same problem. Work fine on Ubuntu, but not with Redhat. Did you solved this problem? – jlago Nov 08 '13 at 16:13