java.lang.UnsatisfiedLinkError: no jhdf5 in java.library.path - java

I get the above error while running a Scala Saddle 1.3.4 application that saves and loads h5 files.
I have already tried without success configuring the following (Win64):
-Djava.library.path=C:\Dev\Tools\HDF5\1.10.0\lib\
-Djava.library.path=C:\Dev\Tools\HDF5\1.10.0\lib\jarhdf5-1.10.0.jar
-Dnative.libpath.jhdf5=C:\Dev\Tools\HDF5\1.10.0\lib\hdf5_java.dll
-Dnative.libpath=C:\Dev\Tools\HDF5\1.10.0\lib\
as well as a few other alternatives but I still get the stacktrace:
java.lang.UnsatisfiedLinkError: no jhdf5 in java.library.path
at java.lang.ClassLoader.loadLibrary(Unknown Source)
at java.lang.Runtime.loadLibrary0(Unknown Source)
at java.lang.System.loadLibrary(Unknown Source)
at ncsa.hdf.hdf5lib.H5.loadH5Lib(H5.java:347)
at ncsa.hdf.hdf5lib.H5.<clinit>(H5.java:274)
at ncsa.hdf.hdf5lib.HDF5Constants.<clinit>(HDF5Constants.java:28)
at org.saddle.io.H5Store$$anonfun$createFile$1.apply$mcI$sp(H5Store.scala:291)
at org.saddle.io.H5Store$$anonfun$createFile$1.apply(H5Store.scala:290)
at org.saddle.io.H5Store$$anonfun$createFile$1.apply(H5Store.scala:290)
at org.saddle.io.H5Store$.org$saddle$io$H5Store$$withMonitor(H5Store.scala:49)
at org.saddle.io.H5Store$.createFile(H5Store.scala:290)
at org.saddle.io.H5Store$.org$saddle$io$H5Store$$writePandasFrame(H5Store.scala:1029)
at org.saddle.io.H5Store$$anonfun$writeFrame$1.apply$mcI$sp(H5Store.scala:210)
at org.saddle.io.H5Store$$anonfun$writeFrame$1.apply(H5Store.scala:210)
at org.saddle.io.H5Store$$anonfun$writeFrame$1.apply(H5Store.scala:210)
at org.saddle.io.H5Store$.org$saddle$io$H5Store$$withMonitor(H5Store.scala:49)
at org.saddle.io.H5Store$.writeFrame(H5Store.scala:209)
at org.saddle.io.H5Implicits$$anon$1.writeHdfFile(H5Implicits.scala:34)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.juliusbaer.example.Main$.main(Main.scala:30)
at com.juliusbaer.example.Main.main(Main.scala)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:147)
Exception in thread "main" java.lang.UnsatisfiedLinkError: ncsa.hdf.hdf5lib.H5.H5dont_atexit()I
at ncsa.hdf.hdf5lib.H5.H5dont_atexit(Native Method)
at ncsa.hdf.hdf5lib.H5.loadH5Lib(H5.java:365)
at ncsa.hdf.hdf5lib.H5.<clinit>(H5.java:274)
at ncsa.hdf.hdf5lib.HDF5Constants.<clinit>(HDF5Constants.java:28)
at org.saddle.io.H5Store$$anonfun$createFile$1.apply$mcI$sp(H5Store.scala:291)
at org.saddle.io.H5Store$$anonfun$createFile$1.apply(H5Store.scala:290)
at org.saddle.io.H5Store$$anonfun$createFile$1.apply(H5Store.scala:290)
at org.saddle.io.H5Store$.org$saddle$io$H5Store$$withMonitor(H5Store.scala:49)
at org.saddle.io.H5Store$.createFile(H5Store.scala:290)
at org.saddle.io.H5Store$.org$saddle$io$H5Store$$writePandasFrame(H5Store.scala:1029)
at org.saddle.io.H5Store$$anonfun$writeFrame$1.apply$mcI$sp(H5Store.scala:210)
at org.saddle.io.H5Store$$anonfun$writeFrame$1.apply(H5Store.scala:210)
at org.saddle.io.H5Store$$anonfun$writeFrame$1.apply(H5Store.scala:210)
at org.saddle.io.H5Store$.org$saddle$io$H5Store$$withMonitor(H5Store.scala:49)
at org.saddle.io.H5Store$.writeFrame(H5Store.scala:209)
at org.saddle.io.H5Implicits$$anon$1.writeHdfFile(H5Implicits.scala:34)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.juliusbaer.example.Main$.main(Main.scala:30)
at com.juliusbaer.example.Main.main(Main.scala)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:147)

