error: package org.jclouds.logging.slf4j.config does not exist ( the class SLF4JLoggingModule )

StackOverflow https://stackoverflow.com/questions/15475576

  •  24-03-2022
  •  | 
  •  

The import specified at the example http://www.jclouds.org/documentation/quickstart/openstack/ fails:

import org.jclouds.logging.slf4j.config.SLF4JLoggingModule;
...
Iterable<Module> modules = ImmutableSet.<Module> of(new SLF4JLoggingModule());

The dependencies were added following the instruccions at http://www.jclouds.org/documentation/userguide/installation-guide/: pom.xml:

...
<dependencies>
  <dependency>
    <groupId>org.jclouds</groupId>
    <artifactId>jclouds-allcompute</artifactId>
    <version>1.5.7</version>
  </dependency>
  <dependency>
    <groupId>org.jclouds</groupId>
    <artifactId>jclouds-allblobstore</artifactId>
    <version>1.5.7</version>
  </dependency>
</dependencies>
...
有帮助吗?

解决方案

SOLUTION

1) Add the dependency of the artifact jclouds-slf4j (http://mvnrepository.com/artifact/org.jclouds.driver/jclouds-slf4j/1.5.4)

<dependency>
    <groupId>org.jclouds.driver</groupId>
    <artifactId>jclouds-slf4j</artifactId>
    <version>1.5.4</version>
</dependency>

2) Rebuild the project

The pom.xml may look like this:

...
<dependencies>
  <dependency>
    <groupId>org.jclouds</groupId>
    <artifactId>jclouds-allcompute</artifactId>
    <version>1.5.7</version>
  </dependency>
  <dependency>
    <groupId>org.jclouds</groupId>
    <artifactId>jclouds-allblobstore</artifactId>
    <version>1.5.7</version>
  </dependency>
  <dependency>
    <groupId>org.jclouds.driver</groupId>
    <artifactId>jclouds-slf4j</artifactId>
    <version>1.5.4</version>
  </dependency>
</dependencies>
...        

其他提示

My bad. I wrote that doc.

The Get jclouds section on that page previously read

Follow the instructions for Getting the binaries using Apache Ant.

But only linked to the Installation guide at the top. It should have linked directly to the Getting the binaries using Apache Ant section which has the jclouds-slf4j driver in it.

I've added anchors to the Installation guide so you can link into individual sections now. Hope that helps clear it up.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top