# Clean maven install - error occurs

**URL:** <https://community.konduit.ai/t/clean-maven-install-error-occurs/2195>\
**Category:** Uncategorized\
**Created:** [January 14, 2023, 11:20pm UTC](https://community.konduit.ai/t/clean-maven-install-error-occurs/2195 "2023-01-14T23:20:34Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bob\_M](https://avatars.discourse-cdn.com/v4/letter/b/58f4c7/32.png) [@Bob\_M](https://community.konduit.ai/u/Bob_M)\
**Post date:** [January 14, 2023, 11:20pm UTC](https://community.konduit.ai/t/clean-maven-install-error-occurs/2195/1 "2023-01-14T23:20:35Z")

</div>

Hi

I am attempting to install dl4j-examples (cloned from [github.com](http://github.com)

The cloning appears to be fine

I then cd dl4j-examples/dl4j-examples (where a POM file exists)

I then ‘mvn clean install’

It appears to run OK for a while and then I strike the following error…

[ERROR] Failed to execute goal com.lewisd:lint-maven-plugin:0.0.11:check (pom-lint) on project dl4j-examples: Execution pom-lint of goal com.lewisd:lint-maven-plugin:0.0.11:check failed: An API incompatibility was encountered while executing com.lewisd:lint-maven-plugin:0.0.11:check: java.lang.ExceptionInInitializerError: null  
[ERROR] -----------------------------------------------------  
[ERROR] realm = plugin\>com.lewisd:lint-maven-plugin:0.0.11  
[ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy  
[ERROR] urls[0] = file:/C:/Users/rgmat/.m2/repository/com/lewisd/lint-maven-plugin/0.0.11/lint-maven-plugin-0.0.11.jar  
[ERROR] urls[1] = file:/C:/Users/rgmat/.m2/repository/org/codehaus/plexus/plexus-utils/3.0.22/plexus-utils-3.0.22.jar  
[ERROR] urls[2] = file:/C:/Users/rgmat/.m2/repository/org/sonatype/sisu/sisu-inject-bean/1.4.2/sisu-inject-bean-1.4.2.jar  
[ERROR] urls[3] = file:/C:/Users/rgmat/.m2/repository/org/sonatype/sisu/sisu-guice/2.1.7/sisu-guice-2.1.7-noaop.jar  
[ERROR] urls[4] = file:/C:/Users/rgmat/.m2/repository/org/codehaus/plexus/plexus-interpolation/1.14/plexus-interpolation-1.14.jar

This is all new to be and I don’t know how to correct this problem

Any advice gratefully received

Bob\_M  
New Zealand

---

<div class="post-metadata">

**Author:** ![agibsonccc](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.konduit.ai/agibsonccc/32/697_2.png) [@agibsonccc](https://community.konduit.ai/u/agibsonccc)\
**Post date:** [January 15, 2023, 12:25am UTC](https://community.konduit.ai/t/clean-maven-install-error-occurs/2195/2 "2023-01-15T00:25:30Z")

</div>

@Bob_M this coudl either be a corrupt m2 folder, a JDK issue, or a maven version issue.  
Ensure you are using jdk 11 or 17, you are using the altest version of maven and lastly delete your .m2 and start again if none of those work.

---

<div class="post-metadata">

**Author:** ![Bob\_M](https://avatars.discourse-cdn.com/v4/letter/b/58f4c7/32.png) [@Bob\_M](https://community.konduit.ai/u/Bob_M)\
**Post date:** [January 15, 2023, 1:14am UTC](https://community.konduit.ai/t/clean-maven-install-error-occurs/2195/3 "2023-01-15T01:14:13Z")

</div>

Thanks for your reply…  
I upgraded to jdk 17.0.4.1  
maven version is 3.8.7

deleted .m2 folder and reran…got the following error messages

Downloaded from central: [https://repo.maven.apache.org/maven2/com/google/guava/guava/18.0/guava-18.0.jar](https://repo.maven.apache.org/maven2/com/google/guava/guava/18.0/guava-18.0.jar) (2.3 MB at 225 kB/s)  
Downloaded from central: [https://repo.maven.apache.org/maven2/commons-codec/commons-codec/1.6/commons-codec-1.6.jar](https://repo.maven.apache.org/maven2/commons-codec/commons-codec/1.6/commons-codec-1.6.jar) (233 kB at 23 kB/s)  
[INFO] Writing summary report  
[INFO] [LINT] Completed with no violations  
[INFO] Writing xml report  
[INFO] ------------------------------------------------------------------------  
[INFO] BUILD FAILURE  
[INFO] ------------------------------------------------------------------------  
[INFO] Total time: 16:09 min  
[INFO] Finished at: 2023-01-15T14:05:16+13:00  
[INFO] ------------------------------------------------------------------------  
[ERROR] Failed to execute goal com.lewisd:lint-maven-plugin:0.0.11:check (pom-lint) on project dl4j-examples: Execution pom-lint of goal com.lewisd:lint-maven-plugin:0.0.11:check failed: An API incompatibility was encountered while executing com.lewisd:lint-maven-plugin:0.0.11:check: java.lang.ExceptionInInitializerError: null  
[ERROR] -----------------------------------------------------  
[ERROR] realm = plugin\>com.lewisd:lint-maven-plugin:0.0.11  
[ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy  
[ERROR] urls[0] = file:/C:/Users/rgmat/.m2/repository/com/lewisd/lint-maven-plugin/0.0.11/lint-maven-plugin-0.0.11.jar  
[ERROR] urls[1] = file:/C:/Users/rgmat/.m2/repository/org/codehaus/plexus/plexus-utils/3.0.22/plexus-utils-3.0.22.jar  
[ERROR] urls[2] = file:/C:/Users/rgmat/.m2/repository/org/sonatype/sisu/sisu-inject-bean/1.4.2/sisu-inject-bean-1.4.2.jar  
[ERROR] urls[3] = file:/C:/Users/rgmat/.m2/repository/org/sonatype/sisu/sisu-guice/2.1.7/sisu-guice-2.1.7-noaop.jar  
[ERROR] urls[4] = file:/C:/Users/rgmat/.m2/repository/org/codehaus/plexus/plexus-interpolation/1.14/plexus-interpolation-1.14.jar  
etc. etc.

---

<div class="post-metadata">

**Author:** ![agibsonccc](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.konduit.ai/agibsonccc/32/697_2.png) [@agibsonccc](https://community.konduit.ai/u/agibsonccc)\
**Post date:** [January 16, 2023, 7:15am UTC](https://community.konduit.ai/t/clean-maven-install-error-occurs/2195/4 "2023-01-16T07:15:38Z")

</div>

@Bob_M try with jdk 11 and see if that helps. I’ll look in to this this week.

---

<div class="post-metadata">

**Author:** ![agibsonccc](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.konduit.ai/agibsonccc/32/697_2.png) [@agibsonccc](https://community.konduit.ai/u/agibsonccc)\
**Post date:** [January 16, 2023, 10:46pm UTC](https://community.konduit.ai/t/clean-maven-install-error-occurs/2195/5 "2023-01-16T22:46:52Z")

</div>

@Bob_M I removed the offending plugin from the examples. JDK 17 should be fine now.

---

<div class="post-metadata">

**Author:** ![lerzegov](https://avatars.discourse-cdn.com/v4/letter/l/b4bc9f/32.png) [@lerzegov](https://community.konduit.ai/u/lerzegov)\
**Post date:** [January 17, 2023, 3:09pm UTC](https://community.konduit.ai/t/clean-maven-install-error-occurs/2195/8 "2023-01-17T15:09:00Z")

</div>

Hi, I too am trying to install the project dl4j-examples. My default jdk is java 11.  
After cloning the git repo today and executing mvn clean install I got the following error:  
[**ERROR**] Failed to execute goal on project dl4j-examples: **Could not resolve dependencies for project org.deeplearning4j:dl4j-examples:jar:1.0.0-SNAPSHOT: The following artifacts could not be resolved: org.nd4j:nd4j-native:jar:macosx-arm64:1.0.0-SNAPSHOT, org.bytedeco:openblas:jar:macosx-arm64:0.3.17-1.5.6, org.nd4j:nd4j-native-preset:jar:macosx-arm64:1.0.0-SNAPSHOT, org.deeplearning4j:resources:jar:1.0.0-SNAPSHOT: Could not find artifact org.nd4j:nd4j-native:jar:macosx-arm64:1.0.0-SNAPSHOT in sonatype-nexus-snapshots ([https://oss.sonatype.org/content/repositories/snapshots](https://oss.sonatype.org/content/repositories/snapshots))** → **[Help 1]**  
[**ERROR**]

Thanks for any advice or explanation.

lerzegov  
Italy

---

<div class="post-metadata">

**Author:** ![Bob\_M](https://avatars.discourse-cdn.com/v4/letter/b/58f4c7/32.png) [@Bob\_M](https://community.konduit.ai/u/Bob_M)\
**Post date:** [January 19, 2023, 2:07am UTC](https://community.konduit.ai/t/clean-maven-install-error-occurs/2195/9 "2023-01-19T02:07:35Z")

</div>

I have the exact same error…hopefully Adam is working on a solution 🙂

---

<div class="post-metadata">

**Author:** ![agibsonccc](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.konduit.ai/agibsonccc/32/697_2.png) [@agibsonccc](https://community.konduit.ai/u/agibsonccc)\
**Post date:** [January 19, 2023, 9:02am UTC](https://community.konduit.ai/t/clean-maven-install-error-occurs/2195/10 "2023-01-19T09:02:30Z")

</div>

@Bob_M could you clarify? I already pushed the lint maven plugin removal and didn’t see any followup issue from you.

@lerzegov 's issue is completely unrelated to yours. Yours if you read the error was related to 1 maven plugin left over in the examples.

@lerzegov Aside from that…I’m seeing 1.5.6 in here. That’s clearly old (more than 2 versions back) Im not sure what your version is and you haven’t put anything I can go off of here. The pom or anything so I have to disregard this.

Please try the example as they are on master with a fresh clone and let me know if you still have issues then.

---

<div class="post-metadata">

**Author:** ![lerzegov](https://avatars.discourse-cdn.com/v4/letter/l/b4bc9f/32.png) [@lerzegov](https://community.konduit.ai/u/lerzegov)\
**Post date:** [January 19, 2023, 12:55pm UTC](https://community.konduit.ai/t/clean-maven-install-error-occurs/2195/11 "2023-01-19T12:55:47Z")

</div>

@agibsonccc , thanks for your feedback. Sorry for posting in this thread, I guessed that the “Clean maven install - error occurs” coulb be on topic also for my issue.

Following your advice I removed the installation and did a fresh clone  
git clone [GitHub - deeplearning4j/deeplearning4j-examples: Deeplearning4j Examples (DL4J, DL4J Spark, DataVec)](https://github.com/deeplearning4j/deeplearning4j-examples.git)  
I don’t have previous installations of deeplearning4j.  
Doing mvn clean install in the /dl4j-examples follder I still get the same error reported in my previous post  
[**ERROR**] Failed to execute goal on project dl4j-examples: **Could not resolve dependencies for project org.deeplearning4j:dl4j-examples:jar:1.0.0-SNAPSHOT: The following artifacts could not be resolved: org.nd4j:nd4j-native:jar:macosx-arm64:1.0.0-SNAPSHOT, org.bytedeco:openblas:jar:macosx-arm64:0.3.17-1.5.6, org.nd4j:nd4j-native-preset:jar:macosx-arm64:1.0.0-SNAPSHOT, org.deeplearning4j:resources:jar:1.0.0-SNAPSHOT: Could not find artifact org.nd4j:nd4j-native:jar:macosx-arm64:1.0.0-SNAPSHOT in sonatype-nexus-snapshots ([https://oss.sonatype.org/content/repositories/snapshots](https://oss.sonatype.org/content/repositories/snapshots))** → **[Help 1]**  
[**ERROR**]  
The pom.xlm is the one downloaded cloning the git repo.  
Importing the project into IntelliJ I get the same error about missing jars.

---

<div class="post-metadata">

**Author:** ![agibsonccc](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.konduit.ai/agibsonccc/32/697_2.png) [@agibsonccc](https://community.konduit.ai/u/agibsonccc)\
**Post date:** [January 19, 2023, 1:15pm UTC](https://community.konduit.ai/t/clean-maven-install-error-occurs/2195/12 "2023-01-19T13:15:20Z")

</div>

@lerzegov ah you’re running on an m1. Only a subset of the libraries work for m1. I will need to do a set of 1 off examples for that. Due to the limited number of libraries supported in M1 basically you run the library but a lot of the other libraries it normally comes with won’t work. Thusly it’s not enabled by default (eg: in nd4j-native-platform) in order to work around that you’d have to do something like this:

> <https://github.com/deeplearning4j/deeplearning4j/issues/9860>
>
> \#### Issue Description
> 
> I'm trying to start using ND4J in my project using gra…dle on a MAC with the M1 chipset.
> When I try to compile the project and run a JMH benchmark test I get the following exception:
> 
> \`\`\`
> java.lang.ExceptionInInitializerError
> at org.nd4j.linalg.cpu.nativecpu.ops.NativeOpExecutioner.\<init\>(NativeOpExecutioner.java:79)
> at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
> at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
> at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
> at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
> at java.base/java.lang.Class.newInstance(Class.java:584)
> at org.nd4j.linalg.factory.Nd4j.initWithBackend(Nd4j.java:5152)
> at org.nd4j.linalg.factory.Nd4j.initContext(Nd4j.java:5064)
> at org.nd4j.linalg.factory.Nd4j.\<clinit\>(Nd4j.java:284)
> at io.datapith.math.matrix.nd4j.ND4JArrayBenchmark$IterationState.\<init\>(ND4JArrayBenchmark.kt:28)
> at io.datapith.math.matrix.nd4j.generated.ND4JArrayBenchmark\_IterationState\_jmhType\_B1.\<init\>(ND4JArrayBenchmark\_IterationState\_jmhType\_B1.java:3)
> at io.datapith.math.matrix.nd4j.generated.ND4JArrayBenchmark\_IterationState\_jmhType\_B2.\<init\>(ND4JArrayBenchmark\_IterationState\_jmhType\_B2.java:3)
> at io.datapith.math.matrix.nd4j.generated.ND4JArrayBenchmark\_IterationState\_jmhType\_B3.\<init\>(ND4JArrayBenchmark\_IterationState\_jmhType\_B3.java:2)
> at io.datapith.math.matrix.nd4j.generated.ND4JArrayBenchmark\_IterationState\_jmhType.\<init\>(ND4JArrayBenchmark\_IterationState\_jmhType.java:2)
> at io.datapith.math.matrix.nd4j.generated.ND4JArrayBenchmark\_throughputMultiplyMatrices\_jmhTest.\_jmh\_tryInit\_f\_iterationstate1\_0(ND4JArrayBenchmark\_throughputMultiplyMatrices\_jmhTest.java:375)
> at io.datapith.math.matrix.nd4j.generated.ND4JArrayBenchmark\_throughputMultiplyMatrices\_jmhTest.throughputMultiplyMatrices\_Throughput(ND4JArrayBenchmark\_throughputMultiplyMatrices\_jmhTest.java:73)
> at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.base/java.lang.reflect.Method.invoke(Method.java:566)
> at org.openjdk.jmh.runner.BenchmarkHandler$BenchmarkTask.call(BenchmarkHandler.java:453)
> at org.openjdk.jmh.runner.BenchmarkHandler$BenchmarkTask.call(BenchmarkHandler.java:437)
> at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
> at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
> at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
> at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
> at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
> at java.base/java.lang.Thread.run(Thread.java:829)
> Caused by: java.lang.RuntimeException: ND4J is probably missing dependencies. For more information, please refer to: https://deeplearning4j.konduit.ai/nd4j/backend
> at org.nd4j.nativeblas.NativeOpsHolder.\<init\>(NativeOpsHolder.java:107)
> at org.nd4j.nativeblas.NativeOpsHolder.\<clinit\>(NativeOpsHolder.java:41)
> ... 28 more
> Caused by: java.lang.UnsatisfiedLinkError: no jnind4jcpu in java.library.path: \[/Users/masc/Library/Java/Extensions, /Library/Java/Extensions, /Network/Library/Java/Extensions, /System/Library/Java/Extensions, /usr/lib/java, .\]
> at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2670)
> at java.base/java.lang.Runtime.loadLibrary0(Runtime.java:830)
> at java.base/java.lang.System.loadLibrary(System.java:1873)
> at org.bytedeco.javacpp.Loader.loadLibrary(Loader.java:1800)
> at org.bytedeco.javacpp.Loader.load(Loader.java:1402)
> at org.bytedeco.javacpp.Loader.load(Loader.java:1214)
> at org.bytedeco.javacpp.Loader.load(Loader.java:1190)
> at org.nd4j.linalg.cpu.nativecpu.bindings.Nd4jCpu.\<clinit\>(Nd4jCpu.java:14)
> at java.base/java.lang.Class.forName0(Native Method)
> at java.base/java.lang.Class.forName(Class.java:398)
> at org.nd4j.common.config.ND4JClassLoading.loadClassByName(ND4JClassLoading.java:62)
> at org.nd4j.common.config.ND4JClassLoading.loadClassByName(ND4JClassLoading.java:56)
> at org.nd4j.nativeblas.NativeOpsHolder.\<init\>(NativeOpsHolder.java:97)
> ... 29 more
> Caused by: java.lang.UnsatisfiedLinkError: Could not find jnind4jcpu in class, module, and library paths.
> at org.bytedeco.javacpp.Loader.loadLibrary(Loader.java:1767)
> ... 38 more
> \`\`\`
> 
> \#### Version Information
> 
> Please indicate relevant versions, including, if relevant:
> 
> \* \`org.nd4j:nd4j-native-platform\` version: \`1.0.0-M2.1\`
> \* Platform information (OS, etc): Mac OS Monterey version 12.2.1 with M1 chipset

The person there manually configures nd4j-native,openblas and nd4j-native with the macosx-arm64 clasifier in order to run.

---

<div class="post-metadata">

**Author:** ![lerzegov](https://avatars.discourse-cdn.com/v4/letter/l/b4bc9f/32.png) [@lerzegov](https://community.konduit.ai/u/lerzegov)\
**Post date:** [January 19, 2023, 5:57pm UTC](https://community.konduit.ai/t/clean-maven-install-error-occurs/2195/13 "2023-01-19T17:57:51Z")

</div>

@agibsonccc Tanks for the clarification: if I get it, the ND4J M2-1 release works on the 2nd generation Apple M2 chips, I am on M1 pro chip. I will try the workaround suggested in the linked post.

---

<div class="post-metadata">

**Author:** ![treo](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.konduit.ai/treo/32/47_2.png) [@treo](https://community.konduit.ai/u/treo)\
**Post date:** [January 19, 2023, 6:51pm UTC](https://community.konduit.ai/t/clean-maven-install-error-occurs/2195/14 "2023-01-19T18:51:57Z")

</div>

> [@lerzegov](#):
>
> if I get it, the ND4J M2-1 release works on the 2nd generation Apple M2 chips, I am on M1 pro chip

Note: the M2 version of ND4J means “Milestone 2”.

As for Apple M1 and M2: the problem @agibsonccc is talking about is that not all libraries that the full DL4J distribution depends on, are available for that architecture. For this reason, we don’t automatically support those chips when you use the nd4j-native-platform dependency.

The linked workaround explains how to collect the _minimal_ set of native dependencies to make nd4j’s numerical code work.

---

<div class="post-metadata">

**Author:** ![lerzegov](https://avatars.discourse-cdn.com/v4/letter/l/b4bc9f/32.png) [@lerzegov](https://community.konduit.ai/u/lerzegov)\
**Post date:** [January 20, 2023, 4:44pm UTC](https://community.konduit.ai/t/clean-maven-install-error-occurs/2195/15 "2023-01-20T16:44:02Z")

</div>

@treo Thanks for correcting my naive reading of the M1/M2 milestone markers.

I tried to amend the dependency declarations both in maven and in gradle as explained in the linked post. After several attempts, I have a project that loads and builds without errors in IntelliJ. However, when I run Java examples, I get runtime errors.  
For example, running QuickTest.java or MNISTAutoencoder.java I get  
Could not find jniopenblas\_nolapack in class, module, and library path

Not being able to ascertain issues related to project configuration from problems depending on unsupported features on M1 chips, I prefer to postpone my experiments with deeplearning4j.  
Thanks for supporting my attempts.

---

<div class="post-metadata">

**Author:** ![agibsonccc](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.konduit.ai/agibsonccc/32/697_2.png) [@agibsonccc](https://community.konduit.ai/u/agibsonccc)\
**Post date:** [January 21, 2023, 1:20am UTC](https://community.konduit.ai/t/clean-maven-install-error-occurs/2195/16 "2023-01-21T01:20:20Z")

</div>

> [@lerzegov](#):
>
> y declarations both in maven and in gradle as explained in the linked post. After several attempts, I have a project that loads and builds without errors in IntelliJ. However, when I run Java examples, I get

@lerzegov could you give us an idea of what you are still having issues with and a bit about your configuration? I respect you waiting but we’ve had successes with other folks. I feel like it could be an older version of something you’re still using. I don’t think that’s necessarily related to the project.

Up until recently the upstream openblas from 1.5.7 actually didn’t fully work on M1 but was fixed in 1.5.8. I’d like to confirm what you did/didn’t try and maybe we can get you up and running.

---

<div class="post-metadata">

**Author:** ![lerzegov](https://avatars.discourse-cdn.com/v4/letter/l/b4bc9f/32.png) [@lerzegov](https://community.konduit.ai/u/lerzegov)\
**Post date:** [January 21, 2023, 11:45am UTC](https://community.konduit.ai/t/clean-maven-install-error-occurs/2195/17 "2023-01-21T11:45:45Z")

</div>

@agibsonccc Thanks for encouraging me! Actually after tweaking the pom.xml following the directions in the post, mvn clean install succeeded and I could load the project into IntelliJ.  
I am running the examples listed in README.md and everything is going fine so far.

Here are the changes in the pom.xml  
modified:

```
<properties>
    <dl4j-master.version>1.0.0-M2.1</dl4j-master.version>
 </properties>

```

added:

```
    <dependency>
        <groupId>org.bytedeco</groupId>
        <artifactId>openblas</artifactId>
        <version>0.3.21-1.5.8</version>
    </dependency>

```