I had the same problem when just launching the binary on a windows OS. After launching the HDFView.exe a command window popped up, and closed again.
After launching it via a CLI I saw error you mentioned:
java.lang.UnsatisfiedLinkError: no jhdf5 in java.library.path
I solved it with #kaladin anwser from above: I added the path <path to app>/HDFViewApp-3.1.2-win10_64-vs16\HDFView\app\bin to the PATH system enviornment variable. After saving it, I restarted the EXE file and it worked directly as expected!

Related

JWrapper Compilation error

The JWrapper team has graciously evaluate the software using their trial license. Unfortunately, while compiling my application using the latest version of JWrapper as of this time (version 00041299173), and with encryption/protection enabled, it spits out this error at the end
java.io.IOException: FAT Full (63898, 63899)
at de.waldheinz.fs.fat.Fat.allocNew(Fat.java:298)
at de.waldheinz.fs.fat.Fat.allocAppend(Fat.java:376)
at de.waldheinz.fs.fat.ClusterChain.setChainLength(ClusterChain.java:175)
at de.waldheinz.fs.fat.ClusterChain.setSize(ClusterChain.java:132)
at de.waldheinz.fs.fat.FatFile.setLength(FatFile.java:93)
at de.waldheinz.fs.fat.FatFile.write(FatFile.java:156)
at utils.buildtools.osx.DmgInstallerBuilder.saveFileContentsTo(DmgInstallerBuilder.java:206)
at utils.buildtools.osx.DmgInstallerBuilder.setupForApplicationInstall(DmgInstallerBuilder.java:274)
at jwrapper.JWrapperCompiler.main(JWrapperCompiler.java:4156)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at SecureRunner2.<init>(SecureRunner2.java:452)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at SecureRunner1.<init>(SecureRunner1.java:422)
at SecureRunner1.<init>(SecureRunner1.java:227)
at SecureRunner1.main(SecureRunner1.java:52)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at jwrapper.launch.JWCompiler.main(JWCompiler.java:112)
This doesn't happen using the unlicensed/free version, or when the "protected" argument wasn't used. Please advise. Thanks.

Program not working when exported

I made some small game and I want to export it.I export it as runnable JAR file but when I try to open it nothing happens. I am using couple of external libraries(slick, jinput, jogg, jorbis and jwjgl). Can someone help me make my program work? This is my error screen:
Exception in thread "main" java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(JarRsrcLoader.java:58 )
Caused by: java.lang.UnsatisfiedLinkError: no lwjgl in java.library.path
at java.lang.ClassLoader.loadLibrary(Unknown Source)
at java.lang.Runtime.loadLibrary0(Unknown Source)
at java.lang.System.loadLibrary(Unknown Source)
at org.lwjgl.Sys$1.run(Sys.java:73)
at java.security.AccessController.doPrivileged(Native Method)
at org.lwjgl.Sys.doLoadLibrary(Sys.java:66)
at org.lwjgl.Sys.loadLibrary(Sys.java:95)
at org.lwjgl.Sys.<clinit>(Sys.java:112)
at org.lwjgl.openal.AL.<clinit>(AL.java:59)
at org.newdawn.slick.openal.SoundStore$1.run(SoundStore.java:295)
at java.security.AccessController.doPrivileged(Native Method)
at org.newdawn.slick.openal.SoundStore.init(SoundStore.java:292)
at org.newdawn.slick.Sound.<init>(Sound.java:54)
at com.pitcher654.main.AudioPlayer.load(AudioPlayer.java:18)
at com.pitcher654.main.Game.<init>(Game.java:60)
at com.pitcher654.main.Game.main(Game.java:317)
... 5 more

SpreadsheetView Error - controlsfx

