Cannot run Xuggler on linux - java

I have a problem running Xuggler on linux:
08:43:05.550 [main] WARN com.xuggle.ferry.JNILibrary - Failure: library load of library: xuggle; url: /tmp/xuggle/xuggle2624685369771797713.tmp; error: java.lang.UnsatisfiedLinkError: /tmp/xuggle/xuggle2624685369771797713.tmp: /tmp/xuggle/xuggle2624685369771797713.tmp: failed to map segment from shared object: Operation not permitted
08:43:05.565 [main] ERROR com.xuggle.ferry.JNILibraryLoader - Could not load library: xuggle; version: 5; Visit http://www.xuggle.com/xuggler/faq/ to find common solutions to this problem
Exception in thread "main" java.lang.UnsatisfiedLinkError: no xuggle in java.library.path
Same JAR works fine on Windows.
I tried to include xuggler-5.4.jar, 5.2.jar, I also tried to make maven project and to compile with maven, the problem persists.
Here is the CLASSPATH, so you can see I also included lately in the classpath the jar
/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.25.x86_64//jre/lib/ext:/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.25.x86_64//lib/tools.jar:/home/baidoc/libs/xuggle-xuggler-5.4.jar

Related

'RunTime:loadLib: libopencv_java430.so (failed) probably dependent libs missing' error while running sikuli test script in Red had 7.6

Used maven project:
My Automation sikuli script:
package Sikuli1.DesktopProject;
Error logs:
OpenJDK 64-Bit Server VM warning: You have loaded library /home/rajatesh/.Sikulix/SikulixLibs/libopencv_java430.so which might have disabled stack guard. The VM will try to fix the stack guard now.
It's highly recommended that you fix the library with 'execstack -c ', or link it with '-z noexecstack'.
[error] RunTime:loadLib: libopencv_java430.so (failed) probably dependent libs missing:
/home/rajatesh/.Sikulix/SikulixLibs/libopencv_java430.so: /home/rajatesh/.Sikulix/SikulixLibs/libopencv_java430.so: file too short
[error] Save your work, correct the problem and restart the IDE!
[error] see: https://github.com/RaiMan/SikuliX1/wiki/macOS-Linux:-Support-Libraries-for-OpenCV-4
TERMINATING: problem with native library: libopencv_java430.so
Exception in thread "main" java.lang.ExceptionInInitializerError at org.sikuli.script.Pattern.(Pattern.java:128) at Sikuli1.DesktopProject.SikuliProject.main(SikuliProject.java:11)
Caused by: org.sikuli.script.SikuliXception: fatal: problem with native library: libopencv_java430.so at org.sikuli.script.support.RunTime.terminate(RunTime.java:1140) at org.sikuli.script.support.RunTime.libsLoad(RunTime.java:1285) at org.sikuli.script.support.RunTime.loadLibrary(RunTime.java:1434) at org.sikuli.script.Finder$Finder2.(Finder.java:538)
... 2 more
You need to install opencv Java library. Note that you are using Redhat while Sikuli 2 works out of the box with Ubuntu flavors. So you need install required libs by yourself.

Setting up LibPostal (JPostal) on Windows in Java

I'm trying to setup libpostal/jpostal on my Windows 10 machine in a Java environment. I followed the Windows Installation Guide on GitHub.
I am able to see the libpostal folder installed under: C:\xxx\Program Files\libpostal\ with sub folders: .git, autom4te.cache, data, m4, resources etc.
However, when I run:
AddressExpander expander = AddressExpander.getInstance();
I get the following error:
Exception in thread "main" java.lang.UnsatisfiedLinkError: no jpostal_expander 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.mapzen.jpostal.AddressExpander.<clinit>(AddressExpander.java:7)
at jpostal.JPostal.execute(JPostal.java:24)
at global_projects.GlobalMain.main(GlobalMain.java:37)
I normally use Maven for my build. However, since there is currently no Maven repository for JPostal, I am using Gradle.
I followed the solution suggested on this GitHub thread by adding the following gradle.build file, however I still get the same error.
What am I doing wrong?

JCEF initialization issue on MacOS

My Java app which uses JCEF, works perfectly fine in Windows Operating System. But when I try to run this sample application on MacOS Mojave, then it's facing initialization issues. I have added the desired jars and JCEF MacOS libraries/binaries into my project, also added JVM parameter to startup configuration as:
-Djava.library.path=*/jcef/jcef_build/native/Release,
but at the time of running application im facing the folowing error:
Exception in thread "main" java.lang.UnsatisfiedLinkError: /jcef_build/native/Release/libjcef.dylib: dlopen(*/jcef_build/native/Release/libjcef.dylib, 1): Library not loaded: #rpath/Frameworks/Chromium Embedded Framework.framework/Chromium Embedded Framework
Referenced from: */jcef_build/native/Release/libjcef.dylib
Reason: image not found
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1941)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1857)
at java.lang.Runtime.loadLibrary0(Runtime.java:870)
at java.lang.System.loadLibrary(System.java:1122)
at org.cef.CefApp.<init>(CefApp.java:149)
at org.cef.CefApp.getInstance(CefApp.java:237)
at org.cef.CefApp.getInstance(CefApp.java:224)
at MainFrame.<init>(MainFrame.java:70)
at MainFrame.main(MainFrame.java:145)
Please any one suggest what I am missing in running this sample application.

