I am trying to use SikuliIntegrator in a C# Winforms project on my Windows 64 bit laptop and it won't run because:
Additional information: Exception in thread "main" java.lang.UnsatisfiedLinkError: C:\Users\simon\AppData\Local\Temp\tmplib\VisionProxy.dll: Can't find dependent libraries
I've looked online as much as possible for the last 2 hours and I have added these variables to the System Environment Variables:
SIKULI_HOME = C:\SikuliX
JAVA_HOME= C:\Program Files (x86)\Java\jre7
PATH= %Path%;%JAVA_HOME%\bin;%SIKULI_HOME%\libs;
Still won't work. What am i missing???
I found the solution. I was using Java 7 and that is not supported so I did the following:
Installation Steps:
Download and install Sikuli using the self-extracting installer:
Sikuli-X-1.0rc3 (r905)-win32.exe. After installation is completed, a
folder named Sikuli X should be created on your system.
Do not start using Sikuli X now because it has some bugs.
Download the following zip file: Sikuli X r930. This contains
important bug fixes Open the downloaded zip file and locate the
folder called SIKULI-IDE. Copy the content in SIKULI-IDE to Sikuli X. The purpose of this step is to replace the files associated with r905 (the buggy
version) by the files associated with r930 that has the most recent
bug fixes.
Related
I cannot solve this exception, I've read the hadoop docu and all related stackoverflow questions that I could find.
My fileSystem.mkdirs(***) throws:
Exception in thread "main" java.lang.UnsatisfiedLinkError: org.apache.hadoop.io.nativeio.NativeIO$Windows.createDirectoryWithMode0(Ljava/lang/String;I)V
at org.apache.hadoop.io.nativeio.NativeIO$Windows.createDirectoryWithMode0(Native Method)
at org.apache.hadoop.io.nativeio.NativeIO$Windows.createDirectoryWithMode(NativeIO.java:524)
at org.apache.hadoop.fs.RawLocalFileSystem.mkOneDirWithMode(RawLocalFileSystem.java:465)
at org.apache.hadoop.fs.RawLocalFileSystem.mkdirsWithOptionalPermission(RawLocalFileSystem.java:518)
at org.apache.hadoop.fs.RawLocalFileSystem.mkdirs(RawLocalFileSystem.java:496)
at org.apache.hadoop.fs.FilterFileSystem.mkdirs(FilterFileSystem.java:316)
...
I am including the following dependencies in my app (via maven pom.xml), all in version 2.6.0-cdh5.13.0: hadoop-common, hadoop-hdfs, hadoop-client, hadoop-minicluster
My filesystem variable is a valid (hadoop-common) FileSystem (org.apache.hadoop.fs.FileSystem).
I downloaded the hadoop files from https://github.com/steveloughran/winutils/tree/master/hadoop-2.6.0/bin.
I stored the winutils.exe and all the other files from in version 2.6.0 to my local file system under C:\Temp\hadoop\bin.
I added the path variable HADOOP_HOME with C:\Temp\hadoop (yes, not the path to the bin directory).
The fallback is not used ("using builtin-java classes"), I am getting:
145 [main] DEBUG org.apache.hadoop.util.NativeCodeLoader - Trying to load the custom-built native-hadoop library...
147 [main] DEBUG org.apache.hadoop.util.NativeCodeLoader - Loaded the native-hadoop library
(See https://hadoop.apache.org/docs/r2.6.0/hadoop-project-dist/hadoop-common/NativeLibraries.html)
I understood, that this exception can be caused by a hadoop version mismatch, but I checked that the imported hadoop matches the hadoop I stored locally, version wise.
I am working on a Windows 10 x64 system and in IntelliJ.
Anybody has an idea, what I could check or even, what I am doing wrong?
UPDATE:
I run my main with the following VM options
-Dhadoop.home.dir=C:/Temp/hadoop
-Djava.library.path=C:/Temp/hadoop/bin
Without specifying the lib path, I get:
org.apache.hadoop.util.NativeCodeLoader - Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
To me setting VM Argument -Djava.library.path=C:\devTools\winutils-master\hadoop-3.0.0
resolved the issue.
The reason for this exception was:
I am importing 2.6.0-cdh5.13.0 via my maven pom, but I downloaded the pre-built files in version 2.6.0. Those are missing the changes made in the cdh5.13.0 variant (CDH is Cloudera’s platform that includes the Hadoop ecosystem). Hence, the versions are indeed in conflict.
If I import hadoop-common, hadoop-hdfs, hadoop-client like 2.6.0 instead of like 2.6.0-cdh5.13.0, the exception disappears (and I don't even need to set the VM options).
See http://archive-primary.cloudera.com/cdh5/cdh/5/hadoop-2.6.0-cdh5.13.0/hadoop-project-dist/hadoop-common/NativeLibraries.html
Check your java version. If java is 32bits version, you need uninstall and re-install with 64 bits version for hadoop.
Check command:
java -d32 -version;(no error, if 32 version)
java -d64 -version;(no error, if 64 version)
Download hadoop.dll and winutils.exe files from hadoop-3.0.0 and got resolve
https://github.com/steveloughran/winutils/tree/master/hadoop-3.0.0/bin
In my case, the issue was that i had hadoop.dll in system32,
if you run hadoop on windows and he finds hadoop.dll in System32 or in your HADOOP_HOME\bin then he consider that it's a cluster, the probleme is that clusters are not compatible with windows, so it fails.
Solution delete hadoop.dll from System32 and HADOOP_HOME\bin
see : Full answer
Had this issue and it turned out HADOOP_HOME was set to a 2.6.4 version folder. Updated it to a 3.0.0 folder and it worked. It seems in general either you have to update it on the calling end with -Djava.library.path or in your environment settings to 3.0.0.
For the environment variable, HADOOP_HOME is a system environment variable you can access via the command
rundll32.exe sysdm.cpl, EditEnvironmentVariables
This can be entered into ⊞ + R (windows key + R) followed by ctrl + shift and enter, or by opening powershell or cmd as admin.
From here I edited the system environment variable HADOOP_HOME to the 3.0.0 folder, and I updated the system PATH to HADOOP_HOME/bin. Be sure there are no conflicts in your user variables, such as in PATH.
After that, any terminal or program calling Spark should be restarted and checked to make sure it loaded the new environment variables.
I am having the same issue with writing parquet files in spark. Downloading the hadoop.dll and winutils.exe files from hadoop-3.0.0 and moving hadoop.dll to C:\Windows\System32 folder and moving winutils.exe to C:\hadoop\bin folder solved my problem.
Thanks Shailendra Singh for sharing the above link
I have a problem installing jpl library. I installed the latest swipl version (but I tried also unstable versions before):
SWI-Prolog 7.2.3 for Windows 7/8/10 64-bit edition
Then I added dependent paths to environment variables:
Variable: SWI_HOME_DIR
Value: C:\Program Files\swipl
Then I added, to Path these values:
%SWI_HOME_DIR%\lib\jpl.jar;
%SWI_HOME_DIR%\lib;
%SWI_HOME_DIR%\bin
I also added the VM argument like this:
-Djava.library.path="C:\Program Files\swipl\bin"
to make sure that Eclipse sees this folder.
After that I still get the error:
Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: C:\Program Files\swipl\bin\jpl.dll: Can't find dependent libraries
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1937)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1855)
at java.lang.Runtime.loadLibrary0(Runtime.java:870)
at java.lang.System.loadLibrary(System.java:1122)
at org.jpl7.JPL.loadNativeLibrary(JPL.java:79)
at org.jpl7.fli.Prolog.<clinit>(Prolog.java:41)
at org.jpl7.Query.open(Query.java:260)
at org.jpl7.Util.textToTerm(Util.java:102)
at org.jpl7.Query.Query1(Query.java:129)
at org.jpl7.Query.<init>(Query.java:120)
I'm 100% sure, that Eclipse sees that jpl.dll file, but in my opinion, it seems that it needs some other libraries.
I know that this thread is probably duplicate of either of these:
jpl.dll: Can't find dependent libraries
JPL Can't find dependent libraries of jpl.dll
but these questions are not answered or the answers doesn't helps in my case.
I added dependent paths to environment variables:
Variable: SWI_HOME_DIR
Value: C:\Program Files\swipl
Then I added, to Path these values:
%SWI_HOME_DIR%\lib\jpl.jar;
%SWI_HOME_DIR%\lib;
%SWI_HOME_DIR%\bin
This is the installation instructions:
Put the three library files (jpl.dll, jpl.jar and jpl.pl) where each can be found:
jpl.dll must be found by the Windows kernel, and can go in any
folder on your PATH environment variable;
perhaps %SWI_HOME_DIR%\bin
or your Windows system folder
jpl.jar must be found by any Java VM's (and compilers) used
with JPL. One possibility is to put it on your global CLASSPATH.
jpl.pl is a Prolog source module, and must be found by any
SWI-Prolog engines used with JPL:
I suggest putting it in %SWI_HOME_DIR%\library and then invoking
make_library_index/1 on that folder (see a SWI-Prolog manual
for details) so that the autoloader can find it.
I've written a Java program that uses OpenCV library. So far, I executed the program with eclipse (and set the Jar location in eclipse properties).
This is a college final project. My instructor now wants to run the program in his computer. How can I generate a runnable jar(using Ant or using Java code) that will load the Java OpenCV jar from specific location (a directory that will be located in the executable Jar directory), that will work with Linux and Windows (I understood that linux uses a Jar file, and Windows uses a dll file)?
I've tried using:
String currentDir = System.getProperty("user.dir");
System.load(currentDir + "/path_to_jar/opencv-248.jar");
(let's ignore the fact that it will only work with linux) But when executing the jar, the following error occurs:
OpenJDK 64-Bit Server VM warning: You have loaded library /path_to_jar/opencv-248.jar 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'.
Exception in thread "main" java.lang.UnsatisfiedLinkError: /path_to_jar/opencv-248.jar: /path_to_jar/opencv-248.jar: invalid ELF header (Possible cause: endianness mismatch)
Any help would be highly appreciated.
Use the classpath option for your java executable.
If you're running OpenJDK read the manpage at http://linux.die.net/man/1/java-java-1.6.0-openjdk
You should be able to use something along the lines of:
java -jar yourapp.jar -cp ./path_to_jar/
Another option is to build a JAR which includes its own dependencies. Here are some examples I found using the search terms "java create jar include dependencies":
Using Maven
Using Eclipse
I'm using Ubuntu 11.04 and Eclipse. I installed Xuggler succesfully, I've checked the environment variables and everything related with linux in their FAQ: http://wiki.xuggle.comFrequently_Asked_Questions#What.27s_up_with_java.lang.UnsatisfiedLinkError.3F
I also set up Eclipse according to their tutorial:
http://xuggle.wordpress.com/2009/01/23/how-to-write-your-first-xuggler-application-in-eclipse/
Whenever I try running any code which uses Xuggler I get the following error:
2011-09-14 14:17:30,093 [main] ERROR com.xuggle.ferry.JNILibraryLoader - Could not load library: xuggle-xuggler; version: 3; Visit http://www.xuggle.com/xuggler/faq/ to find common solutions to this problem
Exception in thread "main" java.lang.UnsatisfiedLinkError: no xuggle-xuggler in java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1681)
at java.lang.Runtime.loadLibrary0(Runtime.java:840)
at java.lang.System.loadLibrary(System.java:1047)
at com.xuggle.ferry.JNILibraryLoader.loadLibrary0(JNILibraryLoader.java:265)
at com.xuggle.ferry.JNILibraryLoader.loadLibrary(JNILibraryLoader.java:168)
at com.xuggle.xuggler.XugglerJNI.<clinit>(XugglerJNI.java:19)
at com.xuggle.xuggler.IContainer.<clinit>(IContainer.java:1457)
at com.xuggle.mediatool.MediaReader.<init>(MediaReader.java:137)
at com.xuggle.mediatool.ToolFactory.makeReader(ToolFactory.java:77)
at recode.main(recode.java:16)
So, how to solve this?
I got the answer/solution from the xuggler-users google group, credits to Navin Bhutada:
solve it by including the Xuggle variables before runing the netbeans like this:
export XUGGLE_HOME=/home/xyzuser/xuggler
export PATH=$XUGGLE_HOME/lib:$XUGGLE_HOME/bin:$PATH
export LD_LIBRARY_PATH=$XUGGLE_HOME/lib:$LD_LIBRARY_PATH
/usr/share/netbeans/6.9/bin/./netbeans"
I use eclipse, so I just changed that last line, running eclipse from its folder through the command line and everything worked just fine.
Note: If I export the variables and try opening eclipse from a shortcut on my desktop it doesn't work. The shortcut point to the same file I ran from the command line
TLDR:
export variables you got after installing
run Eclipse from the terminal.
You just download correct Xuggle from this page based on ur os:
http://xuggle.googlecode.com/svn/trunk/repo/share/java/xuggle/xuggle-xuggler/5.2/
And then extract the lib files to project home folder.
I've found that even though I may have my environment variables set correctly, explicitly including the Xuggler install dir in the java.library.path when executing saves me from that problem.
i.e. java -Djava.library.path="$XUGGLE_HOME" myExecutable
Cause Could be un-availability of dependency jars or version conflicts.
Adding the following jars in the classpath worked fine for me:
xuggle-xuggler-5.4.jar
slf4j-api-1.6.4.jar
logback-core-1.0.0.jar
logback-classic-1.0.0.jar
Note: Add them in the library folder using "Add jar/Folder" Option in netbeans.
I have application which use JNA and gets the audio and video. It works in my Linux box. But when i am testing it in Windows. It just never working. Because i am still learning, i will appreciate your suggestion how to fix it, i already spent few days and weeks only to work it out, but just dont get this why JAVA does not work simply, its a cross platform. Why should it require again System path or etc configuration.
I am totally lost now, why it works in Linux and it does not work in Windows XP ? How can i run it then ?
Inside the lib direcotry i have my JNA and Audio libraries.
C:\Documents and Settings\test\Desktop\test>dir
Volume in drive C has no label.
Volume Serial Number is 680F-0963
Directory of C:\Documents and Settings\test\Desktop\test
19/12/2010 22:09 <DIR> .
19/12/2010 22:09 <DIR> ..
19/12/2010 22:09 51.791 Audio.jar
19/12/2010 22:09 <DIR> lib
1 File(s) 51.791 bytes
3 Dir(s) 487.002.112 bytes free
Now trying to run Audio.jar, gets Fail 1:
C:\Documents and Settings\test\Desktop\test>java -Djava.library.path=~/jni -jar
Audio.jar
Exception in thread "main" java.lang.UnsatisfiedLinkError: Could not load librar
y gstreamer-0.10
at org.gstreamer.lowlevel.GNative.loadWin32Library(GNative.java:83)
at org.gstreamer.lowlevel.GNative.loadLibrary(GNative.java:43)
at org.gstreamer.lowlevel.GstNative.load(GstNative.java:42)
at org.gstreamer.lowlevel.GstNative.load(GstNative.java:39)
at org.gstreamer.Gst.<clinit>(Gst.java:59)
at video.MyVideo.simpletest(MyVideo.java:31)
at sipphone.MainApplet.run(MainApplet.java:58)
at sipphone.MainApplet.main(MainApplet.java:43)
Fail 2:
C:\Documents and Settings\test\Desktop\test>java -Djna.library.path=. -jar Audio
.jar
Exception in thread "main" java.lang.UnsatisfiedLinkError: Could not load librar
y gstreamer-0.10
at org.gstreamer.lowlevel.GNative.loadWin32Library(GNative.java:83)
at org.gstreamer.lowlevel.GNative.loadLibrary(GNative.java:43)
at org.gstreamer.lowlevel.GstNative.load(GstNative.java:42)
at org.gstreamer.lowlevel.GstNative.load(GstNative.java:39)
at org.gstreamer.Gst.<clinit>(Gst.java:59)
at video.MyVideo.simpletest(MyVideo.java:31)
at sipphone.MainApplet.run(MainApplet.java:58)
at sipphone.MainApplet.main(MainApplet.java:43)
You'll need to have the DLL installed, or at least in your JNA library path as others have pointed out.
It does add an extra dependency on Windows. It would be an extra dependency on Linux but gstreamer is preinstalled by your distribution. I ran into this same problem when I was making something to use a USB port from Java.
The only solution I know of to avoid the DLL would be to have a second version of the code you could call on Windows that would only use Win32 stuff (i.e. stuff that ships with Windows) but that would be a very large undertaking.
trying to run mediarenderer from cling package, I had the same error on windows xp.
i got the right libgstreamer-0.10.so from package GStreamer-WinBuilds-GPL-x86-Beta04-0.10.7.msi found in https://code.google.com/archive/p/ossbuild/downloads
once installed (environment variables PATH (for dependencies) and OSSBUILD_GSTREAMER_DIR set),
in a prompt, I was finally able to run mediarenderer using the following syntax to introduce lib's path :
Z:\Downloads\cling-distribution-2.1.0\cling-distribution-2.1.0\mediarenderer\target>java -Djna.library.path="C:\Program Files\OSSBuild\GStreamer\v0.10.7\bin" -jar cling-mediarenderer-2.1.0-standalone.jar
hope this helps as a starting point !
For Fail 1: I don't believe that the ~/ syntax will work on Windows. Try %HOME%\ instead. The tilde expansion happens in Bash, so things are a bit different in Windows.
For Fail 2: It doesn't look like the .dll is in your test directory, and you're setting the jna.library.path to ..
If the .dll's are in your lib directory, then shouldn't the paths be set to that directory, instead of ~/jni and .?