[
https://issues.apache.org/jira/browse/JCLOUDS-1250?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15957508#comment-15957508
]
Andrew Gaul commented on JCLOUDS-1250:
--------------------------------------
Based on interactions on the jclouds-user mailing list, you seem to be
encountering a number of configuration issues based on your local swift. Since
similar tests pass against the known good Rackspace provider, could you run
your test against it instead?
> Swift getBlob fails
> -------------------
>
> Key: JCLOUDS-1250
> URL: https://issues.apache.org/jira/browse/JCLOUDS-1250
> Project: jclouds
> Issue Type: Bug
> Components: jclouds-blobstore
> Affects Versions: 2.0.0
> Environment: RHEL 7
> Java 1.7
> Reporter: Archana Chinnaiah
> Labels: openstack-swift
>
> Checking container exist before container creation for the very first time
> followed by getBlob fails saying
> Exception in thread "main" java.lang.IllegalStateException: Optional.get()
> cannot be called on an absent value
> at com.google.common.base.Absent.get(Absent.java:47)
> at
> org.jclouds.openstack.swift.v1.blobstore.RegionScopedSwiftBlobStore.toBlobMetadata(RegionScopedSwiftBlobStore.java:603)
> Getblob fails
> at
> org.jclouds.openstack.swift.v1.blobstore.RegionScopedSwiftBlobStore.getBlob(RegionScopedSwiftBlobStore.java:381)
> at
> org.jclouds.openstack.swift.v1.blobstore.RegionScopedSwiftBlobStore.getBlob(RegionScopedSwiftBlobStore.java:371)
> at main.java.s3_19.App.main(App.java:98)
> Code Snippet Used:
> BlobStoreContext context = ContextBuilder.newBuilder("openstack-swift")
> .endpoint("http://x.xx.xx.x:5000/v2.0")
> .credentials("xx:xxx", "xxx")
> .buildView(BlobStoreContext.class);
> PutOptions opt = new PutOptions();
> opt.multipart();
> BlobStore blobStore = context.getBlobStore();
> boolean val = blobStore.containerExists(CONTAINER_NAME);
> blobStore.createContainerInLocation(null, CONTAINER_NAME);
> Blob blob = blobStore.blobBuilder(OBJECT_NAME)
> .payload(payload)
> .build();
> blobStore.putBlob(CONTAINER_NAME, blob, opt);
> Blob b1 = blobStore.getBlob(CONTAINER_NAME, OBJECT_NAME);
> For the second time, since the container is already there its successful.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)