I am getting the following exception at runtime using the latest Deeplearning4j release. The exception cause is listed below. I do not get the full trace so not sure which class it is not finding. I am not sure where the log can be found for that exception in hopes of seeing the full trace. It is not in my app server log. I am running using Java 1.8 using the Wildfly app server on Windows 10 prof.
Thanks for any help. -Tony
Caused by: java.lang.NoClassDefFoundError: Could not initialize class org.nd4j.linalg.factory.Nd4j at org.deeplearning4j.util.ModelSerializer.restoreMultiLayerNetworkHelper(ModelSerializer.java:283) at org.deeplearning4j.util.ModelSerializer.restoreMultiLayerNetwork(ModelSerializer.java:238) at org.deeplearning4j.util.ModelSerializer.restoreMultiLayerNetwork(ModelSerializer.java:222) at org.deeplearning4j.util.ModelSerializer.restoreMultiLayerNetwork(ModelSerializer.java:380) at com.myuniportal.service.MyUniPortalMapMobileAIResource.(Unknown Source) at com.myuniportal.service.MapAIApplication.(Unknown Source) 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 org.jboss.resteasy.core.ConstructorInjectorImpl.construct(ConstructorInjectorImpl.java:150) ... 36 more
I fixed this by copying dlls from jars to a folder pointed to in the path. I hope this answer helps others. -Tony
Deeplearning4j maintainer here. You should never need to do this and I hope folks don't actually do this in the future. Javacpp (underlying component for native components) manages all of this in a .javcpp folder and already handles this.
If you have to do something more than add the dependency to your pom.xml/gradle file, you likely did something wrong.
The jars already contain the dlls and load them automatically.
I solved the problem (with out unjaring dlls) and was able to get a program running in eclipse. I am working on getting a servlet to run right now
Again, many thanks.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.