Error creating JClouds SwiftApi: provider org.jclouds.openstack.keystone.v2_0.KeystoneApiMetadata could not be created

I have code for connecting to the JClouds quick-storage container, which works fine in my own test area, but as soon as I integrate into my project, I get an error message:

An exception was thrown in the main thread java.util.ServiceConfigurationError: org.jclouds.apis.ApiMetadata: provider org.jclouds.openstack.keystone.v2_0.KeystoneApiMetadata could not be an instance: java.lang.IllegalStateException: java.langreff

This is the code that does not work on the ContextBuilder line:

private SwiftApi swiftApi;

public JCloudsConnector(String username, String password, String endpoint) {
      String provider = "openstack-swift";

      Properties overrides = new Properties();
      overrides.setProperty("jclouds.mpu.parallel.degree", "" + Runtime.getRuntime().availableProcessors());

      swiftApi = ContextBuilder.newBuilder(provider)
            .endpoint(endpoint)
            .credentials(username, password)
            .overrides(overrides)
            .buildApi(SwiftApi.class);
}

I use the same dependencies (JClouds version 1.7.3), so I can’t understand what could be the problem, since both of them run in the same environment.

+4
1

Ignasi Barrera, , Guava 15.0 POM maven:

<dependency>
    <groupId>com.google.guava</groupId>
    <artifactId>guava</artifactId>
    <version>15.0</version>
</dependency>
+4

All Articles