[jira] [Updated] (JCLOUDS-1618) Jclouds 2.3.0 and above is incompatible with SpringBoot 2.7.*

2022-08-25 Thread Biswa Ranjan Ray (Jira)


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

Biswa Ranjan Ray updated JCLOUDS-1618:
--
Description: 
Hi,

We developed a multi-cloud application using jclouds and springboot to support 
operations on storage services e.g s3, gcs and azure storage.

We're trying to migrate our application from springboot 2.5.* to latest 
(springboot 2.7.*). However we're facing issues with jclouds. Its observed that 
errors are thrown during the creation of BlobStoreContext. A full stacktrace is 
attached.

Here is a code snippet of BlobStoreContext:

public BlobStoreContext getBlobStoreContext()

{    

   return ContextBuilder.newBuilder(CloudProviders.PROVIDER_AWS.toString())     
        
   .credentials(this.getAccessKeyId(), this.getSecretAccessKey())             
   .buildView(BlobStoreContext.class);

}

We also tried jclouds 2.4.0 & 2.5.0 but no luck. However its found jclouds 
2.3.0 is compatible with springboot 2.6.10 and currently we're using the same, 
but our goal is to upgrade to springboot 2.7.   

Any suggestions.

  was:
Hi,

We developed a multi-cloud application using jclouds and springboot to support 
operations on storage services e.g s3, gcs and azure storage.

We're trying to migrate our application from springboot 2.5.* to latest 
(springboot 2.7.*). However we're facing issues with jclouds. Its observed that 
errors are thrown during the creation of BlobStoreContext. A full stacktrace is 
attached.

Here is a code snippet of BlobStoreContext:

public BlobStoreContext getBlobStoreContext()

{    

return ContextBuilder.newBuilder(CloudProviders.PROVIDER_AWS.toString())        
     .credentials(this.getAccessKeyId(), this.getSecretAccessKey())             
.buildView(BlobStoreContext.class);

}

We also tried jclouds 2.4.0 & 2.5.0 but no luck. However its found jclouds 
2.3.0 is compatible with springboot 2.6.10 and currently we're using the same, 
but our goal is to upgrade to springboot 2.7.   

Any suggestions.


> Jclouds 2.3.0 and above is incompatible with SpringBoot 2.7.*
> -
>
> Key: JCLOUDS-1618
> URL: https://issues.apache.org/jira/browse/JCLOUDS-1618
> Project: jclouds
>  Issue Type: Bug
>Affects Versions: 2.3.0, 2.4.0, 2.5.0
>Reporter: Biswa Ranjan Ray
>Assignee: Andrew Gaul
>Priority: Major
> Attachments: JClouds_Gson_Error.txt
>
>
> Hi,
> We developed a multi-cloud application using jclouds and springboot to 
> support operations on storage services e.g s3, gcs and azure storage.
> We're trying to migrate our application from springboot 2.5.* to latest 
> (springboot 2.7.*). However we're facing issues with jclouds. Its observed 
> that errors are thrown during the creation of BlobStoreContext. A full 
> stacktrace is attached.
> Here is a code snippet of BlobStoreContext:
> public BlobStoreContext getBlobStoreContext()
> {    
>return ContextBuilder.newBuilder(CloudProviders.PROVIDER_AWS.toString())   
>           
>.credentials(this.getAccessKeyId(), this.getSecretAccessKey())             
>.buildView(BlobStoreContext.class);
> }
> We also tried jclouds 2.4.0 & 2.5.0 but no luck. However its found jclouds 
> 2.3.0 is compatible with springboot 2.6.10 and currently we're using the 
> same, but our goal is to upgrade to springboot 2.7.   
> Any suggestions.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Updated] (JCLOUDS-1618) Jclouds 2.3.0 and above is incompatible with SpringBoot 2.7.*

2022-08-25 Thread Biswa Ranjan Ray (Jira)


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

Biswa Ranjan Ray updated JCLOUDS-1618:
--
Description: 
Hi,

We developed a multi-cloud application using jclouds and springboot to support 
operations on storage services e.g s3, gcs and azure storage.

We're trying to migrate our application from springboot 2.5.* to latest 
(springboot 2.7.*). However we're facing issues with jclouds. Its observed that 
errors are thrown during the creation of BlobStoreContext. A full stacktrace is 
attached.

Here is a code snippet of BlobStoreContext:

public BlobStoreContext getBlobStoreContext()

{    

return ContextBuilder.newBuilder(CloudProviders.PROVIDER_AWS.toString())        
     .credentials(this.getAccessKeyId(), this.getSecretAccessKey())             
.buildView(BlobStoreContext.class);

}

We also tried jclouds 2.4.0 & 2.5.0 but no luck. However its found jclouds 
2.3.0 is compatible with springboot 2.6.10 and currently we're using the same, 
but our goal is to upgrade to springboot 2.7.   

Any suggestions.

  was:
Hi,

We developed a multi-cloud application using jclouds and springboot to support 
operations on storage services e.g s3, gcs and azure storage.

We're trying to migrate our application from springboot 2.5.* to latest 
(springboot 2.7.*). However we're facing issues with jclouds. Its observed that 
errors are thrown during the creation of BlobStoreContext. A full stacktrace is 
attached.

Here is a code snippet of BlobStoreContext:

public BlobStoreContext getBlobStoreContext() {
    return ContextBuilder.newBuilder(CloudProviders.PROVIDER_AWS.toString())
            .credentials(this.getAccessKeyId(), this.getSecretAccessKey())
            .buildView(BlobStoreContext.class);
}

We also tried jclouds 2.4.0 & 2.5.0 but no luck. However its found jclouds 
2.3.0 is compatible with springboot 2.6.10 and currently we're using the same, 
but our goal is to upgrade to springboot 2.7.   

Any suggestions.


> Jclouds 2.3.0 and above is incompatible with SpringBoot 2.7.*
> -
>
> Key: JCLOUDS-1618
> URL: https://issues.apache.org/jira/browse/JCLOUDS-1618
> Project: jclouds
>  Issue Type: Bug
>Affects Versions: 2.3.0, 2.4.0, 2.5.0
>Reporter: Biswa Ranjan Ray
>Assignee: Andrew Gaul
>Priority: Major
> Attachments: JClouds_Gson_Error.txt
>
>
> Hi,
> We developed a multi-cloud application using jclouds and springboot to 
> support operations on storage services e.g s3, gcs and azure storage.
> We're trying to migrate our application from springboot 2.5.* to latest 
> (springboot 2.7.*). However we're facing issues with jclouds. Its observed 
> that errors are thrown during the creation of BlobStoreContext. A full 
> stacktrace is attached.
> Here is a code snippet of BlobStoreContext:
> public BlobStoreContext getBlobStoreContext()
> {    
> return ContextBuilder.newBuilder(CloudProviders.PROVIDER_AWS.toString())      
>        .credentials(this.getAccessKeyId(), this.getSecretAccessKey())         
>     .buildView(BlobStoreContext.class);
> }
> We also tried jclouds 2.4.0 & 2.5.0 but no luck. However its found jclouds 
> 2.3.0 is compatible with springboot 2.6.10 and currently we're using the 
> same, but our goal is to upgrade to springboot 2.7.   
> Any suggestions.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Created] (JCLOUDS-1618) Jclouds 2.3.0 and above is incompatible with SpringBoot 2.7.*

2022-08-25 Thread Biswa Ranjan Ray (Jira)
Biswa Ranjan Ray created JCLOUDS-1618:
-

 Summary: Jclouds 2.3.0 and above is incompatible with SpringBoot 
2.7.*
 Key: JCLOUDS-1618
 URL: https://issues.apache.org/jira/browse/JCLOUDS-1618
 Project: jclouds
  Issue Type: Bug
Affects Versions: 2.5.0, 2.4.0, 2.3.0
Reporter: Biswa Ranjan Ray
Assignee: Andrew Gaul
 Attachments: JClouds_Gson_Error.txt

Hi,

We developed a multi-cloud application using jclouds and springboot to support 
operations on storage services e.g s3, gcs and azure storage.

We're trying to migrate our application from springboot 2.5.* to latest 
(springboot 2.7.*). However we're facing issues with jclouds. Its observed that 
errors are thrown during the creation of BlobStoreContext. A full stacktrace is 
attached.

Here is a code snippet of BlobStoreContext:

public BlobStoreContext getBlobStoreContext() {
    return ContextBuilder.newBuilder(CloudProviders.PROVIDER_AWS.toString())
            .credentials(this.getAccessKeyId(), this.getSecretAccessKey())
            .buildView(BlobStoreContext.class);
}

We also tried jclouds 2.4.0 & 2.5.0 but no luck. However its found jclouds 
2.3.0 is compatible with springboot 2.6.10 and currently we're using the same, 
but our goal is to upgrade to springboot 2.7.   

Any suggestions.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Issue Comment Deleted] (JCLOUDS-1491) Jclouds uses a deprecated version of Guava to support Azure storage.

2020-07-02 Thread Biswa Ranjan Ray (Jira)


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

Biswa Ranjan Ray updated JCLOUDS-1491:
--
Comment: was deleted

(was: We have upgraded our application to use jclouds 2.2.0 and also we are 
using guava 27.0.1-jre. Is the above fix available in jclouds 2.2.0 ? If not 
could you please suggest us which version of guava can be used with jclouds 
2.2.0.

Appreciate your effort and time.

Thank you.)

> Jclouds uses a deprecated version of Guava to support Azure storage.
> 
>
> Key: JCLOUDS-1491
> URL: https://issues.apache.org/jira/browse/JCLOUDS-1491
> Project: jclouds
>  Issue Type: Improvement
>  Components: jclouds-core
>Affects Versions: 2.2.1
>Reporter: Biswa Ranjan Ray
>Assignee: Andrew Gaul
>Priority: Major
>  Labels: azureblob
> Fix For: 2.3.0
>
> Attachments: jclouds_issue.txt
>
>  Time Spent: 40m
>  Remaining Estimate: 0h
>
> Hi,
> We are facing an issue while using jclouds library along with Guava to 
> support Azure storage.
> *Issue:*
> We are using Jclouds 2.1.2 and Guava 27.0.1-jre in our application to work 
> with objectstore service offered by several cloud providers. These libraries 
> works seamlessly for AWS S3 and GCS. But in case of azure we get an 
> exception. Please see the attachment for stack trace.
> *Analysis:*
> We found that the issue is there with the below code in DnsValidator class at 
> line 53:
> {code:java}
>   if (CharMatcher.JAVA_LETTER_OR_DIGIT.indexIn(name) != 0)
> {code}
> The above static field is deprecated in Guava 27.0.1-jre. But apparently 
> jclouds library still refers to a deprecated version of Guava as mentioned in 
> the jclouds doc:
> {quote}Setup your project to include 'guava'. Include following dependency to 
> jclouds Installation. Update the version mentioned in dependency below to the 
> latest available version. com.google.guava guava 16.0
> {quote}
> If not the latest at least we would like to use the recent version of Guava. 
> But Guava 16.0 is really old and deprecated as well. Any thoughts are 
> appreciated.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Comment Edited] (JCLOUDS-1491) Jclouds uses a deprecated version of Guava to support Azure storage.

2020-07-02 Thread Biswa Ranjan Ray (Jira)


[ 
https://issues.apache.org/jira/browse/JCLOUDS-1491?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17150456#comment-17150456
 ] 

Biswa Ranjan Ray edited comment on JCLOUDS-1491 at 7/3/20, 3:17 AM:


We have upgraded our application to use jclouds 2.2.0 and also we are using 
guava 27.0.1-jre. Is the above fix available in jclouds 2.2.0 ? If not could 
you please suggest us which version of guava can be used with jclouds 2.2.0.

Appreciate your effort and time.

Thank you.


was (Author: roy.biswa):
We have upgraded our application to use jclouds 2.2.0 and still using guava 
27.0.1-jre. Is the above fix available in jclouds 2.2.0 ? If not can you please 
suggest us which version of guava can be used with jclouds 2.2.0. 

Thank you.

> Jclouds uses a deprecated version of Guava to support Azure storage.
> 
>
> Key: JCLOUDS-1491
> URL: https://issues.apache.org/jira/browse/JCLOUDS-1491
> Project: jclouds
>  Issue Type: Improvement
>  Components: jclouds-core
>Affects Versions: 2.2.1
>Reporter: Biswa Ranjan Ray
>Assignee: Andrew Gaul
>Priority: Major
>  Labels: azureblob
> Fix For: 2.3.0
>
> Attachments: jclouds_issue.txt
>
>  Time Spent: 40m
>  Remaining Estimate: 0h
>
> Hi,
> We are facing an issue while using jclouds library along with Guava to 
> support Azure storage.
> *Issue:*
> We are using Jclouds 2.1.2 and Guava 27.0.1-jre in our application to work 
> with objectstore service offered by several cloud providers. These libraries 
> works seamlessly for AWS S3 and GCS. But in case of azure we get an 
> exception. Please see the attachment for stack trace.
> *Analysis:*
> We found that the issue is there with the below code in DnsValidator class at 
> line 53:
> {code:java}
>   if (CharMatcher.JAVA_LETTER_OR_DIGIT.indexIn(name) != 0)
> {code}
> The above static field is deprecated in Guava 27.0.1-jre. But apparently 
> jclouds library still refers to a deprecated version of Guava as mentioned in 
> the jclouds doc:
> {quote}Setup your project to include 'guava'. Include following dependency to 
> jclouds Installation. Update the version mentioned in dependency below to the 
> latest available version. com.google.guava guava 16.0
> {quote}
> If not the latest at least we would like to use the recent version of Guava. 
> But Guava 16.0 is really old and deprecated as well. Any thoughts are 
> appreciated.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (JCLOUDS-1491) Jclouds uses a deprecated version of Guava to support Azure storage.

2020-07-02 Thread Biswa Ranjan Ray (Jira)


[ 
https://issues.apache.org/jira/browse/JCLOUDS-1491?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17150456#comment-17150456
 ] 

Biswa Ranjan Ray commented on JCLOUDS-1491:
---

We have upgraded our application to use jclouds 2.2.0 and still using guava 
27.0.1-jre. Is the above fix available in jclouds 2.2.0 ? If not can you please 
suggest us which version of guava can be used with jclouds 2.2.0. 

Thank you.

> Jclouds uses a deprecated version of Guava to support Azure storage.
> 
>
> Key: JCLOUDS-1491
> URL: https://issues.apache.org/jira/browse/JCLOUDS-1491
> Project: jclouds
>  Issue Type: Improvement
>  Components: jclouds-core
>Affects Versions: 2.2.1
>Reporter: Biswa Ranjan Ray
>Assignee: Andrew Gaul
>Priority: Major
>  Labels: azureblob
> Fix For: 2.3.0
>
> Attachments: jclouds_issue.txt
>
>  Time Spent: 40m
>  Remaining Estimate: 0h
>
> Hi,
> We are facing an issue while using jclouds library along with Guava to 
> support Azure storage.
> *Issue:*
> We are using Jclouds 2.1.2 and Guava 27.0.1-jre in our application to work 
> with objectstore service offered by several cloud providers. These libraries 
> works seamlessly for AWS S3 and GCS. But in case of azure we get an 
> exception. Please see the attachment for stack trace.
> *Analysis:*
> We found that the issue is there with the below code in DnsValidator class at 
> line 53:
> {code:java}
>   if (CharMatcher.JAVA_LETTER_OR_DIGIT.indexIn(name) != 0)
> {code}
> The above static field is deprecated in Guava 27.0.1-jre. But apparently 
> jclouds library still refers to a deprecated version of Guava as mentioned in 
> the jclouds doc:
> {quote}Setup your project to include 'guava'. Include following dependency to 
> jclouds Installation. Update the version mentioned in dependency below to the 
> latest available version. com.google.guava guava 16.0
> {quote}
> If not the latest at least we would like to use the recent version of Guava. 
> But Guava 16.0 is really old and deprecated as well. Any thoughts are 
> appreciated.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Comment Edited] (JCLOUDS-1428) Support for SAS token based Authentication for Azure Blob Storage

2019-04-23 Thread Biswa Ranjan Ray (JIRA)


[ 
https://issues.apache.org/jira/browse/JCLOUDS-1428?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16823741#comment-16823741
 ] 

Biswa Ranjan Ray edited comment on JCLOUDS-1428 at 4/24/19 4:23 AM:


Hi Folks,

Would really appreciate if you could provide any update on this issue.

Thanks. 


was (Author: roy.biswa):
Hi Folks,

Would really appreciate if could provide any update on this issue.

Thanks. 

