Hi, thanks for your answers!
This is my code https://gist.github.com/olanowak/8470111
OldApp was working fine with our test swift instance (it supports only API
v1.0).
Now to make this work with new swift instance with v2.0 API -  I've
followed the quick start guide - NewApp but it throws
the java.util.NoSuchElementException: apiType object-store not found in
catalog [] when calling listContainers. In use maven, so dependencies are
on the classpath.
Regards,
Ola


2014/1/16 Everett Toews <[email protected]>

>  Hi Alex,
>
>  The most likely culprit is that you're missing the swift dependency.
>
>  I've updated the OpenStack quick start guide [1] with better
> instructions and to include a full pom.xml file with all of the OpenStack
> dependencies. Please run through the Get jclouds section again and see if
> that helps. You need to make sure all of those deps are on your classpath
> when you run your app. e.g.
>
>  java -classpath ".:lib/*" MyApp
>
>  Regards,
> Everett
>
>  [1] http://jclouds.apache.org/documentation/quickstart/openstack/
>
>
>  On Jan 16, 2014, at 9:59 AM, Alex N wrote:
>
>  Hi,
> I'm using jClouds to access my swift storage. For now I've been using a
> test machine, which have only supported API v1.0 with basic
> username/password authentication. Now I have to make my code work with real
> openstack swift installation which supports API v2.0 and provides
> authentication via keystone.
>
> Properties properties = new Properties();
> properties.setProperty("swift.endpoint", endpoint);
> BlobStoreContext context =
> ContextBuilder.newBuilder("swift").overrides(properties).credentials(user,
> password).buildView(BlobStoreContext.class);
>
>  blobStore = context.getBlobStore();
>  if (!blobStore.containerExists(container)) {
>         blobStore.createContainerInLocation(null, container);
>  }
>
> I tried this solution
> http://stackoverflow.com/questions/9423183/java-library-to-talk-to-swift-openstack-with-keystone-authentication(using
>  "swift-keystone" as provider) but I got Exception in thread "main"
> java.util.NoSuchElementException: apiType object-store not found in catalog
> [] while calling blobStore.containerExists(container))
> I'm new to swift and jClouds and can't find any examples in the internet :(
> Any help appreciated:)
> Regards,
> Ola
>
>
>

Reply via email to