HPCloud Object Storage broken(?)

229 views
Skip to first unread message

Nick Lothian

unread,
Jul 30, 2012, 9:32:14 PM7/30/12
to jcl...@googlegroups.com
Hi All,

Using the HPStorage example from the docs:

BlobStoreContext context = new BlobStoreContextFactory().createContext("hpcloud-objectstorage", "<tenantName:accessKey>", "<secretKey>");
BlobStore blobStore = context.getBlobStore();
PageSet<? extends StorageMetadata> rawResults = blobStore.list();

gives:

java.util.NoSuchElementException
at com.google.common.collect.AbstractIterator.next(AbstractIterator.java:154)
at com.google.common.collect.Iterators.find(Iterators.java:761)
at com.google.common.collect.Iterables.find(Iterables.java:646)
at org.jclouds.apis.Apis.withId(Apis.java:87)
at org.jclouds.blobstore.BlobStoreContextFactory.createContext(BlobStoreContextFactory.java:114)
at org.jclouds.blobstore.BlobStoreContextFactory.createContext(BlobStoreContextFactory.java:58)

(The same code, but using Rackspace context name and credentials works fine)


I tried using the new style interface (are there any docs for this - at the moment I'm guessing how to do it?):

BlobStoreContext context = ContextBuilder.newBuilder("hpcloud-objectstorage").credentials(  "<tenantName:accessKey>", "<secretKey>").buildView(BlobStoreContext.class);
BlobStore blobStore = context.getBlobStore();
PageSet<? extends StorageMetadata> rawResults = blobStore.list();

gives:

java.util.NoSuchElementException: key [hpcloud-objectstorage] not in the list of providers or apis: {providers=[hpcloud-compute, cloudservers-us, cloudfiles-us, aws-ec2, aws-s3], apis=[stub, openstack-nova, openstack-keystone, cloudservers, cloudfiles, swift, swift-keystone, transient, ec2, s3]}
at org.jclouds.ContextBuilder.newBuilder(ContextBuilder.java:136)


I'm using jclouds-1.5-beta-6

Nick

Adrian Cole

unread,
Jul 30, 2012, 9:45:50 PM7/30/12
to jcl...@googlegroups.com
Hi, nick. 

It seems your classpath isn't sorted.  Can you make sure that org.jclouds.provider/hpcloud-objectstorage is in your maven dependencies?

-A

p.s. per earlier note: starting with jclouds 1.5.0-beta.9, hpcloud-objectstorage will switch default auth to tenantName:username password


Nick

--
You received this message because you are subscribed to the Google Groups "jclouds" group.
To view this discussion on the web visit https://groups.google.com/d/msg/jclouds/-/HpajI26-4sEJ.
To post to this group, send email to jcl...@googlegroups.com.
To unsubscribe from this group, send email to jclouds+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/jclouds?hl=en.

Nick Lothian

unread,
Jul 31, 2012, 12:56:57 AM7/31/12
to jcl...@googlegroups.com
Thanks - that was it.

Nick


On Tuesday, 31 July 2012 11:15:50 UTC+9:30, Adrian Cole wrote:
Hi, nick. 

It seems your classpath isn't sorted.  Can you make sure that org.jclouds.provider/hpcloud-objectstorage is in your maven dependencies?

-A

p.s. per earlier note: starting with jclouds 1.5.0-beta.9, hpcloud-objectstorage will switch default auth to tenantName:username password

To unsubscribe from this group, send email to jclouds+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages