How do I load the vlcj library? - java
I am trying to play youtube video using vlcj.
"NativeLibrary.addSearchPath(RuntimeUtil.getLibVlcLibraryName()," C:\\Program Files \\VideoLAN\\VLC");"
So I am trying to load a library using this code.
However, the libvlc.dll and libvlccore.dll files could not be loaded due to an error.
`
java.lang.RuntimeException: Failed to load the native library.
The error was "Unable to load library 'libvlc': Native library (win32-x86-64/libvlc.dll) not found in resource path ([file:/C:/Program%20Files/Java/jdk1.8.0_181/jre/lib/charsets.jar, file:/C:/Program%20Files/Java/jdk1.8.0_181/jre/lib/deploy.jar, file:/C:/Program%20Files/Java/jdk1.8.0_181/jre/lib/ext/access-bridge-64.jar, file:/C:/Program%20Files/Java/jdk1.8.0_181/jre/lib/ext/cldrdata.jar, file:/C:/Program%20Files/Java/jdk1.8.0_181/jre/lib/ext/dnsns.jar, file:/C:/Program%20Files/Java/jdk1.8.0_181/jre/lib/ext/jaccess.jar, file:/C:/Program%20Files/Java/jdk1.8.0_181/jre/lib/ext/jfxrt.jar, file:/C:/Program%20Files/Java/jdk1.8.0_181/jre/lib/ext/localedata.jar, file:/C:/Program%20Files/Java/jdk1.8.0_181/jre/lib/ext/nashorn.jar, file:/C:/Program%20Files/Java/jdk1.8.0_181/jre/lib/ext/sunec.jar, file:/C:/Program%20Files/Java/jdk1.8.0_181/jre/lib/ext/sunjce_provider.jar, file:/C:/Program%20Files/Java/jdk1.8.0_181/jre/lib/ext/sunmscapi.jar, file:/C:/Program%20Files/Java/jdk1.8.0_181/jre/lib/ext/sunpkcs11.jar, file:/C:/Program%20Files/Java/jdk1.8.0_181/jre/lib/ext/zipfs.jar, file:/C:/Program%20Files/Java/jdk1.8.0_181/jre/lib/javaws.jar, file:/C:/Program%20Files/Java/jdk1.8.0_181/jre/lib/jce.jar, file:/C:/Program%20Files/Java/jdk1.8.0_181/jre/lib/jfr.jar, file:/C:/Program%20Files/Java/jdk1.8.0_181/jre/lib/jfxswt.jar, file:/C:/Program%20Files/Java/jdk1.8.0_181/jre/lib/jsse.jar, file:/C:/Program%20Files/Java/jdk1.8.0_181/jre/lib/management-agent.jar, file:/C:/Program%20Files/Java/jdk1.8.0_181/jre/lib/plugin.jar, file:/C:/Program%20Files/Java/jdk1.8.0_181/jre/lib/resources.jar, file:/C:/Program%20Files/Java/jdk1.8.0_181/jre/lib/rt.jar, file:/D:/project/AnimalCrossing/mod/build/classes/main/, file:/D:/project/AnimalCrossing/mod/build/resources/main/, file:/D:/project/AnimalCrossing/mod/libs/slf4j-api-1.7.9.jar, file:/D:/project/AnimalCrossing/mod/libs/vlcj.jar, file:/C:/Users/gustj/.gradle/caches/minecraft/deobfedDeps/compileDummy.jar, file:/C:/Users/gustj/.gradle/caches/minecraft/deobfedDeps/providedDummy.jar, file:/C:/Users/gustj/.gradle/caches/minecraft/net/minecraftforge/forge/1.12.2-14.23.5.2847/snapshot/20171003/forgeSrc-1.12.2-14.23.5.2847.jar, file:/C:/Users/gustj/.gradle/caches/modules-2/files-2.1/com.google.code.findbugs/jsr305/3.0.1/f7be08ec23c21485b9b5a1cf1654c2ec8c58168d/jsr305-3.0.1.jar, file:/C:/Users/gustj/.gradle/caches/modules-2/files-2.1/com.mojang/patchy/1.1/aef610b34a1be37fa851825f12372b78424d8903/patchy-1.1.jar, file:/C:/Users/gustj/.gradle/caches/modules-2/files-2.1/oshi-project/oshi-core/1.1/9ddf7b048a8d701be231c0f4f95fd986198fd2d8/oshi-core-1.1.jar, file:/C:/Users/gustj/.gradle/caches/modules-2/files-2.1/net.java.dev.jna/jna/4.4.0/cb208278274bf12ebdb56c61bd7407e6f774d65a/jna-4.4.0.jar, file:/C:/Users/gustj/.gradle/caches/modules-2/files-2.1/net.java.dev.jna/platform/3.4.0/e3f70017be8100d3d6923f50b3d2ee17714e9c13/platform-3.4.0.jar, file:/C:/Users/gustj/.gradle/caches/modules-2/files-2.1/com.ibm.icu/icu4j-core-mojang/51.2/63d216a9311cca6be337c1e458e587f99d382b84/icu4j-core-mojang-51.2.jar, file:/C:/Users/gustj/.gradle/caches/modules-2/files-2.1/net.sf.jopt-simple/jopt-simple/5.0.3/cdd846cfc4e0f7eefafc02c0f5dce32b9303aa2a/jopt-simple-5.0.3.jar, file:/C:/Users/gustj/.gradle/caches/modules-2/files-2.1/io.netty/netty-all/4.1.9.Final/97860965d6a0a6b98e7f569f3f966727b8db75/netty-all-4.1.9.Final.jar, file:/C:/Users/gustj/.gradle/caches/modules-2/files-2.1/com.google.guava/guava/21.0/3a3d111be1be1b745edfa7d91678a12d7ed38709/guava-21.0.jar, file:/C:/Users/gustj/.gradle/caches/modules-2/files-2.1/org.apache.commons/commons-lang3/3.5/6c6c702c89bfff3cd9e80b04d668c5e190d588c6/commons-lang3-3.5.jar, file:/C:/Users/gustj/.gradle/caches/modules-2/files-2.1/commons-io/commons-io/2.5/2852e6e05fbb95076fc091f6d1780f1f8fe35e0f/commons-io-2.5.jar, file:/C:/Users/gustj/.gradle/caches/modules-2/files-2.1/commons-codec/commons-codec/1.10/4b95f4897fa13f2cd904aee711aeafc0c5295cd8/commons-codec-1.10.jar, file:/C:/Users/gustj/.gradle/caches/modules-2/files-2.1/net.java.jutils/jutils/1.0.0/e12fe1fda814bd348c1579329c86943d2cd3c6a6/jutils-1.0.0.jar, file:/C:/Users/gustj/.gradle/caches/modules-2/files-2.1/com.google.code.gson/gson/2.8.0/c4ba5371a29ac9b2ad6129b1d39ea38750043eff/gson-2.8.0.jar, file:/C:/Users/gustj/.gradle/caches/modules-2/files-2.1/com.mojang/authlib/1.5.25/9834cdf236c22e84b946bba989e2f94ef5897c3c/authlib-1.5.25.jar, file:/C:/Users/gustj/.gradle/caches/modules-2/files-2.1/com.mojang/realms/1.10.22/bd0dccebdf3744c75f1ca20063f16e8f7d5e663f/realms-1.10.22.jar, file:/C:/Users/gustj/.gradle/caches/modules-2/files-2.1/org.apache.commons/commons-compress/1.8.1/a698750c16740fd5b3871425f4cb3bbaa87f529d/commons-compress-1.8.1.jar, file:/C:/Users/gustj/.gradle/caches/modules-2/files-2.1/org.apache.httpcomponents/httpclient/4.3.3/18f4247ff4572a074444572cee34647c43e7c9c7/httpclient-4.3.3.jar, file:/C:/Users/gustj/.gradle/caches/modules-2/files-2.1/commons-logging/commons-logging/1.1.3/f6f66e966c70a83ffbdb6f17a0919eaf7c8aca7f/commons-logging-1.1.3.jar, file:/C:/Users/gustj/.gradle/caches/modules-2/files-2.1/org.apache.httpcomponents/httpcore/4.3.2/31fbbff1ddbf98f3aa7377c94d33b0447c646b6e/httpcore-4.3.2.jar, file:/C:/Users/gustj/.gradle/caches/modules-2/files-2.1/it.unimi.dsi/fastutil/7.1.0/9835253257524c1be7ab50c057aa2d418fb72082/fastutil-7.1.0.jar, file:/C:/Users/gustj/.gradle/caches/modules-2/files-2.1/org.apache.logging.log4j/log4j-api/2.8.1/e801d13612e22cad62a3f4f3fe7fdbe6334a8e72/log4j-api-2.8.1.jar, file:/C:/Users/gustj/.gradle/caches/modules-2/files-2.1/org.apache.logging.log4j/log4j-core/2.8.1/4ac28ff2f1ddf05dae3043a190451e8c46b73c31/log4j-core-2.8.1.jar, file:/C:/Users/gustj/.gradle/caches/modules-2/files-2.1/com.mojang/text2speech/1.10.3/48fd510879dff266c3815947de66e3d4809f8668/text2speech-1.10.3.jar, file:/C:/Users/gustj/.gradle/caches/modules-2/files-2.1/net.minecraft/launchwrapper/1.12/111e7bea9c968cdb3d06ef4632bf7ff0824d0f36/launchwrapper-1.12.jar, file:/C:/Users/gustj/.gradle/caches/modules-2/files-2.1/org.jline/jline/3.5.1/51800e9d7a13608894a5a28eed0f5c7fa2f300fb/jline-3.5.1.jar, file:/C:/Users/gustj/.gradle/caches/modules-2/files-2.1/org.ow2.asm/asm-debug-all/5.2/3354e11e2b34215f06dab629ab88e06aca477c19/asm-debug-all-5.2.jar, file:/C:/Users/gustj/.gradle/caches/modules-2/files-2.1/com.typesafe.akka/akka-actor_2.11/2.3.3/ed62e9fc709ca0f2ff1a3220daa8b70a2870078e/akka-actor_2.11-2.3.3.jar, file:/C:/Users/gustj/.gradle/caches/modules-2/files-2.1/com.typesafe/config/1.2.1/f771f71fdae3df231bcd54d5ca2d57f0bf93f467/config-1.2.1.jar, file:/C:/Users/gustj/.gradle/caches/modules-2/files-2.1/org.scala-lang/scala-actors-migration_2.11/1.1.0/dfa8bc42b181d5b9f1a5dd147f8ae308b893eb6f/scala-actors-migration_2.11-1.1.0.jar, file:/C:/Users/gustj/.gradle/caches/modules-2/files-2.1/org.scala-lang/scala-compiler/2.11.1/56ea2e6c025e0821f28d73ca271218b8dd04926a/scala-compiler-2.11.1.jar, file:/C:/Users/gustj/.gradle/caches/modules-2/files-2.1/org.scala-lang.plugins/scala-continuations-library_2.11/1.0.2/e517c53a7e9acd6b1668c5a35eccbaa3bab9aac/scala-continuations-library_2.11-1.0.2.jar, file:/C:/Users/gustj/.gradle/caches/modules-2/files-2.1/org.scala-lang.plugins/scala-continuations-plugin_2.11.1/1.0.2/f361a3283452c57fa30c1ee69448995de23c60f7/scala-continuations-plugin_2.11.1-1.0.2.jar, file:/C:/Users/gustj/.gradle/caches/modules-2/files-2.1/org.scala-lang/scala-library/2.11.1/e11da23da3eabab9f4777b9220e60d44c1aab6a/scala-library-2.11.1.jar, file:/C:/Users/gustj/.gradle/caches/modules-2/files-2.1/org.scala-lang.modules/scala-parser-combinators_2.11/1.0.1/f05d7345bf5a58924f2837c6c1f4d73a938e1ff0/scala-parser-combinators_2.11-1.0.1.jar, file:/C:/Users/gustj/.gradle/caches/modules-2/files-2.1/org.scala-lang/scala-reflect/2.11.1/6580347e61cc7f8e802941e7fde40fa83b8badeb/scala-reflect-2.11.1.jar, file:/C:/Users/gustj/.gradle/caches/modules-2/files-2.1/org.scala-lang.modules/scala-swing_2.11/1.0.1/b1cdd92bd47b1e1837139c1c53020e86bb9112ae/scala-swing_2.11-1.0.1.jar, file:/C:/Users/gustj/.gradle/caches/modules-2/files-2.1/org.scala-lang.modules/scala-xml_2.11/1.0.2/820fbca7e524b530fdadc594c39d49a21ea0337e/scala-xml_2.11-1.0.2.jar, file:/C:/Users/gustj/.gradle/caches/modules-2/files-2.1/lzma/lzma/0.0.1/521616dc7487b42bef0e803bd2fa3faf668101d7/lzma-0.0.1.jar, file:/C:/Users/gustj/.gradle/caches/modules-2/files-2.1/net.sf.trove4j/trove4j/3.0.3/42ccaf4761f0dfdfa805c9e340d99a755907e2dd/trove4j-3.0.3.jar, file:/C:/Users/gustj/.gradle/caches/modules-2/files-2.1/org.apache.maven/maven-artifact/3.5.3/7dc72b6d6d8a6dced3d294ed54c2cc3515ade9f4/maven-artifact-3.5.3.jar, file:/C:/Users/gustj/.gradle/caches/modules-2/files-2.1/com.paulscode/codecjorbis/20101023/c73b5636faf089d9f00e8732a829577de25237ee/codecjorbis-20101023.jar, file:/C:/Users/gustj/.gradle/caches/modules-2/files-2.1/com.paulscode/codecwav/20101023/12f031cfe88fef5c1dd36c563c0a3a69bd7261da/codecwav-20101023.jar, file:/C:/Users/gustj/.gradle/caches/modules-2/files-2.1/com.paulscode/libraryjavasound/20101123/5c5e304366f75f9eaa2e8cca546a1fb6109348b3/libraryjavasound-20101123.jar, file:/C:/Users/gustj/.gradle/caches/modules-2/files-2.1/com.paulscode/librarylwjglopenal/20100824/73e80d0794c39665aec3f62eee88ca91676674ef/librarylwjglopenal-20100824.jar, file:/C:/Users/gustj/.gradle/caches/modules-2/files-2.1/com.paulscode/soundsystem/20120107/419c05fe9be71f792b2d76cfc9b67f1ed0fec7f6/soundsystem-20120107.jar, file:/C:/Users/gustj/.gradle/caches/modules-2/files-2.1/net.java.jinput/jinput/2.0.5/39c7796b469a600f72380316f6b1f11db6c2c7c4/jinput-2.0.5.jar, file:/C:/Users/gustj/.gradle/caches/modules-2/files-2.1/org.lwjgl.lwjgl/lwjgl/2.9.4-nightly-20150209/697517568c68e78ae0b4544145af031c81082dfe/lwjgl-2.9.4-nightly-20150209.jar, file:/C:/Users/gustj/.gradle/caches/modules-2/files-2.1/org.lwjgl.lwjgl/lwjgl_util/2.9.4-nightly-20150209/d51a7c040a721d13efdfbd34f8b257b2df882ad0/lwjgl_util-2.9.4-nightly-20150209.jar, file:/C:/Users/gustj/.gradle/caches/modules-2/files-2.1/java3d/vecmath/1.5.2/79846ba34cbd89e2422d74d53752f993dcc2ccaf/vecmath-1.5.2.jar, file:/C:/Users/gustj/.gradle/caches/modules-2/files-2.1/ca.weblite/java-objc-bridge/1.0.0/6ef160c3133a78de015830860197602ca1c855d3/java-objc-bridge-1.0.0.jar, file:/C:/Users/gustj/.gradle/caches/modules-2/files-2.1/org.scala-lang/scala-actors/2.11.0/8ccfb6541de179bb1c4d45cf414acee069b7f78b/scala-actors-2.11.0.jar, file:/C:/Users/gustj/.gradle/caches/modules-2/files-2.1/org.codehaus.plexus/plexus-utils/3.1.0/60eecb6f15abdb1c653ad80abaac6fe188b3feaa/plexus-utils-3.1.0.jar, file:/C:/Users/gustj/.gradle/caches/modules-2/files-2.1/net.java.jinput/jinput-platform/2.0.5/7ff832a6eb9ab6a767f1ade2b548092d0fa64795/jinput-platform-2.0.5-natives-linux.jar, file:/C:/Users/gustj/.gradle/caches/modules-2/files-2.1/net.java.jinput/jinput-platform/2.0.5/385ee093e01f587f30ee1c8a2ee7d408fd732e16/jinput-platform-2.0.5-natives-windows.jar, file:/C:/Users/gustj/.gradle/caches/modules-2/files-2.1/net.java.jinput/jinput-platform/2.0.5/53f9c919f34d2ca9de8c51fc4e1e8282029a9232/jinput-platform-2.0.5-natives-osx.jar, file:/C:/Users/gustj/.gradle/caches/modules-2/files-2.1/org.lwjgl.lwjgl/lwjgl-platform/2.9.4-nightly-20150209/b84d5102b9dbfabfeb5e43c7e2828d98a7fc80e0/lwjgl-platform-2.9.4-nightly-20150209-natives-windows.jar, file:/C:/Users/gustj/.gradle/caches/modules-2/files-2.1/org.lwjgl.lwjgl/lwjgl-platform/2.9.4-nightly-20150209/931074f46c795d2f7b30ed6395df5715cfd7675b/lwjgl-platform-2.9.4-nightly-20150209-natives-linux.jar, file:/C:/Users/gustj/.gradle/caches/modules-2/files-2.1/org.lwjgl.lwjgl/lwjgl-platform/2.9.4-nightly-20150209/bcab850f8f487c3f4c4dbabde778bb82bd1a40ed/lwjgl-platform-2.9.4-nightly-20150209-natives-osx.jar, file:/C:/Users/gustj/.gradle/caches/minecraft/net/minecraftforge/forge/1.12.2-14.23.5.2847/start/, file:/C:/Program%20Files/JetBrains/IntelliJ%20IDEA%20Community%20Edition%202019.3.1/lib/idea_rt.jar, file:/C:/Users/gustj/.IdeaIC2019.3/system/groovyHotSwap/gragent.jar, file:/C:/Users/gustj/.IdeaIC2019.3/system/captureAgent/debugger-agent.jar, asmgen:/])".
The required native libraries are named "libvlc.dll" and "libvlccore.dll".
In the text below <libvlc-path> represents the name of the directory containing "libvlc.dll" and "libvlccore.dll"...
There are a number of different ways to specify where to find the native libraries:
1. Include NativeLibrary.addSearchPath("libvlc", "<libvlc-path>"); at the start of your application code.
2. Include System.setProperty("jna.library.path", "<libvlc-path>"); at the start of your application code.
3. Specify -Djna.library.path=<libvlc-path> on the command-line when starting your application.
4. Add <libvlc-path> to the system search path (and reboot).
If this still does not work, then it may be necessary to explicitly add the native library directory to the operating
system configuration - e.g. on Linux this might mean setting the LD_LIBRARY_PATH environment variable, or adding
configuration to the "/etc/ld.so.conf" file or the "/etc/ld.so.conf.d" directory. Of these options, setting
LD_LIBRARY_PATH is the only one that would not require root privileges.
Finally, it is not possible to mix CPU architectures - it is not possible for a 64-bit Java Virtual Machine to load
32-bit native libraries.
More information may be available in the log.
`
I installed 64-bit 1.8.0_181 jvm, jre, and vlc is also 64-bit installed in the "C:\Program Files\VideoLAN\VLC" folder. and I use vlcj 3.11.0, jna 4.4.0, jna-platform 3.4.0 version. how can I solve it?
Related
Error when compiling plugin filter on ImageJ
Getting this error message whenever I am trying to compile a plugin filter. Not sure what is causing that. ImageJ 1.53a; Java 1.8.0_172 [64-bit]; Mac OS X 10.15.7; 33MB of 3000MB (1%) warning: [options] bootstrap class path not set in conjunction with -source 1.6 /private/var/folders/nm/nftqfvnn4_7c87p06n3qztl00000gn/T/AppTranslocation/071310B3-FF74-405F-B175-3C92927EC9DB/d/ImageJ.app/plugins/Filters/Filter_Plugin.java:9: error: error while writing Filter_Plugin: /private/var/folders/nm/nftqfvnn4_7c87p06n3qztl00000gn/T/AppTranslocation/071310B3-FF74-405F-B175-3C92927EC9DB/d/ImageJ.app/plugins/Filters/Filter_Plugin.class (Read-only file system) public class Filter_Plugin implements PlugInFilter { ^ 1 error 1 warning
This is likely caused by the Path Randomization feature in Mac OSX (maybe because you're running ImageJ from within a mounted dmg file?). See also this topic on the Image.sc forum: https://forum.image.sc/t/imagej-stopped-working-when-we-upgraded-to-macos-sierra-10-12/3005/7?u=imagejan Quoting from there: You can disable path randomization by moving ImageJ.app out of the ImageJ folder and then copying it back. In general, issues with ImageJ (both usage and development) are best discussed on https://forum.image.sc/tag/imagej.
Errors when trying to run Nd4j with Cuda
I've followed about every tutorial I could find, but somehow I can't seem to get Nd4j to work with a Cuda backend. I think I'm missing a library, but I can't figure out which one or where to download it. The error I'm getting is: 18:23:23.872 [main] WARN org.nd4j.linalg.factory.Nd4jBackend - Skipped [JCublasBackend] backend (unavailable): java.lang.UnsatisfiedLinkError: no cudart in java.library.path 18:23:23.958 [main] INFO org.nd4j.linalg.factory.Nd4jBackend - Loaded [CpuBackend] backend I'm using Nd4j and I have (amongst a whole bunch of others) the following jars on my class path: nd4j-native-1.0.0-beta3.jar nd4j-native-api-1.0.0-beta3.jar cuda-10.0-7.3-1.4.3.jar nd4j-cuda-10.0-1.0.0-beta3.jar. Cuda 10.0 is successfully installed: C:\Users\username>nvcc -V nvcc: NVIDIA (R) Cuda compiler driver Copyright (c) 2005-2018 NVIDIA Corporation Built on Sat_Aug_25_21:08:04_Central_Daylight_Time_2018 Cuda compilation tools, release 10.0, V10.0.130 I tried to point Java to the Cuda bin directory like so: -Djava.library.path="C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.0\bin" but that makes no difference. Furthermore, I've tried the mvn command on the pom.xml's inside nd4j-cuda-10.0-platform-1.0.0-beta3.jar and cuda-platform-10.0-7.3-1.4.3.jar, which results in a download of a lot of jars, but none of them appear to contain the dll I'm missing. When searching around I found other users talking about jars like 'cuda-10.0-7.3-1.4.3-windows-x86_64.jar' that should contain a jnicudart.dll, but I can't find such a jar anywhere. What am I missing here? --UPDATE-- I've updated everything to beta5, and found a cuda jar containing the missing jnicudart.dll, but I still get the same error. I have used Dependencies to check what's wrong, and this is the result: It says the checksum of the NVidia cudart64_100.dll is incorrect. Would this be related to NVidia Cuda10 not supporting my Geforce GT 730 because it is a Fermi architecture? Or is the cuda installation corrupt or something?
please update your nd4j/dl4j version to 1.0.0-beta5 please tell me, what’s your GPU model name and nvidia driver version? i.e. show nvidia-smi output.
OK I figured it out; had to install Cuda8.0 and revert all Nd4j to beta2, and add the correct cuda-8.9-6.0-1.4.1-windows-x86_64.jar to my classpath. Furthermore, I had to restart my IDE for the windows PATH environment to be updated so that the CUDA 8 bin directory was in it. And then I found out that CUDA backend requires compute capatibility of 3.0 and above to run and my retro card was only 2.1, so all was for nothing :/ Will have to purchase a new GPU I guess...
java.lang.UnsatisfiedLinkError: ars3wapi32 still after updating path variable
I am trying to set up On Demand Server in my local machine and when ever I am deploying the application on tomcat server I am getting below error message on browser. I have updated the PATH variable also. root cause java.lang.UnsatisfiedLinkError: ars3wapi32 (Not found in java.library.path) java.lang.ClassLoader.loadLibraryWithPath(ClassLoader.java:1007) java.lang.ClassLoader.loadLibraryWithClassLoader(ClassLoader.java:971) java.lang.System.loadLibrary(System.java:470) com.ibm.edms.od.ArsWWWInterface.<clinit>(ArsWWWInterface.java:15) java.lang.J9VMInternals.initializeImpl(Native Method) java.lang.J9VMInternals.initialize(J9VMInternals.java:200) com.ibm.edms.od.ODServer.<init>(ODServer.java:45) com.ibm.edms.od.ODServer.<init>(ODServer.java:61) com.uklife.web.ondemand.utils.DownloadUtils.getAFPDocumentFromOnDemand(DownloadUtils.java:80) com.uklife.web.ondemand.utils.Utils.getDocument(Utils.java:288) com.uklife.web.ondemand.servlet.OnDemandDocAccess.doGet(OnDemandDocAccess.java:81) javax.servlet.http.HttpServlet.s`enter code here`ervice(HttpServlet.java:621) javax.servlet.http.HttpServlet.service(HttpServlet.java:722 )
Here is a guide the solution (for Windows and OnDemand V9.5). First of all, you need to install ODWEK on the machine where you want to run your java app. Please install in the default folder, this whole thing is tricky enough as it is... Set the environment variable "PATH" in Windows, add "C:\Program Files\IBM\OnDemand\V9.5\bin" Set CLASSPATH in your development environment - point out the ODApi.jar file and ALSO point "Native library..." to the \bin folder above. (You can also call the program and setting the CLASSPATH in the call as a parameter: -Djava.library.path="C:\Program Files\IBM\OnDemand\V9.5\www\api\ODapi.jar" Copy the file ars3wapi64.dll from C:\Program Files\IBM\V9.5\www to C:\Program Files\IBM\OnDemand\V9.5\bin Ensure that all of these files are in the bin-catalog above: **ars3wapi64.dll** icudt53.dll icuin53.dll icuio53.dll icule53.dll iculx53.dll icuuc53.dll arsgsk64.dll If you are getting the error "java.lang.UnsatisfiedLinkError: ars3wapi32 (Not found in java.library.path)" one of the above is most likely incorrect. OR you could be using different versions of ODWEK and OnDemand. More on how to set CLASSPATH in Eclipse: How to set the java.library.path from Eclipse
Matlab installation (LD_LIBRARY_PATH) messes up other library files
I am trying to install Matlab on a Linux machine, but setting LD_LIBRARY_PATH (as the installation requires) breaks other library files. I am not an Linux expert, but I have tried several things and cannot get it working correctly. I have even contacted Matlab support, got the issue elevated to the dev team, and was basically told "haha sucks to suck". I have seen a few other people online have had the same issue, but either their questions were never answered or they had a slightly different problem and their solution didn't apply to me. Installing on a VM running Ubuntu: I set LD_LIBRARY_PATH as the instructions say, then it breaks network files. I can ping google.com, but I cannot nslookup google.com or visit it in a browser. Nslookup provides this error: nslookup: /usr/local/MATLAB/MATLAB_Runtime/v90/bin/glnxa64/libcrypto.so.1.0.0: no version information available (required by /usr/lib/libdns.so.100) 03-Feb-2016 11:32:22.361 ENGINE_by_id failed (crypto failure) 03-Feb-2016 11:32:22.362 error:25070067:DSO support routines:DSO_load:could not load the shared library:dso_lib.c:244: 03-Feb-2016 11:32:22.363 error:260B6084:engine routines:DYNAMIC_LOAD:dso not found:eng_dyn.c:447: 03-Feb-2016 11:32:22.363 error:2606A074:engine routines:ENGINE_by_id:no such engine:eng_list.c:418:id=gost (null): dst_lib_init: crypto failure The installation worked though (I can run my Java programs that reference compiled Matlab functions). Unsetting LD_LIBRARY_PATH fixes the network files but then I can't run programs anymore. Installing on EC2 instance: On an EC2 instance it does not break the network files (nslookup is fine). Instead it messes up Python library files. Trying to use any aws cli command, I get the error: File "/usr/bin/aws", line 19, in <module> import awscli.clidriver File "/usr/lib/python2.7/dist-packages/awscli/clidriver.py", line 16, in <module> import botocore.session File "/usr/lib/python2.7/dist-packages/botocore/session.py", line 25, in <module> import botocore.config File "/usr/lib/python2.7/dist-packages/botocore/config.py", line 18, in <module> from botocore.compat import six File "/usr/lib/python2.7/dist-packages/botocore/compat.py", line 139, in <module> import xml.etree.cElementTree File "/usr/lib64/python2.7/xml/etree/cElementTree.py", line 3, in <module> from _elementtree import * ImportError: PyCapsule_Import could not import module "pyexpat" Printing sys.path in Python shows lib-dynload is already there though, so it doesn't seem to the problem. And when trying to run the program, I get: Exception in thread "main" java.lang.LinkageError: libXt.so.6: cannot open shared object file: No such file or directory at com.mathworks.toolbox.javabuilder.internal.DynamicLibraryUtils.dlopen(Native Method) at com.mathworks.toolbox.javabuilder.internal.DynamicLibraryUtils.loadLibraryAndBindNativeMethods(DynamicLibraryUtils.java:134) at com.mathworks.toolbox.javabuilder.internal.MWMCR.<clinit>(MWMCR.java:1529) at VectorAddExample.VectorAddExampleMCRFactory.newInstance(VectorAddExampleMCRFactory.java:48) at VectorAddExample.VectorAddExampleMCRFactory.newInstance(VectorAddExampleMCRFactory.java:59) at VectorAddExample.VectorAddClass.<init>(VectorAddClass.java:62) at com.mypackage.Example.main(Example.java:13) I'm at a brick wall and really have no clue how to proceed.
Maybe something else already needs LD_LIBRARY_PATH set to work. Make sure you prepend not overwrite: export LD_LIBRARY_PATH=new/path:$LD_LIBRARY_PATH Edit: OK, if LD_LIBRARY_PATH was initially empty, this suggests that Matlab comes with shared libraries that are incompatible with your system ones: nslookup: /usr/local/MATLAB/MATLAB_Runtime/v90/bin/glnxa64/libcrypto.so.1.0.0: no version information available (required by /usr/lib/libdns.so.100) suggests that /usr/lib/libdns.so.100 needs libcrypto.so.1.0.0, which is now being resolved to the one that comes with MATLAB, which is incompatible. You can check the dependencies of a dll by ldd /usr/lib/libcrypto.so.1.0.0 and hopefully you can find a configuration that keeps both MATLAB and your system happy. Unfortunately, this may involve a lot of trial and error. If there is no such configuration, you can try setting LD_LIBRARY_PATH only when you run MATLAB: LD_LIBRARY_PATH=$MATLAB_LD_LIBRARY_PATH matlab Edit 2: Well, for the Python issue, it seems to boil down to pyexpat, which is a wrapper around the standard expat XML parser. Try doing (name guessed since I don't have a Linux right now): ldd /usr/local/lib/python2.7/site-packages/libpyexpat.so and see what that depends on. Probably, it will be libexpat.so, which is now being resolved to MATLAB's version.
try the following command: export LD_LIBRARY_PATH=/usr/local/MATLAB/MATLAB_Runtime/v90/runtime/glnxa64:/usr/local/MATLAB/MATLAB_Runtime/v90/bin/glnxa64:/usr/local/MATLAB/MATLAB_Runtime/v90/sys/os/glnxa64:$LD_LIBRARY_PATH
Perhaps not helpful for OP but if you are generating a python package with MATLAB, you could modify the generated __init__.py file MATLAB creates for your package. Specifically, the generated __init__.py file contains the following line (as of MATLAB 2017a): PLATFORM_DICT = {'Windows': ['PATH','dll',''], 'Linux': ['LD_LIBRARY_PATH','so','libmw'], 'Darwin': ['DYMCR_LIBRARY_PATH','dylib','libmw']} For Linux platform, you could simply replace LD_LIBRARY_PATH with something else such as MCR_LIBRARY_PATH to prevent mucking with your shared libs. sed -i -e 's/LD_LIBRARY_PATH/MCR_LIBRARY_PATH/g' /MY/PACKAGE/BUILD/PATH/__init__.py Then obviously export MCR_LIBRARY_PATH before using python.
Java Attach API: UnsatisfiedLinkError
When using the Java Attach API, I'm getting the following link error on Linux (tried it on different machines) only: Exception in thread "main" java.lang.UnsatisfiedLinkError: sun.tools.attach.WindowsAttachProvider.tempPath()Ljava/lang/String; at sun.tools.attach.WindowsAttachProvider.tempPath(Native Method) at sun.tools.attach.WindowsAttachProvider.isTempPathSecure(WindowsAttachProvider.java:74) at sun.tools.attach.WindowsAttachProvider.listVirtualMachines(WindowsAttachProvider.java:58) at com.sun.tools.attach.VirtualMachine.list(VirtualMachine.java:134) at sun.tools.jconsole.LocalVirtualMachine.getAttachableVMs(LocalVirtualMachine.java:151) at sun.tools.jconsole.LocalVirtualMachine.getAllVirtualMachines(LocalVirtualMachine.java:110) ... Interestingly, on Solaris and Windows it's working out of the box. I tried out several combinations of specifying java.library.path to point to the directory which contains the libattach.so but with no luck. What's wrong here? And as a bonus question: Is there a way to see which native library is actually bound to a java class?
Different AttachProvider are used on different platforms. On Linux, it shouldn't use sun.tools.attach.WindowsAttachProvider. It is for Windows. [solaris] sun.tools.attach.SolarisAttachProvider [windows] sun.tools.attach.WindowsAttachProvider [linux] sun.tools.attach.LinuxAttachProvider This is configured in a resource file META-INF\services\com.sun.tools.attach.spi.AttachProvider (typically this file exists in tools.jar). It will search CLASSPATH to get first occurrence of this resource file and read the AttachProvider implementation class from it. So you can probably resolve this problem by search sun.tools.attach.WindowsAttachProvider in your CLASSPATH. Possibly you have included a tools.jar from Windows.