org.usb4java.LoaderException: Native library not found in classpath error

Am an trying to use the usb4java library with a project running in Ubuntu 64bit. I am getting the following error;
30 Jul 2015 09:46:16,225 INFO Controller : Working Directory: /opt/dock
Exception in thread "main" java.lang.ExceptionInInitializerError
at uk.co.swimtag.control.Controller.findDevice(Controller.java:755)
at uk.co.swimtag.control.Controller.startApplication(Controller.java:150)
at uk.co.swimtag.control.Controller.main(Controller.java:104)
Caused by: org.usb4java.LoaderException: Native library not found in classpath: /org/usb4java/linux-x86_64/libusb4java.so
at org.usb4java.Loader.extractLibrary(Loader.java:281)
at org.usb4java.Loader.load(Loader.java:358)
at org.usb4java.LibUsb.<clinit>(LibUsb.java:640)
... 3 more
Here are the two jars in the manifest file, and am sure the x86_64 lib is in the project;
lib/mail.jar
lib/gson-1.6.jar
lib/usb4java-1.2.0.jar
lib/libusb4java-1.2.0-linux-x-86_64.jar
conf/
Any one had similar problems with usb4java. Probably something silly I have missed.
Thanks
Maybe it is just a typo. But if you're sure the jar with natives is on your CLASSPATH, it may be that in your manifest file you wrote: libusb4java-1.2.0-linux-x-86_64.jar instead of libusb4java-1.2.0-linux-x86_64.jar

How to connect JPL with SWI-Prolog in Mac OS X

Hi i have a problem with a jpl interface. I want connect JPL with swi-prolog installed with mac-ports with eclipse. I have a jpl.jar and i have tried to import the jar file in eclipse with build path but i have this error: "no jpl in java.library.path".
So i have copied libjpl.dylib in a /opt/local/lib/swipl-7.1.29/bin/ and when i execute the code i have this error: "Exception in thread "main" java.lang.UnsatisfiedLinkError: /opt/local/lib/swipl-7.1.29/bin/libjpl.dylib: dlopen(/opt/local/lib/swipl-7.1.29/bin/libjpl.dylib, 1): Library not loaded: /Users/janw/stable/lib/swipl/lib/x86_64-darwin13.0.0/libswipl.dylib
Referenced from: /opt/local/lib/swipl-7.1.29/bin/libjpl.dylib
Reason: image not found"
After a anoying waste of time i found the solution about that problem.
First of all, its completely necesary to install swi-prolog via macports, if not, as i did, when you point in the
Djava.library.path=/users/rivax/Applications/SWI-Prolog.app/Contents/swipl/lib/x86_64-darwin13.0.0
this exception will apear
Exception in thread "main" java.lang.UnsatisfiedLinkError: /Users/rivax/Applications/SWI-Prolog.app/Contents/swipl/lib/x86_64-darwin13.0.0/libjpl.dylib: dlopen(/Users/rivax/Applications/SWI-Prolog.app/Contents/swipl/lib/x86_64-darwin13.0.0/libjpl.dylib, 1): Library not loaded: /Users/janw/stable/lib/swipl/lib/x86_64-darwin13.0.0/libswipl.dylib
Referenced from: /Users/rivax/Applications/SWI-Prolog.app/Contents/swipl/lib/x86_64-darwin13.0.0/libjpl.dylib
Reason: image not found
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary1(ClassLoader.java:1965)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1890)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1880)
at java.lang.Runtime.loadLibrary0(Runtime.java:849)
at java.lang.System.loadLibrary(System.java:1088)
at jpl.JPL.loadNativeLibrary(JPL.java:100)
at jpl.fli.Prolog.<clinit>(Prolog.java:85)
at jpl.Query.open(Query.java:286)
at jpl.Util.textToTerm(Util.java:162)
at jpl.Query.<init>(Query.java:198)
at consultasProlog.Consultas.consultaFicheroProlog(Consultas.java:19)
at utilidades.RellenarModelo.ejecutarArchivo(RellenarModelo.java:30)
at javaprolog.JavaProlog.main(JavaProlog.java:30)
Java Result: 1
So follow these steps.
port install swi-prolog on terminal , if you dont have install already macports command not found will apear so go to https://www.macports.org/install.php and install macports.
navigate to the path of swi prolog macports installation which mine is
/opt/local/lib/swipl-6.6.6/lib/x86_64-darwin14.0.0
copy this path and set in java.library.path in the java VM as -Djava.library.path=/opt/local/lib/swipl-6.6.6/lib/x86_64-darwin14.0.0
Now .pl with jpl.jar will be able to execute and the consults will run.
Hope it will help you and every person who find this hell problem.
Cheers frank.

Categories

Resources