0

thanks for your time today.

I'm getting an error for missing logger backend but I have log4j installed. I've listed the relevant errors and pom dependecies below:

pom.xml segments:

<!-- https://mvnrepository.com/artifact/log4j/log4j -->
<dependency>
    <groupId>log4j</groupId>
    <artifactId>log4j</artifactId>
    <version>1.2.17</version>
</dependency>

<!-- https://mvnrepository.com/artifact/org.nd4j/nd4j-api -->
<dependency>
    <groupId>org.nd4j</groupId>
    <artifactId>nd4j-api</artifactId>
    <version>1.0.0-M1.1</version>
</dependency>

<!-- https://mvnrepository.com/artifact/org.slf4j/slf4j-api -->
<dependency>
    <groupId>org.slf4j</groupId>
    <artifactId>slf4j-api</artifactId>
    <version>1.7.32</version>
</dependency>

<!-- https://mvnrepository.com/artifact/org.slf4j/slf4j-log4j12 -->
<dependency>
    <groupId>org.slf4j</groupId>
    <artifactId>slf4j-log4j12</artifactId>
    <version>1.7.32</version>
    <scope>test</scope>
</dependency>

Error #1

SLF4J: No SLF4J providers were found.
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#noProviders for further details.

Error #2

Exception in thread "main" java.lang.ExceptionInInitializerError
    at com.jmetal.com.jmetal.maven.eclipse.Test.gblup(Test.java:70)
    at com.jmetal.com.jmetal.maven.eclipse.Test.main(Test.java:64)
Caused by: java.lang.RuntimeException: org.nd4j.linalg.factory.Nd4jBackend$NoAvailableBackendException: Please ensure that you have an nd4j backend on your classpath. Please see: https://deeplearning4j.konduit.ai/nd4j/backend
    at org.nd4j.linalg.factory.Nd4j.initContext(Nd4j.java:5095)
    at org.nd4j.linalg.factory.Nd4j.<clinit>(Nd4j.java:270)
    ... 2 more
Caused by: org.nd4j.linalg.factory.Nd4jBackend$NoAvailableBackendException: Please ensure that you have an nd4j backend on your classpath. Please see: https://deeplearning4j.konduit.ai/nd4j/backend
    at org.nd4j.linalg.factory.Nd4jBackend.load(Nd4jBackend.java:196)
    at org.nd4j.linalg.factory.Nd4j.initContext(Nd4j.java:5092)
    ... 3 more
Dr Ken Reid
  • 577
  • 4
  • 22

1 Answers1

0

Well, I couldn't work out how to make log4j function. I tried what was suggested in the comments, such as including slf4j-log4j12, or nd4j-x86.

Sometimes the best way to solve a problem is to remove it instead: I stopped trying to get log4j to function and went with nd4j-native.

Dr Ken Reid
  • 577
  • 4
  • 22