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.