jclouds-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew Gaul (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (JCLOUDS-1250) Swift getBlob fails
Date Wed, 05 Apr 2017 19:28:41 GMT

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

Andrew Gaul updated JCLOUDS-1250:
---------------------------------
    Priority: Major  (was: Blocker)

> 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)

Mime
View raw message