You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@jclouds.apache.org by "Andrew Gaul (JIRA)" <ji...@apache.org> on 2017/09/13 01:25:00 UTC

[jira] [Resolved] (JCLOUDS-1250) Swift getBlob fails

     [ https://issues.apache.org/jira/browse/JCLOUDS-1250?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andrew Gaul resolved JCLOUDS-1250.
----------------------------------
    Resolution: Invalid

Marking as invalid since I cannot reproduce this issue and we have closed https://github.com/jclouds/jclouds/pull/1104 due to lack of feedback.

> 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
> {code}
> 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)
> {code}
> Getblob fails
> {code}
> 	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}
> Code Snippet Used:
> {code:java}
> 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);
> {code}
> For the second time, since the container is already there its successful.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)