0

I’m trying to use dl4j in my project which runs on openjdk-15.0.2.7 and I use gradle to manage my dependencies. The project builds with no errors but when the code is executed it crashes immediately with the error:

java.lang.module.InvalidModuleDescriptorException: Provider class com.twelvemonkeys.imageio.plugins.jpeg.JPEGImageReaderSpi not in module

I haven’t really worked with java modules, since I have only used java 8 so far but to me this looks like its missing a bunch of packages and I don’t know what to do about it. Do I need to put something into the module-info.java file? I have not used any dl4j classes or methods so far in the project.

Thanks in advance.

Here is how I added the dependencies:

implementation group: ‘org.deeplearning4j’, name: ‘deeplearning4j-core’, version: ‘1.0.0-beta6’
implementation group: ‘org.nd4j’, name: ‘nd4j-cuda-10.2-platform’, version: ‘1.0.0-beta6’
  • Do you mind telling me what tutorial told you to use beta6? The latest version out is beta7 and we'll have a new release in a few weeks here. I'd consider upgrading. This is a fairly well known problem with the BufferedImage API. See this thread: https://stackoverflow.com/questions/44786890/is-there-some-other-class-than-imageio-to-read-images-into-bufferedimage This isn't really specific to dl4j, but just a transitive dependency issue. – Adam Gibson Mar 21 '21 at 23:40
  • @AdamGibson I took the dependencies from the dl4j getting started page. I actually tried beta7 first but when I got the same error I went to beta6 – Hendrik Hübner Mar 23 '21 at 12:56

0 Answers0