> Support for SAS token based Authentication for Azure Blob Storage
> -
>
> Key: JCLOUDS-1428
> URL: https://issues.apache.org/jira/browse/JCLOUDS-1428
> Project: jclouds
>  Issue Type: Improvement
>  Components: jclouds-blobstore
>Reporter: Himanshu Jain
>Priority: Major
>  Labels: azureblob
> Fix For: 2.2.0, 2.1.3
>
> Attachments: azure_stacktrace.txt
>
>  Time Spent: 40m
>  Remaining Estimate: 0h
>
> Hi,
> We have one use case where we want to provide limited access to objects in 
> our storage accounts. We figured that the best way to do  this is by using 
> SAS token based authentication mechanism to upload/download objects to Azure 
> Blob Storage - [SAS based 
> Authentication|https://docs.microsoft.com/en-us/azure/storage/common/storage-dotnet-shared-access-signature-part-1]
> We found that JClouds client library provides support for Azure Blob Storage 
> using account keys which might not fit our use case because of security 
> reasons.



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


[jira] [Comment Edited] (JCLOUDS-1428) Support for SAS token based Authentication for Azure Blob Storage

2019-04-23 Thread Biswa Ranjan Ray (JIRA)


[ 
https://issues.apache.org/jira/browse/JCLOUDS-1428?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16824802#comment-16824802
 ] 

Biswa Ranjan Ray edited comment on JCLOUDS-1428 at 4/24/19 4:22 AM:


[~Horuszko] Thank you for your update.  


was (Author: roy.biswa):
[~Horuszko] Thank you for the update. I'll try out the pull request.  

> Support for SAS token based Authentication for Azure Blob Storage
> -
>
> Key: JCLOUDS-1428
> URL: https://issues.apache.org/jira/browse/JCLOUDS-1428
> Project: jclouds
>  Issue Type: Improvement
>  Components: jclouds-blobstore
>Reporter: Himanshu Jain
>Priority: Major
>  Labels: azureblob
> Fix For: 2.2.0, 2.1.3
>
> Attachments: azure_stacktrace.txt
>
>  Time Spent: 40m
>  Remaining Estimate: 0h
>
> Hi,
> We have one use case where we want to provide limited access to objects in 
> our storage accounts. We figured that the best way to do  this is by using 
> SAS token based authentication mechanism to upload/download objects to Azure 
> Blob Storage - [SAS based 
> Authentication|https://docs.microsoft.com/en-us/azure/storage/common/storage-dotnet-shared-access-signature-part-1]
> We found that JClouds client library provides support for Azure Blob Storage 
> using account keys which might not fit our use case because of security 
> reasons.



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


[jira] [Commented] (JCLOUDS-1428) Support for SAS token based Authentication for Azure Blob Storage

2019-04-23 Thread Biswa Ranjan Ray (JIRA)


[ 
https://issues.apache.org/jira/browse/JCLOUDS-1428?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16824802#comment-16824802
 ] 

Biswa Ranjan Ray commented on JCLOUDS-1428:
---

[~Horuszko] Thank you for the update. I'll try out the pull request.  

> Support for SAS token based Authentication for Azure Blob Storage
> -
>
> Key: JCLOUDS-1428
> URL: https://issues.apache.org/jira/browse/JCLOUDS-1428
> Project: jclouds
>  Issue Type: Improvement
>  Components: jclouds-blobstore
>Reporter: Himanshu Jain
>Priority: Major
>  Labels: azureblob
> Fix For: 2.2.0, 2.1.3
>
> Attachments: azure_stacktrace.txt
>
>  Time Spent: 40m
>  Remaining Estimate: 0h
>
> Hi,
> We have one use case where we want to provide limited access to objects in 
> our storage accounts. We figured that the best way to do  this is by using 
> SAS token based authentication mechanism to upload/download objects to Azure 
> Blob Storage - [SAS based 
> Authentication|https://docs.microsoft.com/en-us/azure/storage/common/storage-dotnet-shared-access-signature-part-1]
> We found that JClouds client library provides support for Azure Blob Storage 
> using account keys which might not fit our use case because of security 
> reasons.



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


[jira] [Commented] (JCLOUDS-1428) Support for SAS token based Authentication for Azure Blob Storage

2019-04-23 Thread Biswa Ranjan Ray (JIRA)


[ 
https://issues.apache.org/jira/browse/JCLOUDS-1428?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16823741#comment-16823741
 ] 

Biswa Ranjan Ray commented on JCLOUDS-1428:
---

Hi Folks,

Would really appreciate if could provide any update on this issue.

Thanks. 

> Support for SAS token based Authentication for Azure Blob Storage
> -
>
> Key: JCLOUDS-1428
> URL: https://issues.apache.org/jira/browse/JCLOUDS-1428
> Project: jclouds
>  Issue Type: Improvement
>  Components: jclouds-blobstore
>Reporter: Himanshu Jain
>Priority: Major
>  Labels: azureblob
> Fix For: 2.2.0, 2.1.3
>
> Attachments: azure_stacktrace.txt
>
>  Time Spent: 40m
>  Remaining Estimate: 0h
>
> Hi,
> We have one use case where we want to provide limited access to objects in 
> our storage accounts. We figured that the best way to do  this is by using 
> SAS token based authentication mechanism to upload/download objects to Azure 
> Blob Storage - [SAS based 
> Authentication|https://docs.microsoft.com/en-us/azure/storage/common/storage-dotnet-shared-access-signature-part-1]
> We found that JClouds client library provides support for Azure Blob Storage 
> using account keys which might not fit our use case because of security 
> reasons.



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


[jira] [Commented] (JCLOUDS-1491) Jclouds uses a deprecated version of Guava to support Azure storage.

2019-03-18 Thread Biswa Ranjan Ray (JIRA)


[ 
https://issues.apache.org/jira/browse/JCLOUDS-1491?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16795716#comment-16795716
 ] 

Biswa Ranjan Ray commented on JCLOUDS-1491:
---

[~gaul] Thanks for the update. 

> Jclouds uses a deprecated version of Guava to support Azure storage.
> 
>
> Key: JCLOUDS-1491
> URL: https://issues.apache.org/jira/browse/JCLOUDS-1491
> Project: jclouds
>  Issue Type: Improvement
>Reporter: Biswa Ranjan Ray
>Priority: Major
> Attachments: jclouds_issue.txt
>
>
> Hi,
> We are facing an issue while using jclouds library along with Guava to 
> support Azure storage.
> *Issue:*
> We are using Jclouds 2.1.2 and Guava 27.0.1-jre in our application to work 
> with objectstore service offered by several cloud providers. These libraries 
> works seamlessly for AWS S3 and GCS. But in case of azure we get an 
> exception. Please see the attachment for stack trace.
> *Analysis:*
> We found that the issue is there with the below code in DnsValidator class at 
> line 53:
> {code:java}
>   if (CharMatcher.JAVA_LETTER_OR_DIGIT.indexIn(name) != 0)
> {code}
> The above static field is deprecated in Guava 27.0.1-jre. But apparently 
> jclouds library still refers to a deprecated version of Guava as mentioned in 
> the jclouds doc:
> {quote}Setup your project to include 'guava'. Include following dependency to 
> jclouds Installation. Update the version mentioned in dependency below to the 
> latest available version. com.google.guava guava 16.0
> {quote}
> If not the latest at least we would like to use the recent version of Guava. 
> But Guava 16.0 is really old and deprecated as well. Any thoughts are 
> appreciated.



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


[jira] [Updated] (JCLOUDS-1491) Jclouds uses a deprecated version of Guava to support Azure storage.

2019-03-18 Thread Biswa Ranjan Ray (JIRA)


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

Biswa Ranjan Ray updated JCLOUDS-1491:
--
Description: 
Hi,

We are facing an issue while using jclouds library along with Guava to support 
Azure storage.

*Issue:*

We are using Jclouds 2.1.2 and Guava 27.0.1-jre in our application to work with 
objectstore service offered by several cloud providers. These libraries works 
seamlessly for AWS S3 and GCS. But in case of azure we get an exception. Please 
see the attachment for stack trace.

*Analysis:*

We found that the issue is there with the below code in DnsValidator class at 
line 53:
{code:java}
  if (CharMatcher.JAVA_LETTER_OR_DIGIT.indexIn(name) != 0)
{code}
The above static field is deprecated in Guava 27.0.1-jre. But apparently 
jclouds library still refers to a deprecated version of Guava as mentioned in 
the jclouds doc:
{quote}Setup your project to include 'guava'. Include following dependency to 
jclouds Installation. Update the version mentioned in dependency below to the 
latest available version. com.google.guava guava 16.0
{quote}
If not the latest at least we would like to use the recent version of Guava. 
But Guava 16.0 is really old and deprecated as well. Any thoughts are 
appreciated.

  was:
Hi,

We are facing an issue while using jclouds library along with Guava to support 
Azure storage.

*Issue:*

We are using Jclouds 2.1.2 and Guava 27.0.1-jre in our application to work with 
objectstore service offered by several cloud providers. These libraries works 
seamlessly for AWS S3 and GCS. But in case of azure we get an exception. Please 
see the attachment for stack trace.

*Analysis:*

We found that the issue is there with the below code in DnsValidator class at 
line 53:
{code:java}
  if (CharMatcher.JAVA_LETTER_OR_DIGIT.indexIn(name) != 0)
{code}
The above code is deprecated in Guava 27.0.1-jre. But apparently jclouds 
library still refers to a deprecated version of Guava as mentioned in the 
jclouds doc:
{quote}Setup your project to include 'guava'. Include following dependency to 
jclouds Installation. Update the version mentioned in dependency below to the 
latest available version. com.google.guava guava 16.0
{quote}
If not the latest at least we would like to use the recent version of Guava. 
But Guava 16.0 is really old and deprecated as well. Any thoughts are 
appreciated.


> Jclouds uses a deprecated version of Guava to support Azure storage.
> 
>
> Key: JCLOUDS-1491
> URL: https://issues.apache.org/jira/browse/JCLOUDS-1491
> Project: jclouds
>  Issue Type: Improvement
>Reporter: Biswa Ranjan Ray
>Priority: Major
> Attachments: jclouds_issue.txt
>
>
> Hi,
> We are facing an issue while using jclouds library along with Guava to 
> support Azure storage.
> *Issue:*
> We are using Jclouds 2.1.2 and Guava 27.0.1-jre in our application to work 
> with objectstore service offered by several cloud providers. These libraries 
> works seamlessly for AWS S3 and GCS. But in case of azure we get an 
> exception. Please see the attachment for stack trace.
> *Analysis:*
> We found that the issue is there with the below code in DnsValidator class at 
> line 53:
> {code:java}
>   if (CharMatcher.JAVA_LETTER_OR_DIGIT.indexIn(name) != 0)
> {code}
> The above static field is deprecated in Guava 27.0.1-jre. But apparently 
> jclouds library still refers to a deprecated version of Guava as mentioned in 
> the jclouds doc:
> {quote}Setup your project to include 'guava'. Include following dependency to 
> jclouds Installation. Update the version mentioned in dependency below to the 
> latest available version. com.google.guava guava 16.0
> {quote}
> If not the latest at least we would like to use the recent version of Guava. 
> But Guava 16.0 is really old and deprecated as well. Any thoughts are 
> appreciated.



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


[jira] [Updated] (JCLOUDS-1491) Jclouds uses a deprecated version of Guava to support Azure storage.

2019-03-14 Thread Biswa Ranjan Ray (JIRA)


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

Biswa Ranjan Ray updated JCLOUDS-1491:
--
Attachment: jclouds_issue.txt

> Jclouds uses a deprecated version of Guava to support Azure storage.
> 
>
> Key: JCLOUDS-1491
> URL: https://issues.apache.org/jira/browse/JCLOUDS-1491
> Project: jclouds
>  Issue Type: Improvement
>Reporter: Biswa Ranjan Ray
>Priority: Major
> Attachments: jclouds_issue.txt
>
>
> Hi,
> We are facing an issue while using jclouds library along with Guava to 
> support Azure storage.
> *Issue:*
> We are using Jclouds 2.1.2 and Guava 27.0.1-jre in our application to work 
> with objectstore service offered by several cloud providers. These libraries 
> works seamlessly for AWS S3 and GCS. But in case of azure we get an 
> exception. Please see the attachment for stack trace.
> *Analysis:*
> We found that the issue is there with the below code in DnsValidator class at 
> line 53:
> {code:java}
>   if (CharMatcher.JAVA_LETTER_OR_DIGIT.indexIn(name) != 0)
> {code}
> The above code is deprecated in Guava 27.0.1-jre. But apparently jclouds 
> library still refers to a deprecated version of Guava as mentioned in the 
> jclouds doc:
> {quote}Setup your project to include 'guava'. Include following dependency to 
> jclouds Installation. Update the version mentioned in dependency below to the 
> latest available version. com.google.guava guava 16.0
> {quote}
> If not the latest at least we would like to use the recent version of Guava. 
> But Guava 16.0 is really old and deprecated as well. Any thoughts are 
> appreciated.



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


[jira] [Created] (JCLOUDS-1491) Jclouds uses a deprecated version of Guava to support Azure storage.

2019-03-14 Thread Biswa Ranjan Ray (JIRA)
Biswa Ranjan Ray created JCLOUDS-1491:
-

 Summary: Jclouds uses a deprecated version of Guava to support 
Azure storage.
 Key: JCLOUDS-1491
 URL: https://issues.apache.org/jira/browse/JCLOUDS-1491
 Project: jclouds
  Issue Type: Improvement
Reporter: Biswa Ranjan Ray


Hi,

We are facing an issue while using jclouds library along with Guava to support 
Azure storage.

*Issue:*

We are using Jclouds 2.1.2 and Guava 27.0.1-jre in our application to work with 
objectstore service offered by several cloud providers. These libraries works 
seamlessly for AWS S3 and GCS. But in case of azure we get an exception. Please 
see the attachment for stack trace.

*Analysis:*

We found that the issue is there with the below code in DnsValidator class at 
line 53:
{code:java}
  if (CharMatcher.JAVA_LETTER_OR_DIGIT.indexIn(name) != 0)
{code}
The above code is deprecated in Guava 27.0.1-jre. But apparently jclouds 
library still refers to a deprecated version of Guava as mentioned in the 
jclouds doc:
{quote}Setup your project to include 'guava'. Include following dependency to 
jclouds Installation. Update the version mentioned in dependency below to the 
latest available version. com.google.guava guava 16.0
{quote}
If not the latest at least we would like to use the recent version of Guava. 
But Guava 16.0 is really old and deprecated as well. Any thoughts are 
appreciated.



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


[jira] [Commented] (JCLOUDS-1428) Support for SAS token based Authentication for Azure Blob Storage

2019-03-12 Thread Biswa Ranjan Ray (JIRA)


[ 
https://issues.apache.org/jira/browse/JCLOUDS-1428?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16790397#comment-16790397
 ] 

Biswa Ranjan Ray commented on JCLOUDS-1428:
---

[~Horuszko] Thanks for the detail clarification. As you pointed out I too cross 
checked and found the format of our SAS token does not contain "se" and "sp" 
tokens. But with the current format of SAS token we are able to perform all the 
object related calls within a specific container. I need to verify with my team 
w.r.t the generation of SAS token and hopefully shall get back to you soon.

> Support for SAS token based Authentication for Azure Blob Storage
> -
>
> Key: JCLOUDS-1428
> URL: https://issues.apache.org/jira/browse/JCLOUDS-1428
> Project: jclouds
>  Issue Type: Improvement
>  Components: jclouds-blobstore
>Reporter: Himanshu Jain
>Priority: Major
>  Labels: azureblob
> Fix For: 2.2.0, 2.1.3
>
> Attachments: azure_stacktrace.txt
>
>
> Hi,
> We have one use case where we want to provide limited access to objects in 
> our storage accounts. We figured that the best way to do  this is by using 
> SAS token based authentication mechanism to upload/download objects to Azure 
> Blob Storage - [SAS based 
> Authentication|https://docs.microsoft.com/en-us/azure/storage/common/storage-dotnet-shared-access-signature-part-1]
> We found that JClouds client library provides support for Azure Blob Storage 
> using account keys which might not fit our use case because of security 
> reasons.



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


[jira] [Commented] (JCLOUDS-1428) Support for SAS token based Authentication for Azure Blob Storage

2019-03-11 Thread Biswa Ranjan Ray (JIRA)


[ 
https://issues.apache.org/jira/browse/JCLOUDS-1428?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16790228#comment-16790228
 ] 

Biswa Ranjan Ray commented on JCLOUDS-1428:
---

Please have a look at the format of the SAS token we have used:  
sig=DBcMed%8DnYjdBMkntgMoGdBuLPvIA9r18Fk6iyrAk7xB%5F\u0026sv=2018-09-19\u0026spr=https\u0026si=e37r4h58-janv-8975-i04m-2klm2b55s8tn\u0026sr=v

I found the length of the SAS token is 121 for which the exception was thrown 
in stack trace.

[~nacx] The stack trace is already attached.

> Support for SAS token based Authentication for Azure Blob Storage
> -
>
> Key: JCLOUDS-1428
> URL: https://issues.apache.org/jira/browse/JCLOUDS-1428
> Project: jclouds
>  Issue Type: Improvement
>  Components: jclouds-blobstore
>Reporter: Himanshu Jain
>Priority: Major
>  Labels: azureblob
> Fix For: 2.2.0, 2.1.3
>
> Attachments: azure_stacktrace.txt
>
>
> Hi,
> We have one use case where we want to provide limited access to objects in 
> our storage accounts. We figured that the best way to do  this is by using 
> SAS token based authentication mechanism to upload/download objects to Azure 
> Blob Storage - [SAS based 
> Authentication|https://docs.microsoft.com/en-us/azure/storage/common/storage-dotnet-shared-access-signature-part-1]
> We found that JClouds client library provides support for Azure Blob Storage 
> using account keys which might not fit our use case because of security 
> reasons.



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


[jira] [Commented] (JCLOUDS-1428) Support for SAS token based Authentication for Azure Blob Storage

2019-03-11 Thread Biswa Ranjan Ray (JIRA)


[ 
https://issues.apache.org/jira/browse/JCLOUDS-1428?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16789420#comment-16789420
 ] 

Biswa Ranjan Ray commented on JCLOUDS-1428:
---

Thank you both [~nacx] and [~Horuszko] for such a fast reply.

[~nacx]: I verified and found our sas token has a match with an item at line 84 
[here|[https://github.com/apache/jclouds/blob/master/providers/azureblob/src/main/java/org/jclouds/azureblob/config/AzureBlobHttpApiModule.java#L76-L91].]
 Our SAS token starts with the string "sig".

List required = ImmutableList.of("sv", "se", "sig", "sp");

[~Horuszko] Since its confidential, I'm afraid I cannot help you right now with 
a format of our SAS token unless authorized. I'll surely get back to you in 
sometime.

> Support for SAS token based Authentication for Azure Blob Storage
> -
>
> Key: JCLOUDS-1428
> URL: https://issues.apache.org/jira/browse/JCLOUDS-1428
> Project: jclouds
>  Issue Type: Improvement
>  Components: jclouds-blobstore
>Reporter: Himanshu Jain
>Priority: Major
>  Labels: azureblob
> Fix For: 2.2.0, 2.1.3
>
> Attachments: azure_stacktrace.txt
>
>
> Hi,
> We have one use case where we want to provide limited access to objects in 
> our storage accounts. We figured that the best way to do  this is by using 
> SAS token based authentication mechanism to upload/download objects to Azure 
> Blob Storage - [SAS based 
> Authentication|https://docs.microsoft.com/en-us/azure/storage/common/storage-dotnet-shared-access-signature-part-1]
> We found that JClouds client library provides support for Azure Blob Storage 
> using account keys which might not fit our use case because of security 
> reasons.



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


[jira] [Updated] (JCLOUDS-1428) Support for SAS token based Authentication for Azure Blob Storage

2019-03-11 Thread Biswa Ranjan Ray (JIRA)


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

Biswa Ranjan Ray updated JCLOUDS-1428:
--
Attachment: azure_stacktrace.txt

> Support for SAS token based Authentication for Azure Blob Storage
> -
>
> Key: JCLOUDS-1428
> URL: https://issues.apache.org/jira/browse/JCLOUDS-1428
> Project: jclouds
>  Issue Type: Improvement
>  Components: jclouds-blobstore
>Reporter: Himanshu Jain
>Priority: Major
>  Labels: azureblob
> Fix For: 2.2.0, 2.1.3
>
> Attachments: azure_stacktrace.txt
>
>
> Hi,
> We have one use case where we want to provide limited access to objects in 
> our storage accounts. We figured that the best way to do  this is by using 
> SAS token based authentication mechanism to upload/download objects to Azure 
> Blob Storage - [SAS based 
> Authentication|https://docs.microsoft.com/en-us/azure/storage/common/storage-dotnet-shared-access-signature-part-1]
> We found that JClouds client library provides support for Azure Blob Storage 
> using account keys which might not fit our use case because of security 
> reasons.



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


[jira] [Comment Edited] (JCLOUDS-1428) Support for SAS token based Authentication for Azure Blob Storage

2019-03-11 Thread Biswa Ranjan Ray (JIRA)


[ 
https://issues.apache.org/jira/browse/JCLOUDS-1428?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16789302#comment-16789302
 ] 

Biswa Ranjan Ray edited comment on JCLOUDS-1428 at 3/11/19 8:52 AM:


Hi,

I'm trying to configure BlobStoreContext for Azure storage using SAS token. I 
found the below code snippet from [jclouds 
|https://jclouds.apache.org/guides/azure-storage/]site that offers the portable 
BlobStore api:
{code:java}
BlobStoreContext context = ContextBuilder.newBuilder("azureblob")
  //using sasToken in place of storage key
 .credentials(storageAccountName, sasToken)
 .buildView(BlobStoreContext.class);

{code}
 Since we use SAS token based authentication, so I used sasToken in place of 
storageKey in the above code. But this throws : 
*com.google.common.io.BaseEncoding$DecodingException: Invalid input length 121*
 Please find the full stack trace attached for your reference.

I could be wrong, but after following the test class 
[SharedKeyLiteAuthenticationTest.java|https://gitbox.apache.org/repos/asf?p=jclouds.git;a=blob;f=providers/azureblob/src/test/java/org/jclouds/azure/storage/filters/SharedKeyLiteAuthenticationTest.java;h=5e0c2264127a2665c70391f010c6031fabe27854;hb=0ce9261]
 which was committed as a part of the 
[PR|https://gitbox.apache.org/repos/asf?p=jclouds.git;h=0ce9261], I tried the 
below code of my own:
{code:java}
BlobStoreContext context = ContextBuilder.newBuilder("azureblob")
   .endpoint("https://${identity}.blob.core.windows.net;)
   .credentials(accountName, sasToken)
   .modules(new ArrayList<>(3)) //just added an empty list
   .buildInjector()
   .getInstance(BlobStoreContext.class);

{code}
The above code also throws the same exception. 
 Is it right to use SAS token as credential in place of storage key ?
 Is it possible to use SAS token to configure BlobStoreContext for azure in 
order to get the portable BlobStore ? 
 A code snippet would be highly appreciated.

Thanks and Regards,
 Biswa Ranjan Ray


was (Author: roy.biswa):
Hi,

I'm trying to configure BlobStoreContext for Azure storage using SAS token. I 
found the below code snippet from [jclouds 
|https://jclouds.apache.org/guides/azure-storage/]site that offers the portable 
BlobStore api:

{code:java}

BlobStoreContext context = ContextBuilder.newBuilder("azureblob")
 .credentials(storageAccountName, sasToken) //using sasToken in place of 
storage key
 .buildView(BlobStoreContext.class);

{code}
 Since we use SAS token based authentication, so I used sasToken in place of 
storageKey in the above code. But this throws : 
*com.google.common.io.BaseEncoding$DecodingException: Invalid input length 121*
 Please find the full stack trace attached for your reference.

I could be wrong, but after following the test class 
[SharedKeyLiteAuthenticationTest.java|https://gitbox.apache.org/repos/asf?p=jclouds.git;a=blob;f=providers/azureblob/src/test/java/org/jclouds/azure/storage/filters/SharedKeyLiteAuthenticationTest.java;h=5e0c2264127a2665c70391f010c6031fabe27854;hb=0ce9261]
 which was committed as a part of the 
[PR|https://gitbox.apache.org/repos/asf?p=jclouds.git;h=0ce9261], I tried the 
below code of my own:
{code:java}
BlobStoreContext context = ContextBuilder.newBuilder("azureblob")
   .endpoint("https://${identity}.blob.core.windows.net;)
   .credentials(accountName, sasToken)
   .modules(new ArrayList<>(3)) //just added an empty list of 
size 3
   .buildInjector()
   .getInstance(BlobStoreContext.class);

{code}

The above code also throws the same exception. 
Is it right to use SAS token as credential in place of storage key ?
Is it possible to use SAS token to configure BlobStoreContext for azure in 
order to get the portable BlobStore ? 
A code snippet would be highly appreciated.

Thanks and Regards,
Biswa Ranjan Ray

> Support for SAS token based Authentication for Azure Blob Storage
> -
>
> Key: JCLOUDS-1428
> URL: https://issues.apache.org/jira/browse/JCLOUDS-1428
> Project: jclouds
>  Issue Type: Improvement
>  Components: jclouds-blobstore
>Reporter: Himanshu Jain
>Priority: Major
>  Labels: azureblob
> Fix For: 2.2.0, 2.1.3
>
>
> Hi,
> We have one use case where we want to provide limited access to objects in 
> our storage accounts. We figured that the best way to do  this is by using 
> SAS token based authentication mechanism to upload/download objects to Azure 
> Blob Storage - [SAS based 
> Authentication|https://docs.microsoft.com/en-us/azure/storage/common/storage-dotnet-shared-access-signature-part-1]
> We found that JClouds client library provides support for Azure 

[jira] [Commented] (JCLOUDS-1428) Support for SAS token based Authentication for Azure Blob Storage

2019-03-11 Thread Biswa Ranjan Ray (JIRA)


[ 
https://issues.apache.org/jira/browse/JCLOUDS-1428?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16789302#comment-16789302
 ] 

Biswa Ranjan Ray commented on JCLOUDS-1428:
---

Hi,

I'm trying to configure BlobStoreContext for Azure storage using SAS token. I 
found the below code snippet from [jclouds 
|https://jclouds.apache.org/guides/azure-storage/]site that offers the portable 
BlobStore api:

{code:java}

BlobStoreContext context = ContextBuilder.newBuilder("azureblob")
 .credentials(storageAccountName, sasToken) //using sasToken in place of 
storage key
 .buildView(BlobStoreContext.class);

{code}
 Since we use SAS token based authentication, so I used sasToken in place of 
storageKey in the above code. But this throws : 
*com.google.common.io.BaseEncoding$DecodingException: Invalid input length 121*
 Please find the full stack trace attached for your reference.

I could be wrong, but after following the test class 
[SharedKeyLiteAuthenticationTest.java|https://gitbox.apache.org/repos/asf?p=jclouds.git;a=blob;f=providers/azureblob/src/test/java/org/jclouds/azure/storage/filters/SharedKeyLiteAuthenticationTest.java;h=5e0c2264127a2665c70391f010c6031fabe27854;hb=0ce9261]
 which was committed as a part of the 
[PR|https://gitbox.apache.org/repos/asf?p=jclouds.git;h=0ce9261], I tried the 
below code of my own:
{code:java}
BlobStoreContext context = ContextBuilder.newBuilder("azureblob")
   .endpoint("https://${identity}.blob.core.windows.net;)
   .credentials(accountName, sasToken)
   .modules(new ArrayList<>(3)) //just added an empty list of 
size 3
   .buildInjector()
   .getInstance(BlobStoreContext.class);

{code}

The above code also throws the same exception. 
Is it right to use SAS token as credential in place of storage key ?
Is it possible to use SAS token to configure BlobStoreContext for azure in 
order to get the portable BlobStore ? 
A code snippet would be highly appreciated.

Thanks and Regards,
Biswa Ranjan Ray

> Support for SAS token based Authentication for Azure Blob Storage
> -
>
> Key: JCLOUDS-1428
> URL: https://issues.apache.org/jira/browse/JCLOUDS-1428
> Project: jclouds
>  Issue Type: Improvement
>  Components: jclouds-blobstore
>Reporter: Himanshu Jain
>Priority: Major
>  Labels: azureblob
> Fix For: 2.2.0, 2.1.3
>
>
> Hi,
> We have one use case where we want to provide limited access to objects in 
> our storage accounts. We figured that the best way to do  this is by using 
> SAS token based authentication mechanism to upload/download objects to Azure 
> Blob Storage - [SAS based 
> Authentication|https://docs.microsoft.com/en-us/azure/storage/common/storage-dotnet-shared-access-signature-part-1]
> We found that JClouds client library provides support for Azure Blob Storage 
> using account keys which might not fit our use case because of security 
> reasons.



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


[jira] [Commented] (JCLOUDS-1419) Missing StorageClass REGIONAL for GCS buckets

2019-02-18 Thread Biswa Ranjan Ray (JIRA)


[ 
https://issues.apache.org/jira/browse/JCLOUDS-1419?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16770857#comment-16770857
 ] 

Biswa Ranjan Ray commented on JCLOUDS-1419:
---

Thank you for the update. Glad to see Jclouds 2.1.2 is now officially released. 
We have tested and found the release contains the fix for missing REGIONAL 
storage class in GCS buckets. Your time and effort is greatly appreciated.

> Missing StorageClass REGIONAL for GCS buckets
> -
>
> Key: JCLOUDS-1419
> URL: https://issues.apache.org/jira/browse/JCLOUDS-1419
> Project: jclouds
>  Issue Type: Bug
>  Components: jclouds-blobstore
>Affects Versions: 2.0.0
>Reporter: Suresh
>Assignee: Andrew Gaul
>Priority: Major
>  Labels: google-cloud-storage
> Fix For: 2.2.0, 2.1.2
>
>
> When calling BlobStore.putBlob the object is created but we receive an 
> exception
> {code:java}
> SEVERE: Error parsing input: No enum constant 
> org.jclouds.googlecloudstorage.domain.DomainResourceReferences.StorageClass.REGIONAL
> java.lang.IllegalArgumentException: No enum constant 
> org.jclouds.googlecloudstorage.domain.DomainResourceReferences.StorageClass.REGIONAL
> {code}
> The bucket itself is defined as a "Regional" storage class (other choices 
> available are Multi-Regional, Nearline and Coldline)
> Here is the full exception we receive:
> {code:java}
> May 15, 2018 5:47:55 PM org.jclouds.logging.jdk.JDKLogger logError
> SEVERE: Error parsing input: No enum constant 
> org.jclouds.googlecloudstorage.domain.DomainResourceReferences.StorageClass.REGIONAL
> java.lang.IllegalArgumentException: No enum constant 
> org.jclouds.googlecloudstorage.domain.DomainResourceReferences.StorageClass.REGIONAL
> at java.lang.Enum.valueOf(Enum.java:238)
> at 
> org.jclouds.json.internal.EnumTypeAdapterThatReturnsFromValue.deserialize(EnumTypeAdapterThatReturnsFromValue.java:41)
> at 
> org.jclouds.json.internal.EnumTypeAdapterThatReturnsFromValue.deserialize(EnumTypeAdapterThatReturnsFromValue.java:32)
> at com.google.gson.TreeTypeAdapter.read(TreeTypeAdapter.java:58)
> at 
> org.jclouds.json.internal.DeserializationConstructorAndReflectiveTypeAdapterFactory$ParameterReader.read(DeserializationConstructorAndReflectiveTypeAdapterFactory.java:272)
> at 
> org.jclouds.json.internal.DeserializationConstructorAndReflectiveTypeAdapterFactory$DeserializeIntoParameterizedConstructor.read(DeserializationConstructorAndReflectiveTypeAdapterFactory.java:184)
> at com.google.gson.Gson.fromJson(Gson.java:861)
> at com.google.gson.Gson.fromJson(Gson.java:826)
> at org.jclouds.json.internal.GsonWrapper.fromJson(GsonWrapper.java:55)
> at org.jclouds.http.functions.ParseJson.apply(ParseJson.java:82)
> at org.jclouds.http.functions.ParseJson.apply(ParseJson.java:76)
> at org.jclouds.http.functions.ParseJson.apply(ParseJson.java:61)
> at org.jclouds.http.functions.ParseJson.apply(ParseJson.java:41)
> at org.jclouds.rest.internal.InvokeHttpMethod.invoke(InvokeHttpMethod.java:90)
> at org.jclouds.rest.internal.InvokeHttpMethod.apply(InvokeHttpMethod.java:73)
> at org.jclouds.rest.internal.InvokeHttpMethod.apply(InvokeHttpMethod.java:44)
> at 
> org.jclouds.reflect.FunctionalReflection$FunctionalInvocationHandler.handleInvocation(FunctionalReflection.java:117)
> at 
> com.google.common.reflect.AbstractInvocationHandler.invoke(AbstractInvocationHandler.java:87)
> at com.sun.proxy.$Proxy104.simpleUpload(Unknown Source)
> at 
> org.jclouds.googlecloudstorage.blobstore.GoogleCloudStorageBlobStore.uploadMultipartPart(GoogleCloudStorageBlobStore.java:425)
> at 
> org.jclouds.blobstore.internal.BaseBlobStore$BlobUploader.call(BaseBlobStore.java:388)
> at 
> org.jclouds.blobstore.internal.BaseBlobStore$BlobUploader.call(BaseBlobStore.java:375)
> at java.util.concurrent.FutureTask.run(FutureTask.java:266)
> at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
> at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
> at java.lang.Thread.run(Thread.java:745)
> {code}
> It looks like the list of [StorageClass 
> enum]([https://github.com/jclouds/jclouds-labs-google/blob/master/google-cloud-storage/src/main/java/org/jclouds/googlecloudstorage/domain/DomainResourceReferences.java#L48])
>  is incomplete



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


[jira] [Commented] (JCLOUDS-1419) Missing StorageClass REGIONAL for GCS buckets

2019-01-24 Thread Biswa Ranjan Ray (JIRA)


[ 
https://issues.apache.org/jira/browse/JCLOUDS-1419?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16751253#comment-16751253
 ] 

Biswa Ranjan Ray commented on JCLOUDS-1419:
---

Just a follow up. Any updates on the release of Jclouds 2.2.0 version.

> Missing StorageClass REGIONAL for GCS buckets
> -
>
> Key: JCLOUDS-1419
> URL: https://issues.apache.org/jira/browse/JCLOUDS-1419
> Project: jclouds
>  Issue Type: Bug
>  Components: jclouds-blobstore
>Affects Versions: 2.0.0
>Reporter: Suresh
>Assignee: Andrew Gaul
>Priority: Major
>  Labels: google-cloud-storage
> Fix For: 2.2.0, 2.1.2
>
>
> When calling BlobStore.putBlob the object is created but we receive an 
> exception
> {code:java}
> SEVERE: Error parsing input: No enum constant 
> org.jclouds.googlecloudstorage.domain.DomainResourceReferences.StorageClass.REGIONAL
> java.lang.IllegalArgumentException: No enum constant 
> org.jclouds.googlecloudstorage.domain.DomainResourceReferences.StorageClass.REGIONAL
> {code}
> The bucket itself is defined as a "Regional" storage class (other choices 
> available are Multi-Regional, Nearline and Coldline)
> Here is the full exception we receive:
> {code:java}
> May 15, 2018 5:47:55 PM org.jclouds.logging.jdk.JDKLogger logError
> SEVERE: Error parsing input: No enum constant 
> org.jclouds.googlecloudstorage.domain.DomainResourceReferences.StorageClass.REGIONAL
> java.lang.IllegalArgumentException: No enum constant 
> org.jclouds.googlecloudstorage.domain.DomainResourceReferences.StorageClass.REGIONAL
> at java.lang.Enum.valueOf(Enum.java:238)
> at 
> org.jclouds.json.internal.EnumTypeAdapterThatReturnsFromValue.deserialize(EnumTypeAdapterThatReturnsFromValue.java:41)
> at 
> org.jclouds.json.internal.EnumTypeAdapterThatReturnsFromValue.deserialize(EnumTypeAdapterThatReturnsFromValue.java:32)
> at com.google.gson.TreeTypeAdapter.read(TreeTypeAdapter.java:58)
> at 
> org.jclouds.json.internal.DeserializationConstructorAndReflectiveTypeAdapterFactory$ParameterReader.read(DeserializationConstructorAndReflectiveTypeAdapterFactory.java:272)
> at 
> org.jclouds.json.internal.DeserializationConstructorAndReflectiveTypeAdapterFactory$DeserializeIntoParameterizedConstructor.read(DeserializationConstructorAndReflectiveTypeAdapterFactory.java:184)
> at com.google.gson.Gson.fromJson(Gson.java:861)
> at com.google.gson.Gson.fromJson(Gson.java:826)
> at org.jclouds.json.internal.GsonWrapper.fromJson(GsonWrapper.java:55)
> at org.jclouds.http.functions.ParseJson.apply(ParseJson.java:82)
> at org.jclouds.http.functions.ParseJson.apply(ParseJson.java:76)
> at org.jclouds.http.functions.ParseJson.apply(ParseJson.java:61)
> at org.jclouds.http.functions.ParseJson.apply(ParseJson.java:41)
> at org.jclouds.rest.internal.InvokeHttpMethod.invoke(InvokeHttpMethod.java:90)
> at org.jclouds.rest.internal.InvokeHttpMethod.apply(InvokeHttpMethod.java:73)
> at org.jclouds.rest.internal.InvokeHttpMethod.apply(InvokeHttpMethod.java:44)
> at 
> org.jclouds.reflect.FunctionalReflection$FunctionalInvocationHandler.handleInvocation(FunctionalReflection.java:117)
> at 
> com.google.common.reflect.AbstractInvocationHandler.invoke(AbstractInvocationHandler.java:87)
> at com.sun.proxy.$Proxy104.simpleUpload(Unknown Source)
> at 
> org.jclouds.googlecloudstorage.blobstore.GoogleCloudStorageBlobStore.uploadMultipartPart(GoogleCloudStorageBlobStore.java:425)
> at 
> org.jclouds.blobstore.internal.BaseBlobStore$BlobUploader.call(BaseBlobStore.java:388)
> at 
> org.jclouds.blobstore.internal.BaseBlobStore$BlobUploader.call(BaseBlobStore.java:375)
> at java.util.concurrent.FutureTask.run(FutureTask.java:266)
> at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
> at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
> at java.lang.Thread.run(Thread.java:745)
> {code}
> It looks like the list of [StorageClass 
> enum]([https://github.com/jclouds/jclouds-labs-google/blob/master/google-cloud-storage/src/main/java/org/jclouds/googlecloudstorage/domain/DomainResourceReferences.java#L48])
>  is incomplete



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


[jira] [Comment Edited] (JCLOUDS-1483) Removing a blob from a Swift container using BlobStore.removeBlob fails.

2019-01-20 Thread Biswa Ranjan Ray (JIRA)


[ 
https://issues.apache.org/jira/browse/JCLOUDS-1483?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16747653#comment-16747653
 ] 

Biswa Ranjan Ray edited comment on JCLOUDS-1483 at 1/21/19 5:22 AM:


*One more Observation*: Although its not our usecase, I just tried to verify 
how getManifest method works since the delete method is adapted to pretty much 
similar code and it throws exception. Look at the below code snippet.
{code:java}
//Getting the BlobStoreContext
BlobStoreContext context = getBlobStoreContext();
SwiftApi swiftApi = context.unwrapApi(SwiftApi.class);
Set regions = swiftApi.getConfiguredRegions();
Iterator iterator = regions.iterator();
String regionId = iterator.next();
StaticLargeObjectApi sloApi = swiftApi.getStaticLargeObjectApi(regionId, 
bucket);
List list = sloApi.getManifest(fileName);
System.out.println("No of Segments are found to be: "+list.size());
{code}
Surprisingly the line *List list = sloApi.getManifest(fileName);* 
throws similar exception: Expected BEGIN_ARRAY but was STRING at line 1 column 
1 path $


was (Author: roy.biswa):
*One more Observation*: Although its not our usecase, I just tried to verify 
how getManifest method works since in the delete method I adapted to pretty 
much similar code and it throws exception. Look at the below code snippet.
{code:java}
//Getting the BlobStoreContext
BlobStoreContext context = getBlobStoreContext();
SwiftApi swiftApi = context.unwrapApi(SwiftApi.class);
Set regions = swiftApi.getConfiguredRegions();
Iterator iterator = regions.iterator();
String regionId = iterator.next();
StaticLargeObjectApi sloApi = swiftApi.getStaticLargeObjectApi(regionId, 
bucket);
List list = sloApi.getManifest(fileName);
System.out.println("No of Segments are found to be: "+list.size());
{code}
Surprisingly the line *List list = sloApi.getManifest(fileName);* 
throws similar exception: Expected BEGIN_ARRAY but was STRING at line 1 column 
1 path $

> Removing a blob from a Swift container using BlobStore.removeBlob fails.
> 
>
> Key: JCLOUDS-1483
> URL: https://issues.apache.org/jira/browse/JCLOUDS-1483
> Project: jclouds
>  Issue Type: Bug
>  Components: jclouds-blobstore
>Affects Versions: 2.1.1
>Reporter: Biswa Ranjan Ray
>Priority: Major
>  Labels: openstack-swift
> Attachments: BuildException.txt, NullPointerException.txt, 
> StaticLargeObjectApiMockTest.html, stacktrace.txt
>
>
>  
> *Usecase*: Try to delete a blob (size ~ 107kb) from a swift container using 
> BlobStore.removBlob() api of jclouds.
> *Issue*: Following exception is found in console: 
> com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: 
> *Expected BEGIN_OBJECT but was STRING at line 1 column 1 path $*.
> *Code*: Sharing the code snippet that I've used to delete a blob from a swift 
> container.
> BlobStore blobStore = getBlobStoreContext();              
> blobStore.removeBlob(containerName, fileName);
> {code:java}
> //To get the BlobStoreContext for OpenStack Swift
> private BlobStoreContext getBlobStoreContext() {
>  final Properties override = new Properties();
>  override.put(KeystoneProperties.KEYSTONE_VERSION, "3");
>  override.put(KeystoneProperties.SCOPE, "project:" + 
> swiftConfig.getProject());
>  
>  final String credential = swiftConfig.getPassword();
>  final String identity = swiftConfig.getUserDomain() + ":" + 
> swiftConfig.getUsername();
>  final String authUrl = swiftConfig.getAuthUrl();
>  
>  return ContextBuilder.newBuilder("openstack-swift")
>  .endpoint(authUrl+"/v3")
>  .credentials(identity,credential)
>  .overrides(override)
>  .buildApi(BlobStoreContext.class);
>  }
> {code}
>  *Debug:* Following are my observations after debugging the code.
>  # The type of the blobstore is found to be RegionScopedSwiftBlobStore.
>  # stepinto blobStore.*removeBlob*(containerName, fileName);                  
>                       at line 396 in *RegionScopedSwiftBlobStore* class, I 
> found it expects a response from *StaticLargeObjectApi* as shown in the below 
> code and this is where the exception occurs:                                  
>                    **                                                  
> DeleteStaticLargeObjectResponse response = 
> api.getStaticLargeObjectApi(regionId, container).delete(name); 
> *Analysis*: While the api BlobStore.removeBlob fails to delete a blob in a 
> Swift container, it works fine in AWS S3 and GCS container. I also observed 
> that if I use *ObjectApi.delete(objectName)* instead of 
> *BlobStore.removeBlob* then the blob gets deleted from the swift container 
> without any issue. As per the java doc of StaticLargeObjectApi, it is in beta 
> and still under evaluation. Is this api stable?
> Any help is highly 

[jira] [Commented] (JCLOUDS-1483) Removing a blob from a Swift container using BlobStore.removeBlob fails.

2019-01-20 Thread Biswa Ranjan Ray (JIRA)


[ 
https://issues.apache.org/jira/browse/JCLOUDS-1483?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16747653#comment-16747653
 ] 

Biswa Ranjan Ray commented on JCLOUDS-1483:
---

*One more Observation*: Although its not our usecase, I just tried to verify 
how getManifest method works since in the delete method I adapted to pretty 
much similar code and it throws exception. Look at the below code snippet.
{code:java}
//Getting the BlobStoreContext
BlobStoreContext context = getBlobStoreContext();
SwiftApi swiftApi = context.unwrapApi(SwiftApi.class);
Set regions = swiftApi.getConfiguredRegions();
Iterator iterator = regions.iterator();
String regionId = iterator.next();
StaticLargeObjectApi sloApi = swiftApi.getStaticLargeObjectApi(regionId, 
bucket);
List list = sloApi.getManifest(fileName);
System.out.println("No of Segments are found to be: "+list.size());
{code}
Surprisingly the line *List list = sloApi.getManifest(fileName);* 
throws similar exception: Expected BEGIN_ARRAY but was STRING at line 1 column 
1 path $

> Removing a blob from a Swift container using BlobStore.removeBlob fails.
> 
>
> Key: JCLOUDS-1483
> URL: https://issues.apache.org/jira/browse/JCLOUDS-1483
> Project: jclouds
>  Issue Type: Bug
>  Components: jclouds-blobstore
>Affects Versions: 2.1.1
>Reporter: Biswa Ranjan Ray
>Priority: Major
>  Labels: openstack-swift
> Attachments: BuildException.txt, NullPointerException.txt, 
> StaticLargeObjectApiMockTest.html, stacktrace.txt
>
>
>  
> *Usecase*: Try to delete a blob (size ~ 107kb) from a swift container using 
> BlobStore.removBlob() api of jclouds.
> *Issue*: Following exception is found in console: 
> com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: 
> *Expected BEGIN_OBJECT but was STRING at line 1 column 1 path $*.
> *Code*: Sharing the code snippet that I've used to delete a blob from a swift 
> container.
> BlobStore blobStore = getBlobStoreContext();              
> blobStore.removeBlob(containerName, fileName);
> {code:java}
> //To get the BlobStoreContext for OpenStack Swift
> private BlobStoreContext getBlobStoreContext() {
>  final Properties override = new Properties();
>  override.put(KeystoneProperties.KEYSTONE_VERSION, "3");
>  override.put(KeystoneProperties.SCOPE, "project:" + 
> swiftConfig.getProject());
>  
>  final String credential = swiftConfig.getPassword();
>  final String identity = swiftConfig.getUserDomain() + ":" + 
> swiftConfig.getUsername();
>  final String authUrl = swiftConfig.getAuthUrl();
>  
>  return ContextBuilder.newBuilder("openstack-swift")
>  .endpoint(authUrl+"/v3")
>  .credentials(identity,credential)
>  .overrides(override)
>  .buildApi(BlobStoreContext.class);
>  }
> {code}
>  *Debug:* Following are my observations after debugging the code.
>  # The type of the blobstore is found to be RegionScopedSwiftBlobStore.
>  # stepinto blobStore.*removeBlob*(containerName, fileName);                  
>                       at line 396 in *RegionScopedSwiftBlobStore* class, I 
> found it expects a response from *StaticLargeObjectApi* as shown in the below 
> code and this is where the exception occurs:                                  
>                    **                                                  
> DeleteStaticLargeObjectResponse response = 
> api.getStaticLargeObjectApi(regionId, container).delete(name); 
> *Analysis*: While the api BlobStore.removeBlob fails to delete a blob in a 
> Swift container, it works fine in AWS S3 and GCS container. I also observed 
> that if I use *ObjectApi.delete(objectName)* instead of 
> *BlobStore.removeBlob* then the blob gets deleted from the swift container 
> without any issue. As per the java doc of StaticLargeObjectApi, it is in beta 
> and still under evaluation. Is this api stable?
> Any help is highly appreciated.
> Thank you.



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


[jira] [Comment Edited] (JCLOUDS-1483) Removing a blob from a Swift container using BlobStore.removeBlob fails.

2019-01-20 Thread Biswa Ranjan Ray (JIRA)


[ 
https://issues.apache.org/jira/browse/JCLOUDS-1483?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16746054#comment-16746054
 ] 

Biswa Ranjan Ray edited comment on JCLOUDS-1483 at 1/20/19 2:53 PM:


_Trial 1:_
 _b. Build failed because of testcase failure at line 117 of 
testReplaceManifestUnicodeUTF8() method in StaticLargeObjectApiMockTest class._

I could able to fix the build issue but I had to set UTF8 encoding in java and 
maven: 
 *set JAVA_TOOL_OPTIONS=-Dfile.encoding=UTF8*
 *set MAVEN_OPTS=-Duser.language=en -Dfile.encoding=UTF-8*
 Shouldn't it be handle by pom?

_Trial 2:_
 _c. It still throws the same exception as reported earlier :_
 _com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: 
Expected BEGIN_OBJECT but was STRING at line 1 column 1 path $_
 _This is very strange. Do you run your tests against OpenStack Swift or 
another implementation?_
  
 I have tested my changes against 
[openstack-swift|https://github.com/apache/jclouds/tree/master/apis/openstack-swift]
 project after making the changes to 
[StaticLargeObjectApi|https://github.com/apache/jclouds/blob/master/apis/openstack-swift/src/main/java/org/jclouds/openstack/swift/v1/features/StaticLargeObjectApi.java]
 and 
[StaticLargeObjectApiMockTest|https://github.com/apache/jclouds/blob/master/apis/openstack-swift/src/test/java/org/jclouds/openstack/swift/v1/features/StaticLargeObjectApiMockTest.java]
 classes. In the StaticLargeObjectApiMockTest class I replaced the existing 
code at line 230 and 252 with 
 _assertRequest(server.takeRequest(), "DELETE", 
"/v1/MossoCloudFS_5bcf396e-39dd-45ff-93a1-712b9aba90a9/myContainer/myObject?format=json=delete");_

It still throws: Expected BEGIN_OBJECT but was STRING at line 1 column 1 path $
 Am I missing anything?


was (Author: roy.biswa):
_Trial 1:_
 _b. Build failed because of testcase failure at line 117 of 
testReplaceManifestUnicodeUTF8() method in StaticLargeObjectApiMockTest class._

I could able to fix the build issue but I had to set UTF8 encoding in java and 
maven: 
 *set JAVA_TOOL_OPTIONS=-Dfile.encoding=UTF8*
 *set MAVEN_OPTS=-Duser.language=en -Dfile.encoding=UTF-8*
 Shouldn't it be handle by pom?

_Trial 2:_
 _c. It still throws the same exception as reported earlier :_
 _com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: 
Expected BEGIN_OBJECT but was STRING at line 1 column 1 path $_
 _This is very strange. Do you run your tests against OpenStack Swift or 
another implementation?_
  
 Putting the steps just to make sure if I'm doing right.
 Step 1. I forked the project from [jclouds|https://github.com/apache/jclouds] 
and cloned into my system.

Step 2. I modified 
[StaticLargeObjectApi|https://github.com/apache/jclouds/blob/master/apis/openstack-swift/src/main/java/org/jclouds/openstack/swift/v1/features/StaticLargeObjectApi.java]
 by replacing the existing code at line at 117 with 
 *@QueryParams(keys = \{"format", "multipart-manifest"}, values = \{"json", 
"delete"})*

Step 3. Then Modified 
[StaticLargeObjectApiMockTest|https://github.com/apache/jclouds/blob/master/apis/openstack-swift/src/test/java/org/jclouds/openstack/swift/v1/features/StaticLargeObjectApiMockTest.java]
 by replacing the existing code at line 230 and 252 with 
 *assertRequest(server.takeRequest(), "DELETE", 
"/v1/MossoCloudFS_5bcf396e-39dd-45ff-93a1-712b9aba90a9/myContainer/myObject?format=json=delete");*

Step 4. To ensure if my changes are taken into effect, I added a print stmt in 
removeBlob() method of RegionScopedSwiftBlobStore class to print the container 
name.

Step 5. Triggered a build on 
[openstack-swift|https://github.com/apache/jclouds/tree/master/apis/openstack-swift]
 project and added this to my project pom. Debugged and found the container 
name is printed when attempted to delete a blob.

It still throws: Expected BEGIN_OBJECT but was STRING at line 1 column 1 path $
 Am I missing anything?

> Removing a blob from a Swift container using BlobStore.removeBlob fails.
> 
>
> Key: JCLOUDS-1483
> URL: https://issues.apache.org/jira/browse/JCLOUDS-1483
> Project: jclouds
>  Issue Type: Bug
>  Components: jclouds-blobstore
>Affects Versions: 2.1.1
>Reporter: Biswa Ranjan Ray
>Priority: Major
>  Labels: openstack-swift
> Attachments: BuildException.txt, NullPointerException.txt, 
> StaticLargeObjectApiMockTest.html, stacktrace.txt
>
>
>  
> *Usecase*: Try to delete a blob (size ~ 107kb) from a swift container using 
> BlobStore.removBlob() api of jclouds.
> *Issue*: Following exception is found in console: 
> com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: 
> *Expected BEGIN_OBJECT but was STRING at line 1 column 1 path $*.
> *Code*: Sharing the code snippet 

[jira] [Commented] (JCLOUDS-1483) Removing a blob from a Swift container using BlobStore.removeBlob fails.

2019-01-18 Thread Biswa Ranjan Ray (JIRA)


[ 
https://issues.apache.org/jira/browse/JCLOUDS-1483?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16746054#comment-16746054
 ] 

Biswa Ranjan Ray commented on JCLOUDS-1483:
---

_Trial 1:_
 _b. Build failed because of testcase failure at line 117 of 
testReplaceManifestUnicodeUTF8() method in StaticLargeObjectApiMockTest class._

I could able to fix the build issue but I had to set UTF8 encoding in java and 
maven: 
 *set JAVA_TOOL_OPTIONS=-Dfile.encoding=UTF8*
 *set MAVEN_OPTS=-Duser.language=en -Dfile.encoding=UTF-8*
 Shouldn't it be handle by pom?

_Trial 2:_
 _c. It still throws the same exception as reported earlier :_
 _com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: 
Expected BEGIN_OBJECT but was STRING at line 1 column 1 path $_
 _This is very strange. Do you run your tests against OpenStack Swift or 
another implementation?_
  
 Putting the steps just to make sure if I'm doing right.
 Step 1. I forked the project from [jclouds|https://github.com/apache/jclouds] 
and cloned into my system.

Step 2. I modified 
[StaticLargeObjectApi|https://github.com/apache/jclouds/blob/master/apis/openstack-swift/src/main/java/org/jclouds/openstack/swift/v1/features/StaticLargeObjectApi.java]
 by replacing the existing code at line at 117 with 
 *@QueryParams(keys = \{"format", "multipart-manifest"}, values = \{"json", 
"delete"})*

Step 3. Then Modified 
[StaticLargeObjectApiMockTest|https://github.com/apache/jclouds/blob/master/apis/openstack-swift/src/test/java/org/jclouds/openstack/swift/v1/features/StaticLargeObjectApiMockTest.java]
 by replacing the existing code at line 230 and 252 with 
 *assertRequest(server.takeRequest(), "DELETE", 
"/v1/MossoCloudFS_5bcf396e-39dd-45ff-93a1-712b9aba90a9/myContainer/myObject?format=json=delete");*

Step 4. To ensure if my changes are taken into effect, I added a print stmt in 
removeBlob() method of RegionScopedSwiftBlobStore class to print the container 
name.

Step 5. Triggered a build on 
[openstack-swift|https://github.com/apache/jclouds/tree/master/apis/openstack-swift]
 project and added this to my project pom. Debugged and found the container 
name is printed when attempted to delete a blob.

It still throws: Expected BEGIN_OBJECT but was STRING at line 1 column 1 path $
 Am I missing anything?

> Removing a blob from a Swift container using BlobStore.removeBlob fails.
> 
>
> Key: JCLOUDS-1483
> URL: https://issues.apache.org/jira/browse/JCLOUDS-1483
> Project: jclouds
>  Issue Type: Bug
>  Components: jclouds-blobstore
>Affects Versions: 2.1.1
>Reporter: Biswa Ranjan Ray
>Priority: Major
>  Labels: openstack-swift
> Attachments: BuildException.txt, NullPointerException.txt, 
> StaticLargeObjectApiMockTest.html, stacktrace.txt
>
>
>  
> *Usecase*: Try to delete a blob (size ~ 107kb) from a swift container using 
> BlobStore.removBlob() api of jclouds.
> *Issue*: Following exception is found in console: 
> com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: 
> *Expected BEGIN_OBJECT but was STRING at line 1 column 1 path $*.
> *Code*: Sharing the code snippet that I've used to delete a blob from a swift 
> container.
> BlobStore blobStore = getBlobStoreContext();              
> blobStore.removeBlob(containerName, fileName);
> {code:java}
> //To get the BlobStoreContext for OpenStack Swift
> private BlobStoreContext getBlobStoreContext() {
>  final Properties override = new Properties();
>  override.put(KeystoneProperties.KEYSTONE_VERSION, "3");
>  override.put(KeystoneProperties.SCOPE, "project:" + 
> swiftConfig.getProject());
>  
>  final String credential = swiftConfig.getPassword();
>  final String identity = swiftConfig.getUserDomain() + ":" + 
> swiftConfig.getUsername();
>  final String authUrl = swiftConfig.getAuthUrl();
>  
>  return ContextBuilder.newBuilder("openstack-swift")
>  .endpoint(authUrl+"/v3")
>  .credentials(identity,credential)
>  .overrides(override)
>  .buildApi(BlobStoreContext.class);
>  }
> {code}
>  *Debug:* Following are my observations after debugging the code.
>  # The type of the blobstore is found to be RegionScopedSwiftBlobStore.
>  # stepinto blobStore.*removeBlob*(containerName, fileName);                  
>                       at line 396 in *RegionScopedSwiftBlobStore* class, I 
> found it expects a response from *StaticLargeObjectApi* as shown in the below 
> code and this is where the exception occurs:                                  
>                    **                                                  
> DeleteStaticLargeObjectResponse response = 
> api.getStaticLargeObjectApi(regionId, container).delete(name); 
> *Analysis*: While the api BlobStore.removeBlob fails to delete a blob in a 
> Swift container, it works fine in AWS 

[jira] [Issue Comment Deleted] (JCLOUDS-1483) Removing a blob from a Swift container using BlobStore.removeBlob fails.

2019-01-18 Thread Biswa Ranjan Ray (JIRA)


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

Biswa Ranjan Ray updated JCLOUDS-1483:
--
Comment: was deleted

(was: I investigated and figured out the build issue I was facing in Trial 1. 
Its utf8 character encoding issue. In the 
StaticLargeObjectApiMockTest.testReplaceManifestUnicodeUTF8 method, the 
expected and actual json doesn't match because the expected json expects a 
string i.e *unic₪de* which doesn't match with the actual i.e *unic₪de*. 
My OS is windows 10. Although its a trivial issue I'm trying to fix it setting 
maven to UTF8.

But the actual issue w.r.t delete() method in StaticLargeObjectApi is still a 
concern.)

> Removing a blob from a Swift container using BlobStore.removeBlob fails.
> 
>
> Key: JCLOUDS-1483
> URL: https://issues.apache.org/jira/browse/JCLOUDS-1483
> Project: jclouds
>  Issue Type: Bug
>  Components: jclouds-blobstore
>Affects Versions: 2.1.1
>Reporter: Biswa Ranjan Ray
>Priority: Major
>  Labels: openstack-swift
> Attachments: BuildException.txt, NullPointerException.txt, 
> StaticLargeObjectApiMockTest.html, stacktrace.txt
>
>
>  
> *Usecase*: Try to delete a blob (size ~ 107kb) from a swift container using 
> BlobStore.removBlob() api of jclouds.
> *Issue*: Following exception is found in console: 
> com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: 
> *Expected BEGIN_OBJECT but was STRING at line 1 column 1 path $*.
> *Code*: Sharing the code snippet that I've used to delete a blob from a swift 
> container.
> BlobStore blobStore = getBlobStoreContext();              
> blobStore.removeBlob(containerName, fileName);
> {code:java}
> //To get the BlobStoreContext for OpenStack Swift
> private BlobStoreContext getBlobStoreContext() {
>  final Properties override = new Properties();
>  override.put(KeystoneProperties.KEYSTONE_VERSION, "3");
>  override.put(KeystoneProperties.SCOPE, "project:" + 
> swiftConfig.getProject());
>  
>  final String credential = swiftConfig.getPassword();
>  final String identity = swiftConfig.getUserDomain() + ":" + 
> swiftConfig.getUsername();
>  final String authUrl = swiftConfig.getAuthUrl();
>  
>  return ContextBuilder.newBuilder("openstack-swift")
>  .endpoint(authUrl+"/v3")
>  .credentials(identity,credential)
>  .overrides(override)
>  .buildApi(BlobStoreContext.class);
>  }
> {code}
>  *Debug:* Following are my observations after debugging the code.
>  # The type of the blobstore is found to be RegionScopedSwiftBlobStore.
>  # stepinto blobStore.*removeBlob*(containerName, fileName);                  
>                       at line 396 in *RegionScopedSwiftBlobStore* class, I 
> found it expects a response from *StaticLargeObjectApi* as shown in the below 
> code and this is where the exception occurs:                                  
>                    **                                                  
> DeleteStaticLargeObjectResponse response = 
> api.getStaticLargeObjectApi(regionId, container).delete(name); 
> *Analysis*: While the api BlobStore.removeBlob fails to delete a blob in a 
> Swift container, it works fine in AWS S3 and GCS container. I also observed 
> that if I use *ObjectApi.delete(objectName)* instead of 
> *BlobStore.removeBlob* then the blob gets deleted from the swift container 
> without any issue. As per the java doc of StaticLargeObjectApi, it is in beta 
> and still under evaluation. Is this api stable?
> Any help is highly appreciated.
> Thank you.



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


[jira] [Commented] (JCLOUDS-1483) Removing a blob from a Swift container using BlobStore.removeBlob fails.

2019-01-17 Thread Biswa Ranjan Ray (JIRA)


[ 
https://issues.apache.org/jira/browse/JCLOUDS-1483?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16745306#comment-16745306
 ] 

Biswa Ranjan Ray commented on JCLOUDS-1483:
---

I investigated and figured out the build issue I was facing in Trial 1. Its 
utf8 character encoding issue. In the 
StaticLargeObjectApiMockTest.testReplaceManifestUnicodeUTF8 method, the 
expected and actual json doesn't match because the expected json expects a 
string i.e *unic₪de* which doesn't match with the actual i.e *unic₪de*. 
My OS is windows 10. Although its a trivial issue I'm trying to fix it setting 
maven to UTF8.

But the actual issue w.r.t delete() method in StaticLargeObjectApi is still a 
concern.

> Removing a blob from a Swift container using BlobStore.removeBlob fails.
> 
>
> Key: JCLOUDS-1483
> URL: https://issues.apache.org/jira/browse/JCLOUDS-1483
> Project: jclouds
>  Issue Type: Bug
>  Components: jclouds-blobstore
>Affects Versions: 2.1.1
>Reporter: Biswa Ranjan Ray
>Priority: Major
>  Labels: openstack-swift
> Attachments: BuildException.txt, NullPointerException.txt, 
> StaticLargeObjectApiMockTest.html, stacktrace.txt
>
>
>  
> *Usecase*: Try to delete a blob (size ~ 107kb) from a swift container using 
> BlobStore.removBlob() api of jclouds.
> *Issue*: Following exception is found in console: 
> com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: 
> *Expected BEGIN_OBJECT but was STRING at line 1 column 1 path $*.
> *Code*: Sharing the code snippet that I've used to delete a blob from a swift 
> container.
> BlobStore blobStore = getBlobStoreContext();              
> blobStore.removeBlob(containerName, fileName);
> {code:java}
> //To get the BlobStoreContext for OpenStack Swift
> private BlobStoreContext getBlobStoreContext() {
>  final Properties override = new Properties();
>  override.put(KeystoneProperties.KEYSTONE_VERSION, "3");
>  override.put(KeystoneProperties.SCOPE, "project:" + 
> swiftConfig.getProject());
>  
>  final String credential = swiftConfig.getPassword();
>  final String identity = swiftConfig.getUserDomain() + ":" + 
> swiftConfig.getUsername();
>  final String authUrl = swiftConfig.getAuthUrl();
>  
>  return ContextBuilder.newBuilder("openstack-swift")
>  .endpoint(authUrl+"/v3")
>  .credentials(identity,credential)
>  .overrides(override)
>  .buildApi(BlobStoreContext.class);
>  }
> {code}
>  *Debug:* Following are my observations after debugging the code.
>  # The type of the blobstore is found to be RegionScopedSwiftBlobStore.
>  # stepinto blobStore.*removeBlob*(containerName, fileName);                  
>                       at line 396 in *RegionScopedSwiftBlobStore* class, I 
> found it expects a response from *StaticLargeObjectApi* as shown in the below 
> code and this is where the exception occurs:                                  
>                    **                                                  
> DeleteStaticLargeObjectResponse response = 
> api.getStaticLargeObjectApi(regionId, container).delete(name); 
> *Analysis*: While the api BlobStore.removeBlob fails to delete a blob in a 
> Swift container, it works fine in AWS S3 and GCS container. I also observed 
> that if I use *ObjectApi.delete(objectName)* instead of 
> *BlobStore.removeBlob* then the blob gets deleted from the swift container 
> without any issue. As per the java doc of StaticLargeObjectApi, it is in beta 
> and still under evaluation. Is this api stable?
> Any help is highly appreciated.
> Thank you.



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


[jira] [Updated] (JCLOUDS-1483) Removing a blob from a Swift container using BlobStore.removeBlob fails.

2019-01-17 Thread Biswa Ranjan Ray (JIRA)


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

Biswa Ranjan Ray updated JCLOUDS-1483:
--
Attachment: BuildException.txt

> Removing a blob from a Swift container using BlobStore.removeBlob fails.
> 
>
> Key: JCLOUDS-1483
> URL: https://issues.apache.org/jira/browse/JCLOUDS-1483
> Project: jclouds
>  Issue Type: Bug
>  Components: jclouds-blobstore
>Affects Versions: 2.1.1
>Reporter: Biswa Ranjan Ray
>Priority: Major
>  Labels: openstack-swift
> Attachments: BuildException.txt, NullPointerException.txt, 
> StaticLargeObjectApiMockTest.html, stacktrace.txt
>
>
>  
> *Usecase*: Try to delete a blob (size ~ 107kb) from a swift container using 
> BlobStore.removBlob() api of jclouds.
> *Issue*: Following exception is found in console: 
> com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: 
> *Expected BEGIN_OBJECT but was STRING at line 1 column 1 path $*.
> *Code*: Sharing the code snippet that I've used to delete a blob from a swift 
> container.
> BlobStore blobStore = getBlobStoreContext();              
> blobStore.removeBlob(containerName, fileName);
> {code:java}
> //To get the BlobStoreContext for OpenStack Swift
> private BlobStoreContext getBlobStoreContext() {
>  final Properties override = new Properties();
>  override.put(KeystoneProperties.KEYSTONE_VERSION, "3");
>  override.put(KeystoneProperties.SCOPE, "project:" + 
> swiftConfig.getProject());
>  
>  final String credential = swiftConfig.getPassword();
>  final String identity = swiftConfig.getUserDomain() + ":" + 
> swiftConfig.getUsername();
>  final String authUrl = swiftConfig.getAuthUrl();
>  
>  return ContextBuilder.newBuilder("openstack-swift")
>  .endpoint(authUrl+"/v3")
>  .credentials(identity,credential)
>  .overrides(override)
>  .buildApi(BlobStoreContext.class);
>  }
> {code}
>  *Debug:* Following are my observations after debugging the code.
>  # The type of the blobstore is found to be RegionScopedSwiftBlobStore.
>  # stepinto blobStore.*removeBlob*(containerName, fileName);                  
>                       at line 396 in *RegionScopedSwiftBlobStore* class, I 
> found it expects a response from *StaticLargeObjectApi* as shown in the below 
> code and this is where the exception occurs:                                  
>                    **                                                  
> DeleteStaticLargeObjectResponse response = 
> api.getStaticLargeObjectApi(regionId, container).delete(name); 
> *Analysis*: While the api BlobStore.removeBlob fails to delete a blob in a 
> Swift container, it works fine in AWS S3 and GCS container. I also observed 
> that if I use *ObjectApi.delete(objectName)* instead of 
> *BlobStore.removeBlob* then the blob gets deleted from the swift container 
> without any issue. As per the java doc of StaticLargeObjectApi, it is in beta 
> and still under evaluation. Is this api stable?
> Any help is highly appreciated.
> Thank you.



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


[jira] [Updated] (JCLOUDS-1483) Removing a blob from a Swift container using BlobStore.removeBlob fails.

2019-01-17 Thread Biswa Ranjan Ray (JIRA)


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

Biswa Ranjan Ray updated JCLOUDS-1483:
--
Attachment: StaticLargeObjectApiMockTest.html

> Removing a blob from a Swift container using BlobStore.removeBlob fails.
> 
>
> Key: JCLOUDS-1483
> URL: https://issues.apache.org/jira/browse/JCLOUDS-1483
> Project: jclouds
>  Issue Type: Bug
>  Components: jclouds-blobstore
>Affects Versions: 2.1.1
>Reporter: Biswa Ranjan Ray
>Priority: Major
>  Labels: openstack-swift
> Attachments: NullPointerException.txt, 
> StaticLargeObjectApiMockTest.html, stacktrace.txt
>
>
>  
> *Usecase*: Try to delete a blob (size ~ 107kb) from a swift container using 
> BlobStore.removBlob() api of jclouds.
> *Issue*: Following exception is found in console: 
> com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: 
> *Expected BEGIN_OBJECT but was STRING at line 1 column 1 path $*.
> *Code*: Sharing the code snippet that I've used to delete a blob from a swift 
> container.
> BlobStore blobStore = getBlobStoreContext();              
> blobStore.removeBlob(containerName, fileName);
> {code:java}
> //To get the BlobStoreContext for OpenStack Swift
> private BlobStoreContext getBlobStoreContext() {
>  final Properties override = new Properties();
>  override.put(KeystoneProperties.KEYSTONE_VERSION, "3");
>  override.put(KeystoneProperties.SCOPE, "project:" + 
> swiftConfig.getProject());
>  
>  final String credential = swiftConfig.getPassword();
>  final String identity = swiftConfig.getUserDomain() + ":" + 
> swiftConfig.getUsername();
>  final String authUrl = swiftConfig.getAuthUrl();
>  
>  return ContextBuilder.newBuilder("openstack-swift")
>  .endpoint(authUrl+"/v3")
>  .credentials(identity,credential)
>  .overrides(override)
>  .buildApi(BlobStoreContext.class);
>  }
> {code}
>  *Debug:* Following are my observations after debugging the code.
>  # The type of the blobstore is found to be RegionScopedSwiftBlobStore.
>  # stepinto blobStore.*removeBlob*(containerName, fileName);                  
>                       at line 396 in *RegionScopedSwiftBlobStore* class, I 
> found it expects a response from *StaticLargeObjectApi* as shown in the below 
> code and this is where the exception occurs:                                  
>                    **                                                  
> DeleteStaticLargeObjectResponse response = 
> api.getStaticLargeObjectApi(regionId, container).delete(name); 
> *Analysis*: While the api BlobStore.removeBlob fails to delete a blob in a 
> Swift container, it works fine in AWS S3 and GCS container. I also observed 
> that if I use *ObjectApi.delete(objectName)* instead of 
> *BlobStore.removeBlob* then the blob gets deleted from the swift container 
> without any issue. As per the java doc of StaticLargeObjectApi, it is in beta 
> and still under evaluation. Is this api stable?
> Any help is highly appreciated.
> Thank you.



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


[jira] [Comment Edited] (JCLOUDS-1483) Removing a blob from a Swift container using BlobStore.removeBlob fails.

2019-01-17 Thread Biswa Ranjan Ray (JIRA)


[ 
https://issues.apache.org/jira/browse/JCLOUDS-1483?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16744801#comment-16744801
 ] 

Biswa Ranjan Ray edited comment on JCLOUDS-1483 at 1/17/19 3:30 PM:


Hi Andrew,

Appreciate your time and thanks for the suggestions.

I tried the following:

*Trial 1*:
 a. I forked jclouds repo to mine. Cloned the master branch and tried to build 
openstack-swift module without modifying anything.
 b. Build failed because of testcase failure at line 117 of 
*testReplaceManifestUnicodeUTF8*() method in *StaticLargeObjectApiMockTest* 
class.
 I also tried to build the module in *2.1.x* branch. But build failed for the 
same reason. 
 Please find the surefire-report attached [^StaticLargeObjectApiMockTest.html].

*Trial* 2: 
 a. I skipped the testcases and build openstack-swift module. Build was 
successfull.
 b. As you suggested I modified delete method in StaticLargeObjectApi class by 
replacing 
 *@QueryParams(keys = "multipart-manifest", values = "delete")* with 
*@QueryParams(keys = \{"format", "multipart-manifest"}, values = \{"json", 
"delete"})*
 c. It still throws the same exception as reported earlier : 
 com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected 
BEGIN_OBJECT but was STRING at line 1 column 1 path $

*Trial* 3:
 a. I ignored "multipart-manifest" from the QueryParams of delete() and just 
set the "format" to "json" as shown here : *@QueryParams(keys = "format", 
values = "json")*
 b. This one is bit interesting. The above changes throw a 
NullPointerException, but I found the blob is removed from the container. Not 
sure about the impact of this change. StackTrace is attached with name 
[^NullPointerException.txt].


was (Author: roy.biswa):
Hi Andrew,

Appreciate your time and thanks for the suggestions.

I tried the following:

*Trial 1*:
 a. I forked jclouds repo to mine. Cloned the master branch and tried to build 
openstack-swift module without modifying anything.
 b. Build failed because of testcase failure at line 117 of 
*testReplaceManifestUnicodeUTF8*() method in *StaticLargeObjectApiMockTest* 
class.
 I also tried to build the module in *2.1.x* branch. But build failed for the 
same reason. 
Please find the surefire-report attached.

*Trial* 2: 
 a. I skipped the testcases and build openstack-swift module. Build was 
successfull.
 b. As you suggested I modified delete method in StaticLargeObjectApi class by 
replacing 
 *@QueryParams(keys = "multipart-manifest", values = "delete")* with 
*@QueryParams(keys = \{"format", "multipart-manifest"}, values = \{"json", 
"delete"})*
 c. It still throws the same exception as reported earlier : 
 com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected 
BEGIN_OBJECT but was STRING at line 1 column 1 path $

*Trial* 3:
 a. I ignored "multipart-manifest" from the QueryParams of delete() and just 
set the "format" to "json" as shown here : *@QueryParams(keys = "format", 
values = "json")*
 b. This one is bit interesting. The above changes throw a 
NullPointerException, but I found the blob is removed from the container. Not 
sure about the impact of this change. StackTrace is attached with name 
[^NullPointerException.txt].

> Removing a blob from a Swift container using BlobStore.removeBlob fails.
> 
>
> Key: JCLOUDS-1483
> URL: https://issues.apache.org/jira/browse/JCLOUDS-1483
> Project: jclouds
>  Issue Type: Bug
>  Components: jclouds-blobstore
>Affects Versions: 2.1.1
>Reporter: Biswa Ranjan Ray
>Priority: Major
>  Labels: openstack-swift
> Attachments: NullPointerException.txt, 
> StaticLargeObjectApiMockTest.html, stacktrace.txt
>
>
>  
> *Usecase*: Try to delete a blob (size ~ 107kb) from a swift container using 
> BlobStore.removBlob() api of jclouds.
> *Issue*: Following exception is found in console: 
> com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: 
> *Expected BEGIN_OBJECT but was STRING at line 1 column 1 path $*.
> *Code*: Sharing the code snippet that I've used to delete a blob from a swift 
> container.
> BlobStore blobStore = getBlobStoreContext();              
> blobStore.removeBlob(containerName, fileName);
> {code:java}
> //To get the BlobStoreContext for OpenStack Swift
> private BlobStoreContext getBlobStoreContext() {
>  final Properties override = new Properties();
>  override.put(KeystoneProperties.KEYSTONE_VERSION, "3");
>  override.put(KeystoneProperties.SCOPE, "project:" + 
> swiftConfig.getProject());
>  
>  final String credential = swiftConfig.getPassword();
>  final String identity = swiftConfig.getUserDomain() + ":" + 
> swiftConfig.getUsername();
>  final String authUrl = swiftConfig.getAuthUrl();
>  
>  return 

[jira] [Updated] (JCLOUDS-1483) Removing a blob from a Swift container using BlobStore.removeBlob fails.

2019-01-17 Thread Biswa Ranjan Ray (JIRA)


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

Biswa Ranjan Ray updated JCLOUDS-1483:
--
Attachment: (was: BuildException.txt)

> Removing a blob from a Swift container using BlobStore.removeBlob fails.
> 
>
> Key: JCLOUDS-1483
> URL: https://issues.apache.org/jira/browse/JCLOUDS-1483
> Project: jclouds
>  Issue Type: Bug
>  Components: jclouds-blobstore
>Affects Versions: 2.1.1
>Reporter: Biswa Ranjan Ray
>Priority: Major
>  Labels: openstack-swift
> Attachments: NullPointerException.txt, stacktrace.txt
>
>
>  
> *Usecase*: Try to delete a blob (size ~ 107kb) from a swift container using 
> BlobStore.removBlob() api of jclouds.
> *Issue*: Following exception is found in console: 
> com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: 
> *Expected BEGIN_OBJECT but was STRING at line 1 column 1 path $*.
> *Code*: Sharing the code snippet that I've used to delete a blob from a swift 
> container.
> BlobStore blobStore = getBlobStoreContext();              
> blobStore.removeBlob(containerName, fileName);
> {code:java}
> //To get the BlobStoreContext for OpenStack Swift
> private BlobStoreContext getBlobStoreContext() {
>  final Properties override = new Properties();
>  override.put(KeystoneProperties.KEYSTONE_VERSION, "3");
>  override.put(KeystoneProperties.SCOPE, "project:" + 
> swiftConfig.getProject());
>  
>  final String credential = swiftConfig.getPassword();
>  final String identity = swiftConfig.getUserDomain() + ":" + 
> swiftConfig.getUsername();
>  final String authUrl = swiftConfig.getAuthUrl();
>  
>  return ContextBuilder.newBuilder("openstack-swift")
>  .endpoint(authUrl+"/v3")
>  .credentials(identity,credential)
>  .overrides(override)
>  .buildApi(BlobStoreContext.class);
>  }
> {code}
>  *Debug:* Following are my observations after debugging the code.
>  # The type of the blobstore is found to be RegionScopedSwiftBlobStore.
>  # stepinto blobStore.*removeBlob*(containerName, fileName);                  
>                       at line 396 in *RegionScopedSwiftBlobStore* class, I 
> found it expects a response from *StaticLargeObjectApi* as shown in the below 
> code and this is where the exception occurs:                                  
>                    **                                                  
> DeleteStaticLargeObjectResponse response = 
> api.getStaticLargeObjectApi(regionId, container).delete(name); 
> *Analysis*: While the api BlobStore.removeBlob fails to delete a blob in a 
> Swift container, it works fine in AWS S3 and GCS container. I also observed 
> that if I use *ObjectApi.delete(objectName)* instead of 
> *BlobStore.removeBlob* then the blob gets deleted from the swift container 
> without any issue. As per the java doc of StaticLargeObjectApi, it is in beta 
> and still under evaluation. Is this api stable?
> Any help is highly appreciated.
> Thank you.



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


[jira] [Comment Edited] (JCLOUDS-1483) Removing a blob from a Swift container using BlobStore.removeBlob fails.

2019-01-17 Thread Biswa Ranjan Ray (JIRA)


[ 
https://issues.apache.org/jira/browse/JCLOUDS-1483?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16744801#comment-16744801
 ] 

Biswa Ranjan Ray edited comment on JCLOUDS-1483 at 1/17/19 3:26 PM:


Hi Andrew,

Appreciate your time and thanks for the suggestions.

I tried the following:

*Trial 1*:
 a. I forked jclouds repo to mine. Cloned the master branch and tried to build 
openstack-swift module without modifying anything.
 b. Build failed because of testcase failure at line 117 of 
*testReplaceManifestUnicodeUTF8*() method in *StaticLargeObjectApiMockTest* 
class.
 I also tried to build the module in *2.1.x* branch. But build failed for the 
same reason. 
Please find the surefire-report attached.

*Trial* 2: 
 a. I skipped the testcases and build openstack-swift module. Build was 
successfull.
 b. As you suggested I modified delete method in StaticLargeObjectApi class by 
replacing 
 *@QueryParams(keys = "multipart-manifest", values = "delete")* with 
*@QueryParams(keys = \{"format", "multipart-manifest"}, values = \{"json", 
"delete"})*
 c. It still throws the same exception as reported earlier : 
 com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected 
BEGIN_OBJECT but was STRING at line 1 column 1 path $

*Trial* 3:
 a. I ignored "multipart-manifest" from the QueryParams of delete() and just 
set the "format" to "json" as shown here : *@QueryParams(keys = "format", 
values = "json")*
 b. This one is bit interesting. The above changes throw a 
NullPointerException, but I found the blob is removed from the container. Not 
sure about the impact of this change. StackTrace is attached with name 
[^NullPointerException.txt].


was (Author: roy.biswa):
Hi Andrew,

Appreciate your time and thanks for the suggestions.

I tried the following:

*Trial 1*:
 a. I forked jclouds repo to mine. Cloned the master branch and tried to build 
openstack-swift module without modifying anything.
 b. Build failed because of testcase failure at line 117 of 
*testReplaceManifestUnicodeUTF8*() method in *StaticLargeObjectApiMockTest* 
class.
 I also tried to build the module in *2.1.x* branch. But build failed for the 
same reason. 
 Logs are attached for your reference. Please see the file 
[^BuildException.txt].

*Trial* 2: 
 a. I skipped the testcases and build openstack-swift module. Build was 
successfull.
 b. As you suggested I modified delete method in StaticLargeObjectApi class by 
replacing 
 *@QueryParams(keys = "multipart-manifest", values = "delete")* with 
*@QueryParams(keys = \{"format", "multipart-manifest"}, values = \{"json", 
"delete"})*
 c. It still throws the same exception as reported earlier : 
 com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected 
BEGIN_OBJECT but was STRING at line 1 column 1 path $

*Trial* 3:
 a. I ignored "multipart-manifest" from the QueryParams of delete() and just 
set the "format" to "json" as shown here : *@QueryParams(keys = "format", 
values = "json")*
 b. This one is bit interesting. The above changes throw a 
NullPointerException, but I found the blob is removed from the container. Not 
sure about the impact of this change. StackTrace is attached with name 
[^NullPointerException.txt].

> Removing a blob from a Swift container using BlobStore.removeBlob fails.
> 
>
> Key: JCLOUDS-1483
> URL: https://issues.apache.org/jira/browse/JCLOUDS-1483
> Project: jclouds
>  Issue Type: Bug
>  Components: jclouds-blobstore
>Affects Versions: 2.1.1
>Reporter: Biswa Ranjan Ray
>Priority: Major
>  Labels: openstack-swift
> Attachments: NullPointerException.txt, stacktrace.txt
>
>
>  
> *Usecase*: Try to delete a blob (size ~ 107kb) from a swift container using 
> BlobStore.removBlob() api of jclouds.
> *Issue*: Following exception is found in console: 
> com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: 
> *Expected BEGIN_OBJECT but was STRING at line 1 column 1 path $*.
> *Code*: Sharing the code snippet that I've used to delete a blob from a swift 
> container.
> BlobStore blobStore = getBlobStoreContext();              
> blobStore.removeBlob(containerName, fileName);
> {code:java}
> //To get the BlobStoreContext for OpenStack Swift
> private BlobStoreContext getBlobStoreContext() {
>  final Properties override = new Properties();
>  override.put(KeystoneProperties.KEYSTONE_VERSION, "3");
>  override.put(KeystoneProperties.SCOPE, "project:" + 
> swiftConfig.getProject());
>  
>  final String credential = swiftConfig.getPassword();
>  final String identity = swiftConfig.getUserDomain() + ":" + 
> swiftConfig.getUsername();
>  final String authUrl = swiftConfig.getAuthUrl();
>  
>  return ContextBuilder.newBuilder("openstack-swift")
>  

[jira] [Comment Edited] (JCLOUDS-1483) Removing a blob from a Swift container using BlobStore.removeBlob fails.

2019-01-17 Thread Biswa Ranjan Ray (JIRA)


[ 
https://issues.apache.org/jira/browse/JCLOUDS-1483?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16744801#comment-16744801
 ] 

Biswa Ranjan Ray edited comment on JCLOUDS-1483 at 1/17/19 8:57 AM:


Hi Andrew,

Appreciate your time and thanks for the suggestions.

I tried the following:

*Trial 1*:
 a. I forked jclouds repo to mine. Cloned the master branch and tried to build 
openstack-swift module without modifying anything.
 b. Build failed because of testcase failure at line 117 of 
*testReplaceManifestUnicodeUTF8*() method in *StaticLargeObjectApiMockTest* 
class.
 I also tried to build the module in *2.1.x* branch. But build failed for the 
same reason. 
 Logs are attached for your reference. Please see the file 
[^BuildException.txt].

*Trial* 2: 
 a. I skipped the testcases and build openstack-swift module. Build was 
successfull.
 b. As you suggested I modified delete method in StaticLargeObjectApi class by 
replacing 
 *@QueryParams(keys = "multipart-manifest", values = "delete")* with 
*@QueryParams(keys = \{"format", "multipart-manifest"}, values = \{"json", 
"delete"})*
 c. It still throws the same exception as reported earlier : 
 com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected 
BEGIN_OBJECT but was STRING at line 1 column 1 path $

*Trial* 3:
 a. I ignored "multipart-manifest" from the QueryParams of delete() and just 
set the "format" to "json" as shown here : *@QueryParams(keys = "format", 
values = "json")*
 b. This one is bit interesting. The above changes throw a 
NullPointerException, but I found the blob is removed from the container. Not 
sure about the impact of this change. StackTrace is attached with name 
[^NullPointerException.txt].


was (Author: roy.biswa):
Hi Andrew,

Appreciate your time and thanks for the suggestions.

I tried the following:

*Trial 1*:
a. I forked jclouds repo to mine. Cloned the master branch and tried to build 
openstack-swift module without modifying anything.
b. Build failed because of testcase failure at line 117 of 
*testReplaceManifestUnicodeUTF8*() method in *StaticLargeObjectApiMockTest* 
class.
 I also tried to build the module in *2.1.x* branch. But build failed for the 
same reason. 
 Logs are attached for your reference. Please see the file 
[^BuildException.txt].
 
*Trial* 2: 
a. I skipped the testcases and build openstack-swift module. Build was 
successfull.
b. As you suggested I modified delete method in StaticLargeObjectApi class by 
replacing 
 *@QueryParams(keys = "multipart-manifest", values = "delete")* with 
*@QueryParams(keys = \{"format", "multipart-manifest"}, values = {"json", 
"**delete**"})*
c. It still throws the same exception as reported earlier : 
com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected 
BEGIN_OBJECT but was STRING at line 1 column 1 path $

*Trial* 3:
a. I ignored "multipart-manifest" from the QueryParams of delete() and just set 
the "format" to "json" as shown here : *@QueryParams(keys = "format", values = 
"json")*
b. This one is bit interesting. The above changes throw a NullPointerException, 
but I found the blob is removed from the container. Not sure about the impact 
of this change. StackTrace is attached with name [^NullPointerException.txt].

> Removing a blob from a Swift container using BlobStore.removeBlob fails.
> 
>
> Key: JCLOUDS-1483
> URL: https://issues.apache.org/jira/browse/JCLOUDS-1483
> Project: jclouds
>  Issue Type: Bug
>  Components: jclouds-blobstore
>Affects Versions: 2.1.1
>Reporter: Biswa Ranjan Ray
>Priority: Major
>  Labels: openstack-swift
> Attachments: BuildException.txt, NullPointerException.txt, 
> stacktrace.txt
>
>
>  
> *Usecase*: Try to delete a blob (size ~ 107kb) from a swift container using 
> BlobStore.removBlob() api of jclouds.
> *Issue*: Following exception is found in console: 
> com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: 
> *Expected BEGIN_OBJECT but was STRING at line 1 column 1 path $*.
> *Code*: Sharing the code snippet that I've used to delete a blob from a swift 
> container.
> BlobStore blobStore = getBlobStoreContext();              
> blobStore.removeBlob(containerName, fileName);
> {code:java}
> //To get the BlobStoreContext for OpenStack Swift
> private BlobStoreContext getBlobStoreContext() {
>  final Properties override = new Properties();
>  override.put(KeystoneProperties.KEYSTONE_VERSION, "3");
>  override.put(KeystoneProperties.SCOPE, "project:" + 
> swiftConfig.getProject());
>  
>  final String credential = swiftConfig.getPassword();
>  final String identity = swiftConfig.getUserDomain() + ":" + 
> swiftConfig.getUsername();
>  final String authUrl = swiftConfig.getAuthUrl();
>  
>  

[jira] [Commented] (JCLOUDS-1483) Removing a blob from a Swift container using BlobStore.removeBlob fails.

2019-01-17 Thread Biswa Ranjan Ray (JIRA)


[ 
https://issues.apache.org/jira/browse/JCLOUDS-1483?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16744801#comment-16744801
 ] 

Biswa Ranjan Ray commented on JCLOUDS-1483:
---

Hi Andrew,

Appreciate your time and thanks for the suggestions.

I tried the following:

*Trial 1*:
a. I forked jclouds repo to mine. Cloned the master branch and tried to build 
openstack-swift module without modifying anything.
b. Build failed because of testcase failure at line 117 of 
*testReplaceManifestUnicodeUTF8*() method in *StaticLargeObjectApiMockTest* 
class.
 I also tried to build the module in *2.1.x* branch. But build failed for the 
same reason. 
 Logs are attached for your reference. Please see the file 
[^BuildException.txt].
 
*Trial* 2: 
a. I skipped the testcases and build openstack-swift module. Build was 
successfull.
b. As you suggested I modified delete method in StaticLargeObjectApi class by 
replacing 
 *@QueryParams(keys = "multipart-manifest", values = "delete")* with 
*@QueryParams(keys = \{"format", "multipart-manifest"}, values = {"json", 
"**delete**"})*
c. It still throws the same exception as reported earlier : 
com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected 
BEGIN_OBJECT but was STRING at line 1 column 1 path $

*Trial* 3:
a. I ignored "multipart-manifest" from the QueryParams of delete() and just set 
the "format" to "json" as shown here : *@QueryParams(keys = "format", values = 
"json")*
b. This one is bit interesting. The above changes throw a NullPointerException, 
but I found the blob is removed from the container. Not sure about the impact 
of this change. StackTrace is attached with name [^NullPointerException.txt].

> Removing a blob from a Swift container using BlobStore.removeBlob fails.
> 
>
> Key: JCLOUDS-1483
> URL: https://issues.apache.org/jira/browse/JCLOUDS-1483
> Project: jclouds
>  Issue Type: Bug
>  Components: jclouds-blobstore
>Affects Versions: 2.1.1
>Reporter: Biswa Ranjan Ray
>Priority: Major
>  Labels: openstack-swift
> Attachments: BuildException.txt, NullPointerException.txt, 
> stacktrace.txt
>
>
>  
> *Usecase*: Try to delete a blob (size ~ 107kb) from a swift container using 
> BlobStore.removBlob() api of jclouds.
> *Issue*: Following exception is found in console: 
> com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: 
> *Expected BEGIN_OBJECT but was STRING at line 1 column 1 path $*.
> *Code*: Sharing the code snippet that I've used to delete a blob from a swift 
> container.
> BlobStore blobStore = getBlobStoreContext();              
> blobStore.removeBlob(containerName, fileName);
> {code:java}
> //To get the BlobStoreContext for OpenStack Swift
> private BlobStoreContext getBlobStoreContext() {
>  final Properties override = new Properties();
>  override.put(KeystoneProperties.KEYSTONE_VERSION, "3");
>  override.put(KeystoneProperties.SCOPE, "project:" + 
> swiftConfig.getProject());
>  
>  final String credential = swiftConfig.getPassword();
>  final String identity = swiftConfig.getUserDomain() + ":" + 
> swiftConfig.getUsername();
>  final String authUrl = swiftConfig.getAuthUrl();
>  
>  return ContextBuilder.newBuilder("openstack-swift")
>  .endpoint(authUrl+"/v3")
>  .credentials(identity,credential)
>  .overrides(override)
>  .buildApi(BlobStoreContext.class);
>  }
> {code}
>  *Debug:* Following are my observations after debugging the code.
>  # The type of the blobstore is found to be RegionScopedSwiftBlobStore.
>  # stepinto blobStore.*removeBlob*(containerName, fileName);                  
>                       at line 396 in *RegionScopedSwiftBlobStore* class, I 
> found it expects a response from *StaticLargeObjectApi* as shown in the below 
> code and this is where the exception occurs:                                  
>                    **                                                  
> DeleteStaticLargeObjectResponse response = 
> api.getStaticLargeObjectApi(regionId, container).delete(name); 
> *Analysis*: While the api BlobStore.removeBlob fails to delete a blob in a 
> Swift container, it works fine in AWS S3 and GCS container. I also observed 
> that if I use *ObjectApi.delete(objectName)* instead of 
> *BlobStore.removeBlob* then the blob gets deleted from the swift container 
> without any issue. As per the java doc of StaticLargeObjectApi, it is in beta 
> and still under evaluation. Is this api stable?
> Any help is highly appreciated.
> Thank you.



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


[jira] [Updated] (JCLOUDS-1483) Removing a blob from a Swift container using BlobStore.removeBlob fails.

2019-01-17 Thread Biswa Ranjan Ray (JIRA)


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

Biswa Ranjan Ray updated JCLOUDS-1483:
--
Attachment: BuildException.txt

> Removing a blob from a Swift container using BlobStore.removeBlob fails.
> 
>
> Key: JCLOUDS-1483
> URL: https://issues.apache.org/jira/browse/JCLOUDS-1483
> Project: jclouds
>  Issue Type: Bug
>  Components: jclouds-blobstore
>Affects Versions: 2.1.1
>Reporter: Biswa Ranjan Ray
>Priority: Major
>  Labels: openstack-swift
> Attachments: BuildException.txt, NullPointerException.txt, 
> stacktrace.txt
>
>
>  
> *Usecase*: Try to delete a blob (size ~ 107kb) from a swift container using 
> BlobStore.removBlob() api of jclouds.
> *Issue*: Following exception is found in console: 
> com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: 
> *Expected BEGIN_OBJECT but was STRING at line 1 column 1 path $*.
> *Code*: Sharing the code snippet that I've used to delete a blob from a swift 
> container.
> BlobStore blobStore = getBlobStoreContext();              
> blobStore.removeBlob(containerName, fileName);
> {code:java}
> //To get the BlobStoreContext for OpenStack Swift
> private BlobStoreContext getBlobStoreContext() {
>  final Properties override = new Properties();
>  override.put(KeystoneProperties.KEYSTONE_VERSION, "3");
>  override.put(KeystoneProperties.SCOPE, "project:" + 
> swiftConfig.getProject());
>  
>  final String credential = swiftConfig.getPassword();
>  final String identity = swiftConfig.getUserDomain() + ":" + 
> swiftConfig.getUsername();
>  final String authUrl = swiftConfig.getAuthUrl();
>  
>  return ContextBuilder.newBuilder("openstack-swift")
>  .endpoint(authUrl+"/v3")
>  .credentials(identity,credential)
>  .overrides(override)
>  .buildApi(BlobStoreContext.class);
>  }
> {code}
>  *Debug:* Following are my observations after debugging the code.
>  # The type of the blobstore is found to be RegionScopedSwiftBlobStore.
>  # stepinto blobStore.*removeBlob*(containerName, fileName);                  
>                       at line 396 in *RegionScopedSwiftBlobStore* class, I 
> found it expects a response from *StaticLargeObjectApi* as shown in the below 
> code and this is where the exception occurs:                                  
>                    **                                                  
> DeleteStaticLargeObjectResponse response = 
> api.getStaticLargeObjectApi(regionId, container).delete(name); 
> *Analysis*: While the api BlobStore.removeBlob fails to delete a blob in a 
> Swift container, it works fine in AWS S3 and GCS container. I also observed 
> that if I use *ObjectApi.delete(objectName)* instead of 
> *BlobStore.removeBlob* then the blob gets deleted from the swift container 
> without any issue. As per the java doc of StaticLargeObjectApi, it is in beta 
> and still under evaluation. Is this api stable?
> Any help is highly appreciated.
> Thank you.



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


[jira] [Updated] (JCLOUDS-1483) Removing a blob from a Swift container using BlobStore.removeBlob fails.

2019-01-17 Thread Biswa Ranjan Ray (JIRA)


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

Biswa Ranjan Ray updated JCLOUDS-1483:
--
Attachment: NullPointerException.txt

> Removing a blob from a Swift container using BlobStore.removeBlob fails.
> 
>
> Key: JCLOUDS-1483
> URL: https://issues.apache.org/jira/browse/JCLOUDS-1483
> Project: jclouds
>  Issue Type: Bug
>  Components: jclouds-blobstore
>Affects Versions: 2.1.1
>Reporter: Biswa Ranjan Ray
>Priority: Major
>  Labels: openstack-swift
> Attachments: NullPointerException.txt, stacktrace.txt
>
>
>  
> *Usecase*: Try to delete a blob (size ~ 107kb) from a swift container using 
> BlobStore.removBlob() api of jclouds.
> *Issue*: Following exception is found in console: 
> com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: 
> *Expected BEGIN_OBJECT but was STRING at line 1 column 1 path $*.
> *Code*: Sharing the code snippet that I've used to delete a blob from a swift 
> container.
> BlobStore blobStore = getBlobStoreContext();              
> blobStore.removeBlob(containerName, fileName);
> {code:java}
> //To get the BlobStoreContext for OpenStack Swift
> private BlobStoreContext getBlobStoreContext() {
>  final Properties override = new Properties();
>  override.put(KeystoneProperties.KEYSTONE_VERSION, "3");
>  override.put(KeystoneProperties.SCOPE, "project:" + 
> swiftConfig.getProject());
>  
>  final String credential = swiftConfig.getPassword();
>  final String identity = swiftConfig.getUserDomain() + ":" + 
> swiftConfig.getUsername();
>  final String authUrl = swiftConfig.getAuthUrl();
>  
>  return ContextBuilder.newBuilder("openstack-swift")
>  .endpoint(authUrl+"/v3")
>  .credentials(identity,credential)
>  .overrides(override)
>  .buildApi(BlobStoreContext.class);
>  }
> {code}
>  *Debug:* Following are my observations after debugging the code.
>  # The type of the blobstore is found to be RegionScopedSwiftBlobStore.
>  # stepinto blobStore.*removeBlob*(containerName, fileName);                  
>                       at line 396 in *RegionScopedSwiftBlobStore* class, I 
> found it expects a response from *StaticLargeObjectApi* as shown in the below 
> code and this is where the exception occurs:                                  
>                    **                                                  
> DeleteStaticLargeObjectResponse response = 
> api.getStaticLargeObjectApi(regionId, container).delete(name); 
> *Analysis*: While the api BlobStore.removeBlob fails to delete a blob in a 
> Swift container, it works fine in AWS S3 and GCS container. I also observed 
> that if I use *ObjectApi.delete(objectName)* instead of 
> *BlobStore.removeBlob* then the blob gets deleted from the swift container 
> without any issue. As per the java doc of StaticLargeObjectApi, it is in beta 
> and still under evaluation. Is this api stable?
> Any help is highly appreciated.
> Thank you.



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


[jira] [Updated] (JCLOUDS-1483) Removing a blob from a Swift container using BlobStore.removeBlob fails.

2019-01-09 Thread Biswa Ranjan Ray (JIRA)


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

Biswa Ranjan Ray updated JCLOUDS-1483:
--
Description: 
 

*Usecase*: Try to delete a blob (size ~ 107kb) from a swift container using 
BlobStore.removBlob() api of jclouds.

*Issue*: Following exception is found in console: 
com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: *Expected 
BEGIN_OBJECT but was STRING at line 1 column 1 path $*.

*Code*: Sharing the code snippet that I've used to delete a blob from a swift 
container.

BlobStore blobStore = getBlobStoreContext();              
blobStore.removeBlob(containerName, fileName);
{code:java}
//To get the BlobStoreContext for OpenStack Swift

private BlobStoreContext getBlobStoreContext() {
 final Properties override = new Properties();
 override.put(KeystoneProperties.KEYSTONE_VERSION, "3");
 override.put(KeystoneProperties.SCOPE, "project:" + swiftConfig.getProject());
 
 final String credential = swiftConfig.getPassword();
 final String identity = swiftConfig.getUserDomain() + ":" + 
swiftConfig.getUsername();
 final String authUrl = swiftConfig.getAuthUrl();
 
 return ContextBuilder.newBuilder("openstack-swift")
 .endpoint(authUrl+"/v3")
 .credentials(identity,credential)
 .overrides(override)
 .buildApi(BlobStoreContext.class);
 }
{code}
 *Debug:* Following are my observations after debugging the code.
 # The type of the blobstore is found to be RegionScopedSwiftBlobStore.
 # stepinto blobStore.*removeBlob*(containerName, fileName);                    
                    at line 396 in *RegionScopedSwiftBlobStore* class, I found 
it expects a response from *StaticLargeObjectApi* as shown in the below code 
and this is where the exception occurs:                                         
            **                                                  
DeleteStaticLargeObjectResponse response = 
api.getStaticLargeObjectApi(regionId, container).delete(name); 

*Analysis*: While the api BlobStore.removeBlob fails to delete a blob in a 
Swift container, it works fine in AWS S3 and GCS container. I also observed 
that if I use *ObjectApi.delete(objectName)* instead of *BlobStore.removeBlob* 
then the blob gets deleted from the swift container without any issue. As per 
the java doc of StaticLargeObjectApi, it is in beta and still under evaluation. 
Is this api stable?

Any help is highly appreciated.

Thank you.

  was:
Hi Team,

I set the issue type to Improvement as I'm not sure if its a bug in jclouds 
library. :)

*Usecase*: Try to delete a blob (size ~ 107kb) from a swift container using 
BlobStore.removBlob() api of jclouds.

*Issue*: Following exception is found in console: 
com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: *Expected 
BEGIN_OBJECT but was STRING at line 1 column 1 path $*.

*Code*: Sharing the code snippet that I've used to delete a blob from a swift 
container.

BlobStore blobStore = getBlobStoreContext();              
blobStore.removeBlob(containerName, fileName);
{code:java}
//To get the BlobStoreContext for OpenStack Swift

private BlobStoreContext getBlobStoreContext() {
 final Properties override = new Properties();
 override.put(KeystoneProperties.KEYSTONE_VERSION, "3");
 override.put(KeystoneProperties.SCOPE, "project:" + swiftConfig.getProject());
 
 final String credential = swiftConfig.getPassword();
 final String identity = swiftConfig.getUserDomain() + ":" + 
swiftConfig.getUsername();
 final String authUrl = swiftConfig.getAuthUrl();
 
 return ContextBuilder.newBuilder("openstack-swift")
 .endpoint(authUrl+"/v3")
 .credentials(identity,credential)
 .overrides(override)
 .buildApi(BlobStoreContext.class);
 }
{code}
 *Debug:* Following are my observations after debugging the code.
 # The type of the blobstore is found to be RegionScopedSwiftBlobStore.
 # stepinto blobStore.*removeBlob*(containerName, fileName);                    
                    at line 396 in *RegionScopedSwiftBlobStore* class, I found 
it expects a response from *StaticLargeObjectApi* as shown in the below code 
and this is where the exception occurs:                                         
            **                                                  
DeleteStaticLargeObjectResponse response = 
api.getStaticLargeObjectApi(regionId, container).delete(name); 

*Analysis*: While the api BlobStore.removeBlob fails to delete a blob in a 
Swift container, it works fine in AWS S3 and GCS container. I also observed 
that if I use *ObjectApi.delete(objectName)* instead of *BlobStore.removeBlob* 
then the blob gets deleted from the swift container without any issue. As per 
the java doc of StaticLargeObjectApi, it is in beta and still under evaluation. 
Is this api stable?

Any help is highly appreciated.

Thank you.


> Removing a blob from a Swift container using BlobStore.removeBlob fails.
> 

[jira] [Updated] (JCLOUDS-1483) Removing a blob from a Swift container using BlobStore.removeBlob fails.

2019-01-09 Thread Biswa Ranjan Ray (JIRA)


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

Biswa Ranjan Ray updated JCLOUDS-1483:
--
Issue Type: Bug  (was: Improvement)

> Removing a blob from a Swift container using BlobStore.removeBlob fails.
> 
>
> Key: JCLOUDS-1483
> URL: https://issues.apache.org/jira/browse/JCLOUDS-1483
> Project: jclouds
>  Issue Type: Bug
>  Components: jclouds-blobstore
>Affects Versions: 2.1.1
>Reporter: Biswa Ranjan Ray
>Priority: Major
>  Labels: openstack-swift
> Attachments: stacktrace.txt
>
>
> Hi Team,
> I set the issue type to Improvement as I'm not sure if its a bug in jclouds 
> library. :)
> *Usecase*: Try to delete a blob (size ~ 107kb) from a swift container using 
> BlobStore.removBlob() api of jclouds.
> *Issue*: Following exception is found in console: 
> com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: 
> *Expected BEGIN_OBJECT but was STRING at line 1 column 1 path $*.
> *Code*: Sharing the code snippet that I've used to delete a blob from a swift 
> container.
> BlobStore blobStore = getBlobStoreContext();              
> blobStore.removeBlob(containerName, fileName);
> {code:java}
> //To get the BlobStoreContext for OpenStack Swift
> private BlobStoreContext getBlobStoreContext() {
>  final Properties override = new Properties();
>  override.put(KeystoneProperties.KEYSTONE_VERSION, "3");
>  override.put(KeystoneProperties.SCOPE, "project:" + 
> swiftConfig.getProject());
>  
>  final String credential = swiftConfig.getPassword();
>  final String identity = swiftConfig.getUserDomain() + ":" + 
> swiftConfig.getUsername();
>  final String authUrl = swiftConfig.getAuthUrl();
>  
>  return ContextBuilder.newBuilder("openstack-swift")
>  .endpoint(authUrl+"/v3")
>  .credentials(identity,credential)
>  .overrides(override)
>  .buildApi(BlobStoreContext.class);
>  }
> {code}
>  *Debug:* Following are my observations after debugging the code.
>  # The type of the blobstore is found to be RegionScopedSwiftBlobStore.
>  # stepinto blobStore.*removeBlob*(containerName, fileName);                  
>                       at line 396 in *RegionScopedSwiftBlobStore* class, I 
> found it expects a response from *StaticLargeObjectApi* as shown in the below 
> code and this is where the exception occurs:                                  
>                    **                                                  
> DeleteStaticLargeObjectResponse response = 
> api.getStaticLargeObjectApi(regionId, container).delete(name); 
> *Analysis*: While the api BlobStore.removeBlob fails to delete a blob in a 
> Swift container, it works fine in AWS S3 and GCS container. I also observed 
> that if I use *ObjectApi.delete(objectName)* instead of 
> *BlobStore.removeBlob* then the blob gets deleted from the swift container 
> without any issue. As per the java doc of StaticLargeObjectApi, it is in beta 
> and still under evaluation. Is this api stable?
> Any help is highly appreciated.
> Thank you.



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


[jira] [Updated] (JCLOUDS-1483) Removing a blob from a Swift container using BlobStore.removeBlob fails.

2019-01-07 Thread Biswa Ranjan Ray (JIRA)


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

Biswa Ranjan Ray updated JCLOUDS-1483:
--
Description: 
Hi Team,

I set the issue type to Improvement as I'm not sure if its a bug in jclouds 
library. :)

*Usecase*: Try to delete a blob (size ~ 107kb) from a swift container using 
BlobStore.removBlob() api of jclouds.

*Issue*: Following exception is found in console: 
com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: *Expected 
BEGIN_OBJECT but was STRING at line 1 column 1 path $*.

*Code*: Sharing the code snippet that I've used to delete a blob from a swift 
container.

BlobStore blobStore = getBlobStoreContext();              
blobStore.removeBlob(containerName, fileName);
{code:java}
//To get the BlobStoreContext for OpenStack Swift

private BlobStoreContext getBlobStoreContext() {
 final Properties override = new Properties();
 override.put(KeystoneProperties.KEYSTONE_VERSION, "3");
 override.put(KeystoneProperties.SCOPE, "project:" + swiftConfig.getProject());
 
 final String credential = swiftConfig.getPassword();
 final String identity = swiftConfig.getUserDomain() + ":" + 
swiftConfig.getUsername();
 final String authUrl = swiftConfig.getAuthUrl();
 
 return ContextBuilder.newBuilder("openstack-swift")
 .endpoint(authUrl+"/v3")
 .credentials(identity,credential)
 .overrides(override)
 .buildApi(BlobStoreContext.class);
 }
{code}
 *Debug:* Following are my observations after debugging the code.
 # The type of the blobstore is found to be RegionScopedSwiftBlobStore.
 # stepinto blobStore.*removeBlob*(containerName, fileName);                    
                    at line 396 in *RegionScopedSwiftBlobStore* class, I found 
it expects a response from *StaticLargeObjectApi* as shown in the below code 
and this is where the exception occurs:                                         
            **                                                  
DeleteStaticLargeObjectResponse response = 
api.getStaticLargeObjectApi(regionId, container).delete(name); 

*Analysis*: While the api BlobStore.removeBlob fails to delete a blob in a 
Swift container, it works fine in AWS S3 and GCS container. I also observed 
that if I use *ObjectApi.delete(objectName)* instead of *BlobStore.removeBlob* 
then the blob gets deleted from the swift container without any issue. As per 
the java doc of StaticLargeObjectApi, it is in beta and still under evaluation. 
Is this api stable?

Any help is highly appreciated.

Thank you.

  was:
Hi Team,

I set the issue type to Improvement as I'm not sure if its a bug in jclouds 
library. :)

*Usecase*: Try to delete a blob (size ~ 107kb) from a swift container using 
BlobStore.removBlob() api of jclouds.

*Issue*: Following exception is  obtained: com.google.gson.JsonSyntaxException: 
java.lang.IllegalStateException: *Expected BEGIN_OBJECT but was STRING at line 
1 column 1 path $*.

*Code*: The below code snippet shows how a blob is deleted from a swift 
container.

BlobStore blobStore = getBlobStoreContext();              
blobStore.removeBlob(containerName, fileName);

{code:java}
//To get the BlobStoreContext for OpenStack Swift

private BlobStoreContext getBlobStoreContext() {
 final Properties override = new Properties();
 override.put(KeystoneProperties.KEYSTONE_VERSION, "3");
 override.put(KeystoneProperties.SCOPE, "project:" + swiftConfig.getProject());
 
 final String credential = swiftConfig.getPassword();
 final String identity = swiftConfig.getUserDomain() + ":" + 
swiftConfig.getUsername();
 final String authUrl = swiftConfig.getAuthUrl();
 
 return ContextBuilder.newBuilder("openstack-swift")
 .endpoint(authUrl+"/v3")
 .credentials(identity,credential)
 .overrides(override)
 .buildApi(BlobStoreContext.class);
 }
{code}

 *Debug:* Following are my observations after debugging the code.
 # got the BlobStore. The blobstore type is found to be 
RegionScopedSwiftBlobStore.
 # stepinto blobStore.removeBlob(containerName, fileName);                      
                    at line 396 in *RegionScopedSwiftBlobStore* class, it 
expects a response from *StaticLargeObjectApi* and this is where it throws the 
exception. DeleteStaticLargeObjectResponse response = 
api.getStaticLargeObjectApi(regionId, container).delete(name);

*Analysis*: While the api BlobStore.removeBlob fails in a Swift container, it 
works fine in AWS S3 and GCS container. I also observed that if I use 
*ObjectApi.delete(objectName)* instead of BlobStore.removeBlob then the blob 
gets deleted from the swift container. I believe its the StaticLargeObjectApi 
that's causing issue. As per the java doc of StaticLargeObjectApi, it is in 
beta and still under evaluation. 

Any help is highly appreciated.

Thank you.


> Removing a blob from a Swift container using BlobStore.removeBlob fails.
> 
>
>   

[jira] [Updated] (JCLOUDS-1483) Removing a blob from a Swift container using BlobStore.removeBlob fails.

2019-01-07 Thread Biswa Ranjan Ray (JIRA)


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

Biswa Ranjan Ray updated JCLOUDS-1483:
--
Description: 
Hi Team,

I set the issue type to Improvement as I'm not sure if its a bug in jclouds 
library. :)

*Usecase*: Try to delete a blob (size ~ 107kb) from a swift container using 
BlobStore.removBlob() api of jclouds.

*Issue*: Following exception is  obtained: com.google.gson.JsonSyntaxException: 
java.lang.IllegalStateException: *Expected BEGIN_OBJECT but was STRING at line 
1 column 1 path $*.

*Code*: The below code snippet shows how a blob is deleted from a swift 
container.

BlobStore blobStore = getBlobStoreContext();              
blobStore.removeBlob(containerName, fileName);

private BlobStoreContext getBlobStoreContext() {
 final Properties override = new Properties();
 override.put(KeystoneProperties.KEYSTONE_VERSION, "3");
 override.put(KeystoneProperties.SCOPE, "project:" + swiftConfig.getProject());
 
 final String credential = swiftConfig.getPassword();
 final String identity = swiftConfig.getUserDomain() + ":" + 
swiftConfig.getUsername();
 final String authUrl = swiftConfig.getAuthUrl();
 
 return ContextBuilder.newBuilder("openstack-swift")
 .endpoint(authUrl+"/v3")
 .credentials(identity,credential)
 .overrides(override)
 .buildApi(BlobStoreContext.class);
 }

 

*Debug:* Following are my observations after debugging the code.
 # got the BlobStore. The blobstore type is found to be 
RegionScopedSwiftBlobStore.
 # stepinto blobStore.removeBlob(containerName, fileName);                      
                    at line 396 in *RegionScopedSwiftBlobStore* class, it 
expects a response from *StaticLargeObjectApi* and this is where it throws the 
exception. DeleteStaticLargeObjectResponse response = 
api.getStaticLargeObjectApi(regionId, container).delete(name);

*Analysis*: While the api BlobStore.removeBlob fails in a Swift container, it 
works fine in AWS S3 and GCS container. I also observed that if I use 
*ObjectApi.delete(objectName)* instead of BlobStore.removeBlob then the blob 
gets deleted from the swift container. I believe its the StaticLargeObjectApi 
that's causing issue. As per the java doc of StaticLargeObjectApi, it is in 
beta and still under evaluation. 

Any help is highly appreciated.

Thank you.

 

 

  was:
Hi Team,

I set the issue type to Improvement as I'm not sure if its a bug in jclouds 
library. :)

*Usecase*: Try to delete a blob (size ~ 107kb) from a swift container using 
BlobStore.removBlob() api of jclouds.

*Issue*: Following exception is  obtained: com.google.gson.JsonSyntaxException: 
java.lang.IllegalStateException: *Expected BEGIN_OBJECT but was STRING at line 
1 column 1 path $*.

*Code*: The below code snippet shows how a blob is deleted from a swift 
container.

BlobStore blobStore = getBlobStoreContext();              
blobStore.removeBlob(containerName, fileName);

**
//To get the BlobStoreContext for OpenStack Swiftprivate BlobStoreContext 
getBlobStoreContext() { final Properties override = new Properties();
 override.put(KeystoneProperties.KEYSTONE_VERSION, "3");
 override.put(KeystoneProperties.SCOPE, "project:" + swiftConfig.getProject()); 
 final String credential = swiftConfig.getPassword(); final String identity = 
swiftConfig.getUserDomain() + ":" + swiftConfig.getUsername(); final String 
authUrl = swiftConfig.getAuthUrl();  return 
ContextBuilder.newBuilder("openstack-swift")
 .endpoint(authUrl+"/v3")
 .credentials(identity,credential)
 .overrides(override)
 .buildApi(BlobStoreContext.class);
 }
*Debug:* Following are my observations after debugging the code.
 # got the BlobStore. The blobstore type is found to be 
RegionScopedSwiftBlobStore.
 # stepinto blobStore.removeBlob(containerName, fileName);                      
                    at line 396 in *RegionScopedSwiftBlobStore* class, it 
expects a response from *StaticLargeObjectApi* and this is where it throws the 
exception. DeleteStaticLargeObjectResponse response = 
api.getStaticLargeObjectApi(regionId, container).delete(name);

*Analysis*: While the api BlobStore.removeBlob fails in a Swift container, it 
works fine in AWS S3 and GCS container. I also observed that if I use 
*ObjectApi.delete(objectName)* instead of BlobStore.removeBlob then the blob 
gets deleted from the swift container. I believe its the StaticLargeObjectApi 
that's causing issue. As per the java doc of StaticLargeObjectApi, it is in 
beta and still under evaluation. 

Any help is highly appreciated.

Thank you.

 

 


> Removing a blob from a Swift container using BlobStore.removeBlob fails.
> 
>
> Key: JCLOUDS-1483
> URL: https://issues.apache.org/jira/browse/JCLOUDS-1483
> Project: jclouds
>  Issue Type: Improvement
>  Components: jclouds-blobstore
> 

[jira] [Updated] (JCLOUDS-1483) Removing a blob from a Swift container using BlobStore.removeBlob fails.

2019-01-07 Thread Biswa Ranjan Ray (JIRA)


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

Biswa Ranjan Ray updated JCLOUDS-1483:
--
Description: 
Hi Team,

I set the issue type to Improvement as I'm not sure if its a bug in jclouds 
library. :)

*Usecase*: Try to delete a blob (size ~ 107kb) from a swift container using 
BlobStore.removBlob() api of jclouds.

*Issue*: Following exception is  obtained: com.google.gson.JsonSyntaxException: 
java.lang.IllegalStateException: *Expected BEGIN_OBJECT but was STRING at line 
1 column 1 path $*.

*Code*: The below code snippet shows how a blob is deleted from a swift 
container.

BlobStore blobStore = getBlobStoreContext();              
blobStore.removeBlob(containerName, fileName);

{code:java}
//To get the BlobStoreContext for OpenStack Swift

private BlobStoreContext getBlobStoreContext() {
 final Properties override = new Properties();
 override.put(KeystoneProperties.KEYSTONE_VERSION, "3");
 override.put(KeystoneProperties.SCOPE, "project:" + swiftConfig.getProject());
 
 final String credential = swiftConfig.getPassword();
 final String identity = swiftConfig.getUserDomain() + ":" + 
swiftConfig.getUsername();
 final String authUrl = swiftConfig.getAuthUrl();
 
 return ContextBuilder.newBuilder("openstack-swift")
 .endpoint(authUrl+"/v3")
 .credentials(identity,credential)
 .overrides(override)
 .buildApi(BlobStoreContext.class);
 }
{code}

 *Debug:* Following are my observations after debugging the code.
 # got the BlobStore. The blobstore type is found to be 
RegionScopedSwiftBlobStore.
 # stepinto blobStore.removeBlob(containerName, fileName);                      
                    at line 396 in *RegionScopedSwiftBlobStore* class, it 
expects a response from *StaticLargeObjectApi* and this is where it throws the 
exception. DeleteStaticLargeObjectResponse response = 
api.getStaticLargeObjectApi(regionId, container).delete(name);

*Analysis*: While the api BlobStore.removeBlob fails in a Swift container, it 
works fine in AWS S3 and GCS container. I also observed that if I use 
*ObjectApi.delete(objectName)* instead of BlobStore.removeBlob then the blob 
gets deleted from the swift container. I believe its the StaticLargeObjectApi 
that's causing issue. As per the java doc of StaticLargeObjectApi, it is in 
beta and still under evaluation. 

Any help is highly appreciated.

Thank you.

  was:
Hi Team,

I set the issue type to Improvement as I'm not sure if its a bug in jclouds 
library. :)

*Usecase*: Try to delete a blob (size ~ 107kb) from a swift container using 
BlobStore.removBlob() api of jclouds.

*Issue*: Following exception is  obtained: com.google.gson.JsonSyntaxException: 
java.lang.IllegalStateException: *Expected BEGIN_OBJECT but was STRING at line 
1 column 1 path $*.

*Code*: The below code snippet shows how a blob is deleted from a swift 
container.

BlobStore blobStore = getBlobStoreContext();              
blobStore.removeBlob(containerName, fileName);

private BlobStoreContext getBlobStoreContext()

{

final Properties override = new Properties(); 
override.put(KeystoneProperties.KEYSTONE_VERSION, "3"); 
override.put(KeystoneProperties.SCOPE, "project:" + swiftConfig.getProject());

final String credential = swiftConfig.getPassword();

final String identity = swiftConfig.getUserDomain() + ":" + 
swiftConfig.getUsername();

final String authUrl = swiftConfig.getAuthUrl();

return ContextBuilder.newBuilder(CloudProviders.PROVIDER_SWIFT.toString()) 
.endpoint(authUrl+"/v3")

.credentials(identity,credential)

.overrides(override)

.buildApi(BlobStoreContext.class);

}

 *Debug:* Following are my observations after debugging the code.
 # got the BlobStore. The blobstore type is found to be 
RegionScopedSwiftBlobStore.
 # stepinto blobStore.removeBlob(containerName, fileName);                      
                    at line 396 in *RegionScopedSwiftBlobStore* class, it 
expects a response from *StaticLargeObjectApi* and this is where it throws the 
exception. DeleteStaticLargeObjectResponse response = 
api.getStaticLargeObjectApi(regionId, container).delete(name);

*Analysis*: While the api BlobStore.removeBlob fails in a Swift container, it 
works fine in AWS S3 and GCS container. I also observed that if I use 
*ObjectApi.delete(objectName)* instead of BlobStore.removeBlob then the blob 
gets deleted from the swift container. I believe its the StaticLargeObjectApi 
that's causing issue. As per the java doc of StaticLargeObjectApi, it is in 
beta and still under evaluation. 

Any help is highly appreciated.

Thank you.

 

 


> Removing a blob from a Swift container using BlobStore.removeBlob fails.
> 
>
> Key: JCLOUDS-1483
> URL: https://issues.apache.org/jira/browse/JCLOUDS-1483
> Project: jclouds
>  Issue Type: Improvement
>   

[jira] [Updated] (JCLOUDS-1483) Removing a blob from a Swift container using BlobStore.removeBlob fails.

2019-01-07 Thread Biswa Ranjan Ray (JIRA)


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

Biswa Ranjan Ray updated JCLOUDS-1483:
--
Description: 
Hi Team,

I set the issue type to Improvement as I'm not sure if its a bug in jclouds 
library. :)

*Usecase*: Try to delete a blob (size ~ 107kb) from a swift container using 
BlobStore.removBlob() api of jclouds.

*Issue*: Following exception is  obtained: com.google.gson.JsonSyntaxException: 
java.lang.IllegalStateException: *Expected BEGIN_OBJECT but was STRING at line 
1 column 1 path $*.

*Code*: The below code snippet shows how a blob is deleted from a swift 
container.

BlobStore blobStore = getBlobStoreContext();              
blobStore.removeBlob(containerName, fileName);

private BlobStoreContext getBlobStoreContext()

{

final Properties override = new Properties(); 
override.put(KeystoneProperties.KEYSTONE_VERSION, "3"); 
override.put(KeystoneProperties.SCOPE, "project:" + swiftConfig.getProject());

final String credential = swiftConfig.getPassword();

final String identity = swiftConfig.getUserDomain() + ":" + 
swiftConfig.getUsername();

final String authUrl = swiftConfig.getAuthUrl();

return ContextBuilder.newBuilder(CloudProviders.PROVIDER_SWIFT.toString()) 
.endpoint(authUrl+"/v3")

.credentials(identity,credential)

.overrides(override)

.buildApi(BlobStoreContext.class);

}

 *Debug:* Following are my observations after debugging the code.
 # got the BlobStore. The blobstore type is found to be 
RegionScopedSwiftBlobStore.
 # stepinto blobStore.removeBlob(containerName, fileName);                      
                    at line 396 in *RegionScopedSwiftBlobStore* class, it 
expects a response from *StaticLargeObjectApi* and this is where it throws the 
exception. DeleteStaticLargeObjectResponse response = 
api.getStaticLargeObjectApi(regionId, container).delete(name);

*Analysis*: While the api BlobStore.removeBlob fails in a Swift container, it 
works fine in AWS S3 and GCS container. I also observed that if I use 
*ObjectApi.delete(objectName)* instead of BlobStore.removeBlob then the blob 
gets deleted from the swift container. I believe its the StaticLargeObjectApi 
that's causing issue. As per the java doc of StaticLargeObjectApi, it is in 
beta and still under evaluation. 

Any help is highly appreciated.

Thank you.

 

 

  was:
Hi Team,

I set the issue type to Improvement as I'm not sure if its a bug in jclouds 
library. :)

*Usecase*: Try to delete a blob (size ~ 107kb) from a swift container using 
BlobStore.removBlob() api of jclouds.

*Issue*: Following exception is  obtained: com.google.gson.JsonSyntaxException: 
java.lang.IllegalStateException: *Expected BEGIN_OBJECT but was STRING at line 
1 column 1 path $*.

*Code*: The below code snippet shows how a blob is deleted from a swift 
container.

BlobStore blobStore = getBlobStoreContext();              
blobStore.removeBlob(containerName, fileName);

private BlobStoreContext getBlobStoreContext() {
final Properties override = new Properties();
override.put(KeystoneProperties.KEYSTONE_VERSION, "3");
override.put(KeystoneProperties.SCOPE, "project:" + 
swiftConfig.getProject());
  
final String credential = swiftConfig.getPassword();
final String identity = swiftConfig.getUserDomain() + ":" + 
swiftConfig.getUsername();
final String authUrl = swiftConfig.getAuthUrl();

return 
ContextBuilder.newBuilder(CloudProviders.PROVIDER_SWIFT.toString())
.endpoint(authUrl+"/v3")
.credentials(identity,credential)
.overrides(override)
.buildApi(BlobStoreContext.class);
}

 *Debug:* Following are my observations after debugging the code.
 # got the BlobStore. The blobstore type is found to be 
RegionScopedSwiftBlobStore.
 # stepinto blobStore.removeBlob(containerName, fileName);                      
                    at line 396 in *RegionScopedSwiftBlobStore* class, it 
expects a response from *StaticLargeObjectApi* and this is where it throws the 
exception. DeleteStaticLargeObjectResponse response = 
api.getStaticLargeObjectApi(regionId, container).delete(name);

*Analysis*: While the api BlobStore.removeBlob fails in a Swift container, it 
works fine in AWS S3 and GCS container. I also observed that if I use 
*ObjectApi.delete(objectName)* instead of BlobStore.removeBlob then the blob 
gets deleted from the swift container. I believe its the StaticLargeObjectApi 
that's causing issue. As per the java doc of StaticLargeObjectApi, it is in 
beta and still under evaluation. 

Any help is highly appreciated.

Thank you.

 

 


> Removing a blob from a Swift container using BlobStore.removeBlob fails.
> 

[jira] [Updated] (JCLOUDS-1483) Removing a blob from a Swift container using BlobStore.removeBlob fails.

2019-01-07 Thread Biswa Ranjan Ray (JIRA)


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

Biswa Ranjan Ray updated JCLOUDS-1483:
--
Description: 
Hi Team,

I set the issue type to Improvement as I'm not sure if its a bug in jclouds 
library. :)

*Usecase*: Try to delete a blob (size ~ 107kb) from a swift container using 
BlobStore.removBlob() api of jclouds.

*Issue*: Following exception is  obtained: com.google.gson.JsonSyntaxException: 
java.lang.IllegalStateException: *Expected BEGIN_OBJECT but was STRING at line 
1 column 1 path $*.

*Code*: The below code snippet shows how a blob is deleted from a swift 
container.

BlobStore blobStore = getBlobStoreContext();              
blobStore.removeBlob(containerName, fileName);

private BlobStoreContext getBlobStoreContext() {
final Properties override = new Properties();
override.put(KeystoneProperties.KEYSTONE_VERSION, "3");
override.put(KeystoneProperties.SCOPE, "project:" + 
swiftConfig.getProject());
  
final String credential = swiftConfig.getPassword();
final String identity = swiftConfig.getUserDomain() + ":" + 
swiftConfig.getUsername();
final String authUrl = swiftConfig.getAuthUrl();

return 
ContextBuilder.newBuilder(CloudProviders.PROVIDER_SWIFT.toString())
.endpoint(authUrl+"/v3")
.credentials(identity,credential)
.overrides(override)
.buildApi(BlobStoreContext.class);
}

 *Debug:* Following are my observations after debugging the code.
 # got the BlobStore. The blobstore type is found to be 
RegionScopedSwiftBlobStore.
 # stepinto blobStore.removeBlob(containerName, fileName);                      
                    at line 396 in *RegionScopedSwiftBlobStore* class, it 
expects a response from *StaticLargeObjectApi* and this is where it throws the 
exception. DeleteStaticLargeObjectResponse response = 
api.getStaticLargeObjectApi(regionId, container).delete(name);

*Analysis*: While the api BlobStore.removeBlob fails in a Swift container, it 
works fine in AWS S3 and GCS container. I also observed that if I use 
*ObjectApi.delete(objectName)* instead of BlobStore.removeBlob then the blob 
gets deleted from the swift container. I believe its the StaticLargeObjectApi 
that's causing issue. As per the java doc of StaticLargeObjectApi, it is in 
beta and still under evaluation. 

Any help is highly appreciated.

Thank you.

 

 

  was:
Hi Team,

I set the issue type to Improvement as I'm not sure if its a bug in jclouds 
library. :)

*Usecase*: Try to delete a blob (size ~ 107kb) from a swift container using 
BlobStore.removBlob() api of jclouds.

*Issue*: Following exception is  obtained: com.google.gson.JsonSyntaxException: 
java.lang.IllegalStateException: *Expected BEGIN_OBJECT but was STRING at line 
1 column 1 path $*.

*Code*: The below code snippet shows how a blob is deleted from a swift 
container.

BlobStore blobStore = getBlobStoreContext();              
blobStore.removeBlob(containerName, fileName);

private BlobStoreContext getBlobStoreContext() {
 final Properties override = new Properties();
 override.put(KeystoneProperties.KEYSTONE_VERSION, "3");
 override.put(KeystoneProperties.SCOPE, "project:" + swiftConfig.getProject());
 
 final String credential = swiftConfig.getPassword();
 final String identity = swiftConfig.getUserDomain() + ":" + 
swiftConfig.getUsername();
 final String authUrl = swiftConfig.getAuthUrl();
 
 return ContextBuilder.newBuilder("openstack-swift")
 .endpoint(authUrl+"/v3")
 .credentials(identity,credential)
 .overrides(override)
 .buildApi(BlobStoreContext.class);
 }

 

*Debug:* Following are my observations after debugging the code.
 # got the BlobStore. The blobstore type is found to be 
RegionScopedSwiftBlobStore.
 # stepinto blobStore.removeBlob(containerName, fileName);                      
                    at line 396 in *RegionScopedSwiftBlobStore* class, it 
expects a response from *StaticLargeObjectApi* and this is where it throws the 
exception. DeleteStaticLargeObjectResponse response = 
api.getStaticLargeObjectApi(regionId, container).delete(name);

*Analysis*: While the api BlobStore.removeBlob fails in a Swift container, it 
works fine in AWS S3 and GCS container. I also observed that if I use 
*ObjectApi.delete(objectName)* instead of BlobStore.removeBlob then the blob 
gets deleted from the swift container. I believe its the StaticLargeObjectApi 
that's causing issue. As per the java doc of StaticLargeObjectApi, it is in 
beta and still under evaluation. 

Any help is highly appreciated.

Thank you.

 

 


> Removing a blob from a Swift container using BlobStore.removeBlob fails.
> 

[jira] [Created] (JCLOUDS-1483) Removing a blob from a Swift container using BlobStore.removeBlob fails.

2019-01-07 Thread Biswa Ranjan Ray (JIRA)
Biswa Ranjan Ray created JCLOUDS-1483:
-

 Summary: Removing a blob from a Swift container using 
BlobStore.removeBlob fails.
 Key: JCLOUDS-1483
 URL: https://issues.apache.org/jira/browse/JCLOUDS-1483
 Project: jclouds
  Issue Type: Improvement
  Components: jclouds-blobstore
Affects Versions: 2.1.1
Reporter: Biswa Ranjan Ray
 Attachments: stacktrace.txt

Hi Team,

I set the issue type to Improvement as I'm not sure if its a bug in jclouds 
library. :)

*Usecase*: Try to delete a blob (size ~ 107kb) from a swift container using 
BlobStore.removBlob() api of jclouds.

*Issue*: Following exception is  obtained: com.google.gson.JsonSyntaxException: 
java.lang.IllegalStateException: *Expected BEGIN_OBJECT but was STRING at line 
1 column 1 path $*.

*Code*: The below code snippet shows how a blob is deleted from a swift 
container.

BlobStore blobStore = getBlobStoreContext();              
blobStore.removeBlob(containerName, fileName);

**
//To get the BlobStoreContext for OpenStack Swiftprivate BlobStoreContext 
getBlobStoreContext() { final Properties override = new Properties();
 override.put(KeystoneProperties.KEYSTONE_VERSION, "3");
 override.put(KeystoneProperties.SCOPE, "project:" + swiftConfig.getProject()); 
 final String credential = swiftConfig.getPassword(); final String identity = 
swiftConfig.getUserDomain() + ":" + swiftConfig.getUsername(); final String 
authUrl = swiftConfig.getAuthUrl();  return 
ContextBuilder.newBuilder("openstack-swift")
 .endpoint(authUrl+"/v3")
 .credentials(identity,credential)
 .overrides(override)
 .buildApi(BlobStoreContext.class);
 }
*Debug:* Following are my observations after debugging the code.
 # got the BlobStore. The blobstore type is found to be 
RegionScopedSwiftBlobStore.
 # stepinto blobStore.removeBlob(containerName, fileName);                      
                    at line 396 in *RegionScopedSwiftBlobStore* class, it 
expects a response from *StaticLargeObjectApi* and this is where it throws the 
exception. DeleteStaticLargeObjectResponse response = 
api.getStaticLargeObjectApi(regionId, container).delete(name);

*Analysis*: While the api BlobStore.removeBlob fails in a Swift container, it 
works fine in AWS S3 and GCS container. I also observed that if I use 
*ObjectApi.delete(objectName)* instead of BlobStore.removeBlob then the blob 
gets deleted from the swift container. I believe its the StaticLargeObjectApi 
that's causing issue. As per the java doc of StaticLargeObjectApi, it is in 
beta and still under evaluation. 

Any help is highly appreciated.

Thank you.

 

 



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


[jira] [Created] (JCLOUDS-1482) Uploading a file to a Swift container create two items inside it: one of type BLOB and other of type FOLDER.

2019-01-04 Thread Biswa Ranjan Ray (JIRA)
Biswa Ranjan Ray created JCLOUDS-1482:
-

 Summary: Uploading a file to a Swift container create two items 
inside it: one of type BLOB and other of type FOLDER. 
 Key: JCLOUDS-1482
 URL: https://issues.apache.org/jira/browse/JCLOUDS-1482
 Project: jclouds
  Issue Type: Bug
  Components: jclouds-blobstore
Affects Versions: 2.1.1
Reporter: Biswa Ranjan Ray


*Usecase*: I'm trying to upload a file(107kb) to an OpenStack Swift container 
using the api BlobStore putBlob(String container, Blob blob, PutOptions 
options). Below code snippet demonstrates the way I get the BlobStoreContext 
and upload a file.

//To get the BlobStoreContext for OpenStack Swift

private BlobStoreContext getBlobStoreContext() {
 final Properties override = new Properties();
 override.put(KeystoneProperties.KEYSTONE_VERSION, "3");
 override.put(KeystoneProperties.SCOPE, "project:" + swiftConfig.getProject());
 
 final String credential = swiftConfig.getPassword();
 final String identity = swiftConfig.getUserDomain() + ":" + 
swiftConfig.getUsername();
 final String authUrl = swiftConfig.getAuthUrl();
 
 return ContextBuilder.newBuilder("openstack-swift")
 .endpoint(authUrl+"/v3")
 .credentials(identity,credential)
 .overrides(override)
 .buildApi(BlobStoreContext.class);
 }

//To upload a file into a container of an objectstore e.g AWS S3, OpenStack 
Swift

public String uploadFile(String bucketName, byte[] bytes, String fileName) {

BlobStore blobStore = getBlobStoreContext().getBlobStore();

boolean isBlobExist = blobStore.blobExists(bucketName, fileName);
 if(!isBlobExist){

//creating payload
 Payload payload = new ByteArrayPayload(bytes);

//adding user metadata to the blob
 Map userMetadata = new HashMap();
 userMetadata.put("description", "sample content");

//creating Blob
 Blob blob = blobStore.blobBuilder(fileName)
 .payload(payload)
 .userMetadata(userMetadata)
 .build();
String etag = blobStore.putBlob(bucketName, blob, 
*PutOptions.Builder.multipart(true)*);
String message = fileName+" uploaded successfully with etag "+etag;

return message;

}

}

*Issue:* Once the upload process is complete, I found two items created inside 
the container. One is of type *BLOB* and the other is of type *FOLDER* as shown 
below:

TestFile.DOCX
TestFile.DOCX/slo/1546583793.081000/109256/33554432/

The actual issue is with the below line where I use multipart:

String etag = blobStore.putBlob(bucketName, blob, 
*PutOptions.Builder.multipart(true)*);

However the above code works fine in AWS S3 and adds only one item of type BLOB 
into the required container.

*Debug:* I debug the code to find the following:
 # step into  putBlob(bucketName, blob, *PutOptions.Builder.multipart(true)*)
 # step into RegionScopedSwiftBlobStore > putBlob(String container, Blob blob, 
PutOptions options).
 # step into putMultipartBlob(String container, Blob blob, PutOptions 
overrides). Here i found the *contentLength:* 109256(file size), *partSize:* 
33554432, *part: 0*
 # **step into initiateMultipartUpload(String container, BlobMetadata 
blobMetadata, long partSize, PutOptions options). Here I found the 
*contentLength:* 109256(file size), *uploadId*: 
TestFile.DOCX/slo/1546583793.081000/109256/33554432
 # step into MultipartUpload.create(container, blobMetadata.getName(), 
uploadId, blobMetadata, options)
 # step into new AutoValue_MultipartUpload(containerName, blobName, id, 
blobMetadata, putOptions). Here onwards I can't debug any further.

*Analysis*: I observed that if I use SwiftApi instead of the traditional 
BlobStore then I get the desired result as it creates only one item of type 
BLOB inside the container. But since we are evaluating a java based third party 
library to develop a multi cloud application and so far we found Jclouds is the 
right choice so we would like to use portable apis e.g BlobStore to perform 
CRUD operations instead of using provider specific apis e.g SwiftApi.

Any help would be greatly appreciated. 



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


[jira] [Commented] (JCLOUDS-1419) Missing StorageClass REGIONAL for GCS buckets

2018-11-18 Thread Biswa Ranjan Ray (JIRA)


[ 
https://issues.apache.org/jira/browse/JCLOUDS-1419?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16691304#comment-16691304
 ] 

Biswa Ranjan Ray commented on JCLOUDS-1419:
---

Hi Team,

Thank you for your great effort to fix the issues.

The above fix is found to be available only in snapshot versions (2.2.0 & 
2.1.2). So currently to use this fix we needed to build jclouds project locally 
and added the dependency to local maven repository. Is there any plan to make a 
release of jclouds 2.2.0 version in maven central ? 

Thank you.

> Missing StorageClass REGIONAL for GCS buckets
> -
>
> Key: JCLOUDS-1419
> URL: https://issues.apache.org/jira/browse/JCLOUDS-1419
> Project: jclouds
>  Issue Type: Bug
>  Components: jclouds-blobstore
>Affects Versions: 2.0.0
>Reporter: Suresh
>Assignee: Andrew Gaul
>Priority: Major
>  Labels: google-cloud-storage
> Fix For: 2.2.0, 2.1.2
>
>
> When calling BlobStore.putBlob the object is created but we receive an 
> exception
> {code:java}
> SEVERE: Error parsing input: No enum constant 
> org.jclouds.googlecloudstorage.domain.DomainResourceReferences.StorageClass.REGIONAL
> java.lang.IllegalArgumentException: No enum constant 
> org.jclouds.googlecloudstorage.domain.DomainResourceReferences.StorageClass.REGIONAL
> {code}
> The bucket itself is defined as a "Regional" storage class (other choices 
> available are Multi-Regional, Nearline and Coldline)
> Here is the full exception we receive:
> {code:java}
> May 15, 2018 5:47:55 PM org.jclouds.logging.jdk.JDKLogger logError
> SEVERE: Error parsing input: No enum constant 
> org.jclouds.googlecloudstorage.domain.DomainResourceReferences.StorageClass.REGIONAL
> java.lang.IllegalArgumentException: No enum constant 
> org.jclouds.googlecloudstorage.domain.DomainResourceReferences.StorageClass.REGIONAL
> at java.lang.Enum.valueOf(Enum.java:238)
> at 
> org.jclouds.json.internal.EnumTypeAdapterThatReturnsFromValue.deserialize(EnumTypeAdapterThatReturnsFromValue.java:41)
> at 
> org.jclouds.json.internal.EnumTypeAdapterThatReturnsFromValue.deserialize(EnumTypeAdapterThatReturnsFromValue.java:32)
> at com.google.gson.TreeTypeAdapter.read(TreeTypeAdapter.java:58)
> at 
> org.jclouds.json.internal.DeserializationConstructorAndReflectiveTypeAdapterFactory$ParameterReader.read(DeserializationConstructorAndReflectiveTypeAdapterFactory.java:272)
> at 
> org.jclouds.json.internal.DeserializationConstructorAndReflectiveTypeAdapterFactory$DeserializeIntoParameterizedConstructor.read(DeserializationConstructorAndReflectiveTypeAdapterFactory.java:184)
> at com.google.gson.Gson.fromJson(Gson.java:861)
> at com.google.gson.Gson.fromJson(Gson.java:826)
> at org.jclouds.json.internal.GsonWrapper.fromJson(GsonWrapper.java:55)
> at org.jclouds.http.functions.ParseJson.apply(ParseJson.java:82)
> at org.jclouds.http.functions.ParseJson.apply(ParseJson.java:76)
> at org.jclouds.http.functions.ParseJson.apply(ParseJson.java:61)
> at org.jclouds.http.functions.ParseJson.apply(ParseJson.java:41)
> at org.jclouds.rest.internal.InvokeHttpMethod.invoke(InvokeHttpMethod.java:90)
> at org.jclouds.rest.internal.InvokeHttpMethod.apply(InvokeHttpMethod.java:73)
> at org.jclouds.rest.internal.InvokeHttpMethod.apply(InvokeHttpMethod.java:44)
> at 
> org.jclouds.reflect.FunctionalReflection$FunctionalInvocationHandler.handleInvocation(FunctionalReflection.java:117)
> at 
> com.google.common.reflect.AbstractInvocationHandler.invoke(AbstractInvocationHandler.java:87)
> at com.sun.proxy.$Proxy104.simpleUpload(Unknown Source)
> at 
> org.jclouds.googlecloudstorage.blobstore.GoogleCloudStorageBlobStore.uploadMultipartPart(GoogleCloudStorageBlobStore.java:425)
> at 
> org.jclouds.blobstore.internal.BaseBlobStore$BlobUploader.call(BaseBlobStore.java:388)
> at 
> org.jclouds.blobstore.internal.BaseBlobStore$BlobUploader.call(BaseBlobStore.java:375)
> at java.util.concurrent.FutureTask.run(FutureTask.java:266)
> at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
> at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
> at java.lang.Thread.run(Thread.java:745)
> {code}
> It looks like the list of [StorageClass 
> enum]([https://github.com/jclouds/jclouds-labs-google/blob/master/google-cloud-storage/src/main/java/org/jclouds/googlecloudstorage/domain/DomainResourceReferences.java#L48])
>  is incomplete



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