I used spreadsheet view of controlsfx 8.0.6U25 with earlier jdk for my work and it worked good. Recently I updated to JDK 8U40 and controlsfx 8.20.8. Sadly, the spreadsheet view won't load. I get error in my IDE anytime I run the same project. Please, has anyone faced the same problem? What is the solution? Thank you.
Please find the error I get below. I made no changes before the update.
Exception in Application start method
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.sun.javafx.application.LauncherImpl.launchApplicationWithArgs(Unknown Source)
at com.sun.javafx.application.LauncherImpl.launchApplication(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at sun.launcher.LauncherHelper$FXHelper.main(Unknown Source)
Caused by: java.lang.RuntimeException: Exception in Application start method
at com.sun.javafx.application.LauncherImpl.launchApplication1(Unknown Source)
at com.sun.javafx.application.LauncherImpl.lambda$launchApplication$152(Unknown Source)
at com.sun.javafx.application.LauncherImpl$$Lambda$71/1915503092.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.InstantiationError: com.sun.javafx.scene.control.SelectedCellsMap
at impl.org.controlsfx.spreadsheet.SpreadsheetViewSelectionModel.<init>(SpreadsheetViewSelectionModel.java:198)
at org.controlsfx.control.spreadsheet.SpreadsheetView.<init>(SpreadsheetView.java:395)
at myStudentAssessNew.StudentAsessment$8.<init>(StudentAsessment.java:920)
at myStudentAssessNew.StudentAsessment.addhboxCenter(StudentAsessment.java:920)
at myStudentAssessNew.StudentAsessment.start(StudentAsessment.java:353)
at com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$159(Unknown Source)
at com.sun.javafx.application.LauncherImpl$$Lambda$92/717936956.run(Unknown Source)
at com.sun.javafx.application.PlatformImpl.lambda$runAndWait$172(Unknown Source)
at com.sun.javafx.application.PlatformImpl$$Lambda$45/186276003.run(Unknown Source)
at com.sun.javafx.application.PlatformImpl.lambda$null$170(Unknown Source)
at com.sun.javafx.application.PlatformImpl$$Lambda$48/1232900564.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.javafx.application.PlatformImpl.lambda$runLater$171(Unknown Source)
at com.sun.javafx.application.PlatformImpl$$Lambda$46/237061348.run(Unknown Source)
at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(Unknown Source)
at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at com.sun.glass.ui.win.WinApplication.lambda$null$145(Unknown Source)
at com.sun.glass.ui.win.WinApplication$$Lambda$36/2117255219.run(Unknown Source)
... 1 more
Exception running application myStudentAssessNew.StudentAsessment
Well, the solution rather looks simple. Since controlsfx project has not yet been updated to meet JDK 8u40 and above as at now, I just reinstalled the previous jdk (JDK 8u25) and I am okay now.

Applet error - java.lang.NoClassDefFoundError: sun/misc/ProxyGenerator

I am running an applet from browser and am getting error:
sun/misc/ProxyGenerator
java.lang.NoClassDefFoundError: sun/misc/ProxyGenerator
at java.lang.reflect.Proxy$ProxyClassFactory.apply(Unknown Source)
at java.lang.reflect.Proxy$ProxyClassFactory.apply(Unknown Source)
at java.lang.reflect.WeakCache$Factory.get(Unknown Source)
at java.lang.reflect.WeakCache.get(Unknown Source)
at java.lang.reflect.Proxy.getProxyClass0(Unknown Source)
at java.lang.reflect.Proxy.newProxyInstance(Unknown Source)
at sun.reflect.annotation.AnnotationParser.annotationForMap(Unknown Source)
at sun.reflect.annotation.AnnotationParser.parseAnnotation(Unknown Source)
at sun.reflect.annotation.AnnotationParser.parseAnnotations2(Unknown Source)
at sun.reflect.annotation.AnnotationParser.parseAnnotations(Unknown Source)
at java.lang.Class.initAnnotationsIfNecessary(Unknown Source)
at java.lang.Class.getAnnotation(Unknown Source)
at sun.reflect.annotation.AnnotationType.<init>(Unknown Source)
at sun.reflect.annotation.AnnotationType.getInstance(Unknown Source)
at sun.reflect.annotation.AnnotationParser.parseAnnotation(Unknown Source)
at sun.reflect.annotation.AnnotationParser.parseAnnotations2(Unknown Source)
at sun.reflect.annotation.AnnotationParser.parseAnnotations(Unknown Source)
at java.lang.Class.initAnnotationsIfNecessary(Unknown Source)
at java.lang.Class.getAnnotation(Unknown Source)
at com.thoughtworks.xstream.mapper.AnnotationMapper$UnprocessedTypesSet.add(AnnotationMapper.java:481)
at com.thoughtworks.xstream.mapper.AnnotationMapper$UnprocessedTypesSet.add(AnnotationMapper.java:466)
at com.thoughtworks.xstream.mapper.AnnotationMapper.processAnnotations(AnnotationMapper.java:142)
at com.thoughtworks.xstream.XStream.processAnnotations(XStream.java:1576)
at com.thoughtworks.xstream.XStream.processAnnotations(XStream.java:1587)
at com.plugin.PluginReader.getOptionalColumnsPluginPOJO(PluginReader.java:242)
at com.applet.GUIValuesApplet.getOptionalColumns(GUIValuesApplet.java:177)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at sun.plugin.javascript.Trampoline.invoke(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at sun.plugin.javascript.JSClassLoader.invoke(Unknown Source)
at sun.plugin2.liveconnect.JavaClass$MethodInfo.invoke(Unknown Source)
at sun.plugin2.liveconnect.JavaClass$MemberBundle.invoke(Unknown Source)
at sun.plugin2.liveconnect.JavaClass.invoke0(Unknown Source)
at sun.plugin2.liveconnect.JavaClass.invoke(Unknown Source)
at sun.plugin2.main.client.LiveConnectSupport$PerAppletInfo$DefaultInvocationDelegate.invoke(Unknown Source)
at sun.plugin2.main.client.LiveConnectSupport$PerAppletInfo$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.plugin2.main.client.LiveConnectSupport$PerAppletInfo.doObjectOp(Unknown Source)
at sun.plugin2.main.client.LiveConnectSupport$PerAppletInfo$LiveConnectWorker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
If I run this applet from eclipse, it runs fine. I suspect there may be issue with jre version or accessing rt.jar in jre runtime. This is not code related issue for sure as everything was working until my system got restarted (it reboots per company policy on weekend). Therefore, any setting may have been changed.
Browser used: Chrome
latest version of jre on machine: jre7
code compiled using: jre6
Kindly respond as I have been facing this issue for long time now.
UPDATE:
Just to add, I get this error when I try to read xml file to Java class using annotaions in thoughtworks xstream lib
sun.misc is a vendor specific class which should not be used in portable Java code.
Either make the code portable or switch the browser plugin to the Oracle JVM.
Looks my jre installation got corrupt. I reinstalled it and it fixed the issue.

java.lang.NoClassDefFoundError on soapUI installation

I'm trying to install soapUI on my laptop and am getting the following error:
Starting Installer ...
java.lang.NoClassDefFoundError: java.awt.Container
at com.install4j.runtime.installer.frontend.headless.AbstractHeadlessScreenExecutor.init(Unknown Source)
at com.install4j.runtime.installer.frontend.headless.ConsoleScreenExecutor.(Unknown Source)
at com.install4j.runtime.installer.frontend.headless.InstallerConsoleScreenExecutor.(Unknown Source)
at com.install4j.runtime.installer.Installer.getScreenExecutor(Unknown Source)
at com.install4j.runtime.installer.Installer.runInProcess(Unknown Source)
at com.install4j.runtime.installer.Installer.main(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.exe4j.runtime.LauncherEngine.launch(Unknown Source)
at com.install4j.runtime.launcher.Launcher.main(Unknown Source)
java.lang.NoClassDefFoundError: java.awt.Component
at javax.swing.ImageIcon$2.run(Unknown Source)
at javax.swing.ImageIcon$2.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at javax.swing.ImageIcon.createNoPermsComponent(Unknown Source)
at javax.swing.ImageIcon.access$000(Unknown Source)
at javax.swing.ImageIcon$1.run(Unknown Source)
at javax.swing.ImageIcon$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at javax.swing.ImageIcon.(Unknown Source)
at com.install4j.runtime.installer.frontend.GUIHelper.loadIcon(Unknown Source)
at com.install4j.runtime.installer.frontend.GUIHelper.(Unknown Source)
at com.install4j.runtime.installer.helper.InstallerUtil.reportException(Unknown Source)
at com.install4j.runtime.installer.Installer.main(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.exe4j.runtime.LauncherEngine.launch(Unknown Source)
at com.install4j.runtime.launcher.Launcher.main(Unknown Source)
java.lang.NoClassDefFoundError: Could not initialize class java.awt.Toolkit
at javax.swing.ImageIcon.(Unknown Source)
at javax.swing.ImageIcon.(Unknown Source)
at com.install4j.runtime.installer.frontend.GUIHelper.loadIcon(Unknown Source)
at com.install4j.runtime.installer.frontend.GUIHelper.(Unknown Source)
at com.install4j.runtime.installer.helper.InstallerUtil.reportException(Unknown Source)
at com.install4j.runtime.installer.Installer.main(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.exe4j.runtime.LauncherEngine.launch(Unknown Source)
at com.install4j.runtime.launcher.Launcher.main(Unknown Source)
Not sure what's going on. Any ideas would be much appreciated.
AFAIK SoapUI is distributed with its own JRE. From the stacktrace it appears that the application cannot find the runtime jar (rt.jar). Its probably easier to download a new copy of the test tool to resolve this.
If the JAVA_HOME environmental variable is that is set SoapUI uses the JRE installed at that location otherwise it uses its own copy. Its possible that JAVA_HOME is pointing to a JRE which has a corrupt runtime JAR file.
Try clearing this environmental variable or setting it to an another JRE
If you have Java correctly installed on your system, just use the zip version.
You may need to set your JAVA_HOME variable if you continue to see the same error.
Zip versions for every platform are available here.
Just extract the zip, and run bin/soapui.sh

Categories

Resources