jclouds-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Trần Tiến Đức (JIRA) <j...@apache.org>
Subject [jira] [Updated] (JCLOUDS-1479) Swift API throws Exception when creating container
Date Wed, 02 Jan 2019 04:02:00 GMT

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

Trần Tiến Đức updated JCLOUDS-1479:
-----------------------------------
    Description: 
Hello, I am getting a weird behavior from swift api client. The scenario is: I have a `blobStore`
object, invoking `blobStore.createContainerInLocation(location, container)` works well but
checking container exists before creating container throws an exception:

 
{code:java}
blobStore.containerExists(container);
blobStore.createContainerInLocation(location, container); // throws here
{code}
This is a part of stack trace:
{code:java}
java.lang.IllegalStateException: Optional.get() cannot be called on an absent value

 at com.google.common.base.Absent.get(Absent.java:43)
 at org.jclouds.openstack.swift.v1.blobstore.RegionScopedSwiftBlobStore.toBlobMetadata(RegionScopedSwiftBlobStore.java:607)
 at org.jclouds.openstack.swift.v1.blobstore.RegionScopedSwiftBlobStore.getBlob(RegionScopedSwiftBlobStore.java:384)
 at org.jclouds.openstack.swift.v1.blobstore.RegionScopedSwiftBlobStore.getBlob(RegionScopedSwiftBlobStore.java:374)
{code}

Is it a bug or an expected behavior? Or if it is expected, could you explain the reason why
exception thrown, Thanks! :)

[full example is here|https://github.com/trantienduchn/test-docker/blob/master/src/test/java/duc/home/test/docker/openstack/swift/SwiftTest.java] 

I'm using an [docker|https://github.com/jeantil/openstack-swift-keystone-docker] to run openstack
swift which is using:
 * keystone 12.0.0

 * Swift 2.15.1

and jcloud api version 2.1.1
{code:java}
<dependency>
    <groupId>org.apache.jclouds.api</groupId>
    <artifactId>openstack-swift</artifactId>
    <version>${jclouds.version}</version>
</dependency>
{code}
 

  was:
Hello, I am getting a weird behavior from swift api client. The scenario is: I have a `blobStore`
object, invoking `blobStore.createContainerInLocation(location, container)` works well but
checking container exists before creating container throws an exception:

 
{code:java}
blobStore.containerExists(container);
blobStore.createContainerInLocation(location, container); // throws here
{code}
This is a part of stack trace:
{code:java}
java.lang.IllegalStateException: Optional.get() cannot be called on an absent value

 at com.google.common.base.Absent.get(Absent.java:43)
 at org.jclouds.openstack.swift.v1.blobstore.RegionScopedSwiftBlobStore.toBlobMetadata(RegionScopedSwiftBlobStore.java:607)
 at org.jclouds.openstack.swift.v1.blobstore.RegionScopedSwiftBlobStore.getBlob(RegionScopedSwiftBlobStore.java:384)
 at org.jclouds.openstack.swift.v1.blobstore.RegionScopedSwiftBlobStore.getBlob(RegionScopedSwiftBlobStore.java:374)
{code}

Is it a bug or an expected behavior? Or if it is expected, could you explain the reason why
exception thrown.

[full example is here|https://github.com/trantienduchn/test-docker/blob/master/src/test/java/duc/home/test/docker/openstack/swift/SwiftTest.java] 

I'm using an [docker|https://github.com/jeantil/openstack-swift-keystone-docker] to run openstack
swift which is using:
 * keystone 12.0.0

 * Swift 2.15.1

and jcloud api version 2.1.1
{code:java}
<dependency>
    <groupId>org.apache.jclouds.api</groupId>
    <artifactId>openstack-swift</artifactId>
    <version>${jclouds.version}</version>
</dependency>
{code}
 


> Swift API throws Exception when creating container
> --------------------------------------------------
>
>                 Key: JCLOUDS-1479
>                 URL: https://issues.apache.org/jira/browse/JCLOUDS-1479
>             Project: jclouds
>          Issue Type: Bug
>          Components: jclouds-labs-openstack
>            Reporter: Trần Tiến Đức
>            Priority: Major
>
> Hello, I am getting a weird behavior from swift api client. The scenario is: I have a
`blobStore` object, invoking `blobStore.createContainerInLocation(location, container)` works
well but checking container exists before creating container throws an exception:
>  
> {code:java}
> blobStore.containerExists(container);
> blobStore.createContainerInLocation(location, container); // throws here
> {code}
> This is a part of stack trace:
> {code:java}
> java.lang.IllegalStateException: Optional.get() cannot be called on an absent value
>  at com.google.common.base.Absent.get(Absent.java:43)
>  at org.jclouds.openstack.swift.v1.blobstore.RegionScopedSwiftBlobStore.toBlobMetadata(RegionScopedSwiftBlobStore.java:607)
>  at org.jclouds.openstack.swift.v1.blobstore.RegionScopedSwiftBlobStore.getBlob(RegionScopedSwiftBlobStore.java:384)
>  at org.jclouds.openstack.swift.v1.blobstore.RegionScopedSwiftBlobStore.getBlob(RegionScopedSwiftBlobStore.java:374)
> {code}
> Is it a bug or an expected behavior? Or if it is expected, could you explain the reason
why exception thrown, Thanks! :)
> [full example is here|https://github.com/trantienduchn/test-docker/blob/master/src/test/java/duc/home/test/docker/openstack/swift/SwiftTest.java] 
> I'm using an [docker|https://github.com/jeantil/openstack-swift-keystone-docker] to run
openstack swift which is using:
>  * keystone 12.0.0
>  * Swift 2.15.1
> and jcloud api version 2.1.1
> {code:java}
> <dependency>
>     <groupId>org.apache.jclouds.api</groupId>
>     <artifactId>openstack-swift</artifactId>
>     <version>${jclouds.version}</version>
> </dependency>
> {code}
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message