Error occurred during initialization of VM Unable to load native library: - java

I have JRE made for Android. I am trying to execute /data/local/tmp/j/java but that gives
following error:
Error occurred during initialization of VM Unable to load native library:
The other files for java are at: /data/local/tmp/java.
I have executed following commands:
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/data/local/tmp/java/lib/jli
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/data/local/tmp/java/lib
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/data/local/tmp/java/lib/server
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/data/local/tmp/java
But the same error as above is still showing. The reason why i have moved java executable to /data/local/tmp/j/java is because on Android you can only execute and include lib[name].so files in jniLibs/abi so i am unable to move bin, lib folders to /jniLibs/abi.
I would be very grateful if someone could help me out with this as i am working for days to get this completed.

Related

Why I am getting UnsatisfiedLinkError

I m trying to run a Spark maven Scala project.
the mvn install didn't succeded (java.lang.UnsatisfiedLinkError) :
*** RUN ABORTED ***
java.lang.UnsatisfiedLinkError: org.apache.hadoop.io.nativeio.NativeIO$Windows.access0(Ljava/lang/String;I)Z
at org.apache.hadoop.io.nativeio.NativeIO$Windows.access0(Native Method)
at org.apache.hadoop.io.nativeio.NativeIO$Windows.access(NativeIO.java:609)
at org.apache.hadoop.fs.FileUtil.canWrite(FileUtil.java:996)
at org.apache.hadoop.hdfs.server.common.Storage$StorageDirectory.analyzeStorage(Storage.java:490)
at org.apache.hadoop.hdfs.server.namenode.FSImage.recoverStorageDirs(FSImage.java:321)
at org.apache.hadoop.hdfs.server.namenode.FSImage.recoverTransitionRead(FSImage.java:215)
at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.loadFSImage(FSNamesystem.java:976)
at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.loadFromDisk(FSNamesystem.java:681)
at org.apache.hadoop.hdfs.server.namenode.NameNode.loadNamesystem(NameNode.java:584)
at org.apache.hadoop.hdfs.server.namenode.NameNode.initialize(NameNode.java:643)
at org.apache.hadoop.hdfs.server.namenode.NameNode.<init>(NameNode.java:810)
at org.apache.hadoop.hdfs.server.namenode.NameNode.<init>(NameNode.java:794)
at org.apache.hadoop.hdfs.server.namenode.NameNode.createNameNode(NameNode.java:1487)
I didn't understand the cause of the error since the Hadoop path is set and contains winutils.exe , and i have already run another java-spark project successfully ?
I just added hadoop.dll To the hadoop path and the error disappear.

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.

Cannot run Xuggler on linux

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

Eclipse Error: no jogl in java.library.path

So I'm quite new to eclipse (first week of actually trying to use it to develop stuff.) and I tried to import an example project from http://unfoldingmaps.org/ and upon trying to compile their test project I'm greeted with the error:
Eclipse Error: Exception in thread "Animation Thread" java.lang.UnsatisfiedLinkError: no jogl in java.library.path
Right now my $path sys var looks like this:
C:\csvn\Python25\;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:\Program Files\SourceGear\Common\DiffMerge\;C:\Program Files\TortoiseSVN\bin;C:\Program Files\MySQL\MySQL Server 6.0\bin; %JAVA_HOME%;%ANT_HOME%\bin
Is there something that I'm missing? Jogl.jar is in the project but it seems like the project is just skipping over stuff.. help?
It seems that your application requires some sort of native library, you need to specify the parameter -Djava.library.path=/path/to/libs on the VM args field on eclipse.

Error occurred during initialization of VM (java.lang.StackOverflowError) in Android

Today I suddenly started encountering
Error occurred during initialization of VMjava/lang/NoClassDefFoundError: java/lang/ref/FinalReference
in Eclipse Indigo. I followed here and also I tried here and
now I am getting:
Error occurred during initialization of VM java.lang.StackOverflowError
I am building an Android application using Eclipse Java EE IDE.
EDIT: I don't know why it caused the problem but now I am able to run my activity by going through run-run configurations-android application-run.
Problem persist due to JVM. If you will give command like java -version. It gives same problem.
If you want to start eclipse.exe by means of the following :
E:\softwaredownload\eclipse-jee-helios-SR2-win32\eclipse>eclipse -vm "c:\Program Files\Java\jdk1.7.0_03\jre\bin\javaw.exe

Categories

Resources