[jira] [Commented] (JCLOUDS-278) SwiftClient parse exception on '%' symbols
[ https://issues.apache.org/jira/browse/JCLOUDS-278?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14025578#comment-14025578 ] Andrew Phillips commented on JCLOUDS-278: - Perhaps 13f38d628d3cc554b19c05cbf7048de79d814694 by Diwaker Gupta addressed this? That seems to be the case, [~gaul]. Adding a test to master to ensure we verify this - see https://github.com/jclouds/jclouds/pull/389. SwiftClient parse exception on '%' symbols -- Key: JCLOUDS-278 URL: https://issues.apache.org/jira/browse/JCLOUDS-278 Project: jclouds Issue Type: Bug Affects Versions: 1.5.10, 1.6.2 Environment: Tested on: org.jclouds:jclouds-allblobstore:1.5.5 AND org.apache.jclouds:jclouds-allblobstore:1.6.2-incubating Reporter: Erik Paulsson I've tested this using org.jclouds:jclouds-allblobstore v1.5.5 and 1.6.2-incubating. I get a parse exception using the SwiftClient when object names contain a '%' symbol. For example an object whose name is 'AND_-_100%_TVX/test.txt' will get stored fine, but when I attempt to list the contents of the container that the object is in I get the following exception: Sep 10, 2013 10:26:40 AM org.jclouds.logging.jdk.JDKLogger logError SEVERE: Error parsing input java.lang.IllegalArgumentException: URLDecoder: Illegal hex characters in escape (%) pattern - For input string: _T at java.net.URLDecoder.decode(URLDecoder.java:192) at org.jclouds.util.Strings2.urlDecode(Strings2.java:97) at org.jclouds.http.Uris$UriBuilder.appendPath(Uris.java:157) at org.jclouds.openstack.swift.functions.ParseObjectInfoListFromJsonResponse$3.apply(ParseObjectInfoListFromJsonResponse.java:82) at org.jclouds.openstack.swift.functions.ParseObjectInfoListFromJsonResponse$3.apply(ParseObjectInfoListFromJsonResponse.java:80) at com.google.common.collect.Iterators$9.transform(Iterators.java:893) at com.google.common.collect.TransformedIterator.next(TransformedIterator.java:48) at com.google.common.collect.Sets.newTreeSet(Sets.java:345) at org.jclouds.openstack.swift.functions.ParseObjectInfoListFromJsonResponse.apply(ParseObjectInfoListFromJsonResponse.java:79) at org.jclouds.openstack.swift.functions.ParseObjectInfoListFromJsonResponse.apply(ParseObjectInfoListFromJsonResponse.java:54) at org.jclouds.http.functions.ParseJson.apply(ParseJson.java:66) at org.jclouds.http.functions.ParseJson.apply(ParseJson.java:46) at com.google.common.util.concurrent.Futures$3.apply(Futures.java:376) at com.google.common.util.concurrent.Futures$ChainingListenableFuture.run(Futures.java:518) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:724) This may affect more than just the SwiftClient API since it looks like the bug may be in: org.jclouds.util.Strings2.urlDecode org.jclouds.http.Uris$UriBuilder.appendPath Here is an example of a simple method that generates the exception: private PageSetObjectInfo listObjects(String containerName, String prefix, int maxResults, String marker) { ListContainerOptions containerOptions = ListContainerOptions.Builder.maxResults(maxResults); if(marker != null) containerOptions.afterMarker(marker); if(prefix != null) containerOptions.withPrefix(prefix); return swiftClient.listObjects(containerName, containerOptions); } Calling this method with the container name of the container containing the object whose name contains a '%' symbol and a maxResults of 1000 and null for both prefix and marker will result in the above exception. Let's just say my container name is percent-container and I have an object in this container with the name AND_-_100%_TVX/test.txt So this is what the method call to the above method might look like: listObjects(percent-container, null, 1000, null); Even if I URL encode the object name before storing it I still get the same exception when retrieving a list of contents for the space. I can run a cURL command straight to the Swift storage provider to get the object and it returns fine. Am I doing anything wrong? Do I need to handle '%' symbols in a special way? The docs swift docs don't express any character restrictions on object names: http://docs.openstack.org/trunk/openstack-object-storage/admin/content/containers-and-objects.html -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Commented] (JCLOUDS-278) SwiftClient parse exception on '%' symbols
[ https://issues.apache.org/jira/browse/JCLOUDS-278?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14025587#comment-14025587 ] ASF subversion and git services commented on JCLOUDS-278: - Commit b1c163636dbf07b360f85f2ca8a3e570e9c494bd in jclouds's branch refs/heads/master from [~andrewp] [ https://git-wip-us.apache.org/repos/asf?p=jclouds.git;h=b1c1636 ] Adding a test to check for JCLOUDS-278 Contributed by Bill Branan. SwiftClient parse exception on '%' symbols -- Key: JCLOUDS-278 URL: https://issues.apache.org/jira/browse/JCLOUDS-278 Project: jclouds Issue Type: Bug Affects Versions: 1.5.10, 1.6.2 Environment: Tested on: org.jclouds:jclouds-allblobstore:1.5.5 AND org.apache.jclouds:jclouds-allblobstore:1.6.2-incubating Reporter: Erik Paulsson Attachments: JCLOUDS-278-master.patch I've tested this using org.jclouds:jclouds-allblobstore v1.5.5 and 1.6.2-incubating. I get a parse exception using the SwiftClient when object names contain a '%' symbol. For example an object whose name is 'AND_-_100%_TVX/test.txt' will get stored fine, but when I attempt to list the contents of the container that the object is in I get the following exception: Sep 10, 2013 10:26:40 AM org.jclouds.logging.jdk.JDKLogger logError SEVERE: Error parsing input java.lang.IllegalArgumentException: URLDecoder: Illegal hex characters in escape (%) pattern - For input string: _T at java.net.URLDecoder.decode(URLDecoder.java:192) at org.jclouds.util.Strings2.urlDecode(Strings2.java:97) at org.jclouds.http.Uris$UriBuilder.appendPath(Uris.java:157) at org.jclouds.openstack.swift.functions.ParseObjectInfoListFromJsonResponse$3.apply(ParseObjectInfoListFromJsonResponse.java:82) at org.jclouds.openstack.swift.functions.ParseObjectInfoListFromJsonResponse$3.apply(ParseObjectInfoListFromJsonResponse.java:80) at com.google.common.collect.Iterators$9.transform(Iterators.java:893) at com.google.common.collect.TransformedIterator.next(TransformedIterator.java:48) at com.google.common.collect.Sets.newTreeSet(Sets.java:345) at org.jclouds.openstack.swift.functions.ParseObjectInfoListFromJsonResponse.apply(ParseObjectInfoListFromJsonResponse.java:79) at org.jclouds.openstack.swift.functions.ParseObjectInfoListFromJsonResponse.apply(ParseObjectInfoListFromJsonResponse.java:54) at org.jclouds.http.functions.ParseJson.apply(ParseJson.java:66) at org.jclouds.http.functions.ParseJson.apply(ParseJson.java:46) at com.google.common.util.concurrent.Futures$3.apply(Futures.java:376) at com.google.common.util.concurrent.Futures$ChainingListenableFuture.run(Futures.java:518) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:724) This may affect more than just the SwiftClient API since it looks like the bug may be in: org.jclouds.util.Strings2.urlDecode org.jclouds.http.Uris$UriBuilder.appendPath Here is an example of a simple method that generates the exception: private PageSetObjectInfo listObjects(String containerName, String prefix, int maxResults, String marker) { ListContainerOptions containerOptions = ListContainerOptions.Builder.maxResults(maxResults); if(marker != null) containerOptions.afterMarker(marker); if(prefix != null) containerOptions.withPrefix(prefix); return swiftClient.listObjects(containerName, containerOptions); } Calling this method with the container name of the container containing the object whose name contains a '%' symbol and a maxResults of 1000 and null for both prefix and marker will result in the above exception. Let's just say my container name is percent-container and I have an object in this container with the name AND_-_100%_TVX/test.txt So this is what the method call to the above method might look like: listObjects(percent-container, null, 1000, null); Even if I URL encode the object name before storing it I still get the same exception when retrieving a list of contents for the space. I can run a cURL command straight to the Swift storage provider to get the object and it returns fine. Am I doing anything wrong? Do I need to handle '%' symbols in a special way? The docs swift docs don't express any character restrictions on object names: http://docs.openstack.org/trunk/openstack-object-storage/admin/content/containers-and-objects.html -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Commented] (JCLOUDS-278) SwiftClient parse exception on '%' symbols
[ https://issues.apache.org/jira/browse/JCLOUDS-278?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14014843#comment-14014843 ] Andrew Phillips commented on JCLOUDS-278: - It seems that master is *not* affected by this, by the way: https://github.com/jclouds/jclouds/pull/389 SwiftClient parse exception on '%' symbols -- Key: JCLOUDS-278 URL: https://issues.apache.org/jira/browse/JCLOUDS-278 Project: jclouds Issue Type: Bug Affects Versions: 1.5.10, 1.6.2 Environment: Tested on: org.jclouds:jclouds-allblobstore:1.5.5 AND org.apache.jclouds:jclouds-allblobstore:1.6.2-incubating Reporter: Erik Paulsson I've tested this using org.jclouds:jclouds-allblobstore v1.5.5 and 1.6.2-incubating. I get a parse exception using the SwiftClient when object names contain a '%' symbol. For example an object whose name is 'AND_-_100%_TVX/test.txt' will get stored fine, but when I attempt to list the contents of the container that the object is in I get the following exception: Sep 10, 2013 10:26:40 AM org.jclouds.logging.jdk.JDKLogger logError SEVERE: Error parsing input java.lang.IllegalArgumentException: URLDecoder: Illegal hex characters in escape (%) pattern - For input string: _T at java.net.URLDecoder.decode(URLDecoder.java:192) at org.jclouds.util.Strings2.urlDecode(Strings2.java:97) at org.jclouds.http.Uris$UriBuilder.appendPath(Uris.java:157) at org.jclouds.openstack.swift.functions.ParseObjectInfoListFromJsonResponse$3.apply(ParseObjectInfoListFromJsonResponse.java:82) at org.jclouds.openstack.swift.functions.ParseObjectInfoListFromJsonResponse$3.apply(ParseObjectInfoListFromJsonResponse.java:80) at com.google.common.collect.Iterators$9.transform(Iterators.java:893) at com.google.common.collect.TransformedIterator.next(TransformedIterator.java:48) at com.google.common.collect.Sets.newTreeSet(Sets.java:345) at org.jclouds.openstack.swift.functions.ParseObjectInfoListFromJsonResponse.apply(ParseObjectInfoListFromJsonResponse.java:79) at org.jclouds.openstack.swift.functions.ParseObjectInfoListFromJsonResponse.apply(ParseObjectInfoListFromJsonResponse.java:54) at org.jclouds.http.functions.ParseJson.apply(ParseJson.java:66) at org.jclouds.http.functions.ParseJson.apply(ParseJson.java:46) at com.google.common.util.concurrent.Futures$3.apply(Futures.java:376) at com.google.common.util.concurrent.Futures$ChainingListenableFuture.run(Futures.java:518) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:724) This may affect more than just the SwiftClient API since it looks like the bug may be in: org.jclouds.util.Strings2.urlDecode org.jclouds.http.Uris$UriBuilder.appendPath Here is an example of a simple method that generates the exception: private PageSetObjectInfo listObjects(String containerName, String prefix, int maxResults, String marker) { ListContainerOptions containerOptions = ListContainerOptions.Builder.maxResults(maxResults); if(marker != null) containerOptions.afterMarker(marker); if(prefix != null) containerOptions.withPrefix(prefix); return swiftClient.listObjects(containerName, containerOptions); } Calling this method with the container name of the container containing the object whose name contains a '%' symbol and a maxResults of 1000 and null for both prefix and marker will result in the above exception. Let's just say my container name is percent-container and I have an object in this container with the name AND_-_100%_TVX/test.txt So this is what the method call to the above method might look like: listObjects(percent-container, null, 1000, null); Even if I URL encode the object name before storing it I still get the same exception when retrieving a list of contents for the space. I can run a cURL command straight to the Swift storage provider to get the object and it returns fine. Am I doing anything wrong? Do I need to handle '%' symbols in a special way? The docs swift docs don't express any character restrictions on object names: http://docs.openstack.org/trunk/openstack-object-storage/admin/content/containers-and-objects.html -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Commented] (JCLOUDS-278) SwiftClient parse exception on '%' symbols
[ https://issues.apache.org/jira/browse/JCLOUDS-278?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14014852#comment-14014852 ] Andrew Gaul commented on JCLOUDS-278: - Perhaps 13f38d628d3cc554b19c05cbf7048de79d814694 by [~diwaker] addressed this? SwiftClient parse exception on '%' symbols -- Key: JCLOUDS-278 URL: https://issues.apache.org/jira/browse/JCLOUDS-278 Project: jclouds Issue Type: Bug Affects Versions: 1.5.10, 1.6.2 Environment: Tested on: org.jclouds:jclouds-allblobstore:1.5.5 AND org.apache.jclouds:jclouds-allblobstore:1.6.2-incubating Reporter: Erik Paulsson I've tested this using org.jclouds:jclouds-allblobstore v1.5.5 and 1.6.2-incubating. I get a parse exception using the SwiftClient when object names contain a '%' symbol. For example an object whose name is 'AND_-_100%_TVX/test.txt' will get stored fine, but when I attempt to list the contents of the container that the object is in I get the following exception: Sep 10, 2013 10:26:40 AM org.jclouds.logging.jdk.JDKLogger logError SEVERE: Error parsing input java.lang.IllegalArgumentException: URLDecoder: Illegal hex characters in escape (%) pattern - For input string: _T at java.net.URLDecoder.decode(URLDecoder.java:192) at org.jclouds.util.Strings2.urlDecode(Strings2.java:97) at org.jclouds.http.Uris$UriBuilder.appendPath(Uris.java:157) at org.jclouds.openstack.swift.functions.ParseObjectInfoListFromJsonResponse$3.apply(ParseObjectInfoListFromJsonResponse.java:82) at org.jclouds.openstack.swift.functions.ParseObjectInfoListFromJsonResponse$3.apply(ParseObjectInfoListFromJsonResponse.java:80) at com.google.common.collect.Iterators$9.transform(Iterators.java:893) at com.google.common.collect.TransformedIterator.next(TransformedIterator.java:48) at com.google.common.collect.Sets.newTreeSet(Sets.java:345) at org.jclouds.openstack.swift.functions.ParseObjectInfoListFromJsonResponse.apply(ParseObjectInfoListFromJsonResponse.java:79) at org.jclouds.openstack.swift.functions.ParseObjectInfoListFromJsonResponse.apply(ParseObjectInfoListFromJsonResponse.java:54) at org.jclouds.http.functions.ParseJson.apply(ParseJson.java:66) at org.jclouds.http.functions.ParseJson.apply(ParseJson.java:46) at com.google.common.util.concurrent.Futures$3.apply(Futures.java:376) at com.google.common.util.concurrent.Futures$ChainingListenableFuture.run(Futures.java:518) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:724) This may affect more than just the SwiftClient API since it looks like the bug may be in: org.jclouds.util.Strings2.urlDecode org.jclouds.http.Uris$UriBuilder.appendPath Here is an example of a simple method that generates the exception: private PageSetObjectInfo listObjects(String containerName, String prefix, int maxResults, String marker) { ListContainerOptions containerOptions = ListContainerOptions.Builder.maxResults(maxResults); if(marker != null) containerOptions.afterMarker(marker); if(prefix != null) containerOptions.withPrefix(prefix); return swiftClient.listObjects(containerName, containerOptions); } Calling this method with the container name of the container containing the object whose name contains a '%' symbol and a maxResults of 1000 and null for both prefix and marker will result in the above exception. Let's just say my container name is percent-container and I have an object in this container with the name AND_-_100%_TVX/test.txt So this is what the method call to the above method might look like: listObjects(percent-container, null, 1000, null); Even if I URL encode the object name before storing it I still get the same exception when retrieving a list of contents for the space. I can run a cURL command straight to the Swift storage provider to get the object and it returns fine. Am I doing anything wrong? Do I need to handle '%' symbols in a special way? The docs swift docs don't express any character restrictions on object names: http://docs.openstack.org/trunk/openstack-object-storage/admin/content/containers-and-objects.html -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Commented] (JCLOUDS-278) SwiftClient parse exception on '%' symbols
[ https://issues.apache.org/jira/browse/JCLOUDS-278?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14013853#comment-14013853 ] Andrew Phillips commented on JCLOUDS-278: - [~bbranan], [~epaulson]: Out of curiosity: have you been able to verify whether this also affects the SwiftApi [1], which will replace SwiftClient in (provisionally) jclouds 2.0? [1] http://javadocs-labs-openstack.jclouds.cloudbees.net/org/jclouds/openstack/swift/v1/SwiftApi.html SwiftClient parse exception on '%' symbols -- Key: JCLOUDS-278 URL: https://issues.apache.org/jira/browse/JCLOUDS-278 Project: jclouds Issue Type: Bug Affects Versions: 1.5.10, 1.6.2 Environment: Tested on: org.jclouds:jclouds-allblobstore:1.5.5 AND org.apache.jclouds:jclouds-allblobstore:1.6.2-incubating Reporter: Erik Paulsson I've tested this using org.jclouds:jclouds-allblobstore v1.5.5 and 1.6.2-incubating. I get a parse exception using the SwiftClient when object names contain a '%' symbol. For example an object whose name is 'AND_-_100%_TVX/test.txt' will get stored fine, but when I attempt to list the contents of the container that the object is in I get the following exception: Sep 10, 2013 10:26:40 AM org.jclouds.logging.jdk.JDKLogger logError SEVERE: Error parsing input java.lang.IllegalArgumentException: URLDecoder: Illegal hex characters in escape (%) pattern - For input string: _T at java.net.URLDecoder.decode(URLDecoder.java:192) at org.jclouds.util.Strings2.urlDecode(Strings2.java:97) at org.jclouds.http.Uris$UriBuilder.appendPath(Uris.java:157) at org.jclouds.openstack.swift.functions.ParseObjectInfoListFromJsonResponse$3.apply(ParseObjectInfoListFromJsonResponse.java:82) at org.jclouds.openstack.swift.functions.ParseObjectInfoListFromJsonResponse$3.apply(ParseObjectInfoListFromJsonResponse.java:80) at com.google.common.collect.Iterators$9.transform(Iterators.java:893) at com.google.common.collect.TransformedIterator.next(TransformedIterator.java:48) at com.google.common.collect.Sets.newTreeSet(Sets.java:345) at org.jclouds.openstack.swift.functions.ParseObjectInfoListFromJsonResponse.apply(ParseObjectInfoListFromJsonResponse.java:79) at org.jclouds.openstack.swift.functions.ParseObjectInfoListFromJsonResponse.apply(ParseObjectInfoListFromJsonResponse.java:54) at org.jclouds.http.functions.ParseJson.apply(ParseJson.java:66) at org.jclouds.http.functions.ParseJson.apply(ParseJson.java:46) at com.google.common.util.concurrent.Futures$3.apply(Futures.java:376) at com.google.common.util.concurrent.Futures$ChainingListenableFuture.run(Futures.java:518) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:724) This may affect more than just the SwiftClient API since it looks like the bug may be in: org.jclouds.util.Strings2.urlDecode org.jclouds.http.Uris$UriBuilder.appendPath Here is an example of a simple method that generates the exception: private PageSetObjectInfo listObjects(String containerName, String prefix, int maxResults, String marker) { ListContainerOptions containerOptions = ListContainerOptions.Builder.maxResults(maxResults); if(marker != null) containerOptions.afterMarker(marker); if(prefix != null) containerOptions.withPrefix(prefix); return swiftClient.listObjects(containerName, containerOptions); } Calling this method with the container name of the container containing the object whose name contains a '%' symbol and a maxResults of 1000 and null for both prefix and marker will result in the above exception. Let's just say my container name is percent-container and I have an object in this container with the name AND_-_100%_TVX/test.txt So this is what the method call to the above method might look like: listObjects(percent-container, null, 1000, null); Even if I URL encode the object name before storing it I still get the same exception when retrieving a list of contents for the space. I can run a cURL command straight to the Swift storage provider to get the object and it returns fine. Am I doing anything wrong? Do I need to handle '%' symbols in a special way? The docs swift docs don't express any character restrictions on object names: http://docs.openstack.org/trunk/openstack-object-storage/admin/content/containers-and-objects.html -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Commented] (JCLOUDS-278) SwiftClient parse exception on '%' symbols
[ https://issues.apache.org/jira/browse/JCLOUDS-278?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14014018#comment-14014018 ] Erik Paulson commented on JCLOUDS-278: -- I think you mean [~paulsson] - best of luck! SwiftClient parse exception on '%' symbols -- Key: JCLOUDS-278 URL: https://issues.apache.org/jira/browse/JCLOUDS-278 Project: jclouds Issue Type: Bug Affects Versions: 1.5.10, 1.6.2 Environment: Tested on: org.jclouds:jclouds-allblobstore:1.5.5 AND org.apache.jclouds:jclouds-allblobstore:1.6.2-incubating Reporter: Erik Paulsson I've tested this using org.jclouds:jclouds-allblobstore v1.5.5 and 1.6.2-incubating. I get a parse exception using the SwiftClient when object names contain a '%' symbol. For example an object whose name is 'AND_-_100%_TVX/test.txt' will get stored fine, but when I attempt to list the contents of the container that the object is in I get the following exception: Sep 10, 2013 10:26:40 AM org.jclouds.logging.jdk.JDKLogger logError SEVERE: Error parsing input java.lang.IllegalArgumentException: URLDecoder: Illegal hex characters in escape (%) pattern - For input string: _T at java.net.URLDecoder.decode(URLDecoder.java:192) at org.jclouds.util.Strings2.urlDecode(Strings2.java:97) at org.jclouds.http.Uris$UriBuilder.appendPath(Uris.java:157) at org.jclouds.openstack.swift.functions.ParseObjectInfoListFromJsonResponse$3.apply(ParseObjectInfoListFromJsonResponse.java:82) at org.jclouds.openstack.swift.functions.ParseObjectInfoListFromJsonResponse$3.apply(ParseObjectInfoListFromJsonResponse.java:80) at com.google.common.collect.Iterators$9.transform(Iterators.java:893) at com.google.common.collect.TransformedIterator.next(TransformedIterator.java:48) at com.google.common.collect.Sets.newTreeSet(Sets.java:345) at org.jclouds.openstack.swift.functions.ParseObjectInfoListFromJsonResponse.apply(ParseObjectInfoListFromJsonResponse.java:79) at org.jclouds.openstack.swift.functions.ParseObjectInfoListFromJsonResponse.apply(ParseObjectInfoListFromJsonResponse.java:54) at org.jclouds.http.functions.ParseJson.apply(ParseJson.java:66) at org.jclouds.http.functions.ParseJson.apply(ParseJson.java:46) at com.google.common.util.concurrent.Futures$3.apply(Futures.java:376) at com.google.common.util.concurrent.Futures$ChainingListenableFuture.run(Futures.java:518) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:724) This may affect more than just the SwiftClient API since it looks like the bug may be in: org.jclouds.util.Strings2.urlDecode org.jclouds.http.Uris$UriBuilder.appendPath Here is an example of a simple method that generates the exception: private PageSetObjectInfo listObjects(String containerName, String prefix, int maxResults, String marker) { ListContainerOptions containerOptions = ListContainerOptions.Builder.maxResults(maxResults); if(marker != null) containerOptions.afterMarker(marker); if(prefix != null) containerOptions.withPrefix(prefix); return swiftClient.listObjects(containerName, containerOptions); } Calling this method with the container name of the container containing the object whose name contains a '%' symbol and a maxResults of 1000 and null for both prefix and marker will result in the above exception. Let's just say my container name is percent-container and I have an object in this container with the name AND_-_100%_TVX/test.txt So this is what the method call to the above method might look like: listObjects(percent-container, null, 1000, null); Even if I URL encode the object name before storing it I still get the same exception when retrieving a list of contents for the space. I can run a cURL command straight to the Swift storage provider to get the object and it returns fine. Am I doing anything wrong? Do I need to handle '%' symbols in a special way? The docs swift docs don't express any character restrictions on object names: http://docs.openstack.org/trunk/openstack-object-storage/admin/content/containers-and-objects.html -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Commented] (JCLOUDS-278) SwiftClient parse exception on '%' symbols
[ https://issues.apache.org/jira/browse/JCLOUDS-278?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14014192#comment-14014192 ] Bill Branan commented on JCLOUDS-278: - Updated pull request against master branch: https://github.com/jclouds/jclouds/pull/388. SwiftClient parse exception on '%' symbols -- Key: JCLOUDS-278 URL: https://issues.apache.org/jira/browse/JCLOUDS-278 Project: jclouds Issue Type: Bug Affects Versions: 1.5.10, 1.6.2 Environment: Tested on: org.jclouds:jclouds-allblobstore:1.5.5 AND org.apache.jclouds:jclouds-allblobstore:1.6.2-incubating Reporter: Erik Paulsson I've tested this using org.jclouds:jclouds-allblobstore v1.5.5 and 1.6.2-incubating. I get a parse exception using the SwiftClient when object names contain a '%' symbol. For example an object whose name is 'AND_-_100%_TVX/test.txt' will get stored fine, but when I attempt to list the contents of the container that the object is in I get the following exception: Sep 10, 2013 10:26:40 AM org.jclouds.logging.jdk.JDKLogger logError SEVERE: Error parsing input java.lang.IllegalArgumentException: URLDecoder: Illegal hex characters in escape (%) pattern - For input string: _T at java.net.URLDecoder.decode(URLDecoder.java:192) at org.jclouds.util.Strings2.urlDecode(Strings2.java:97) at org.jclouds.http.Uris$UriBuilder.appendPath(Uris.java:157) at org.jclouds.openstack.swift.functions.ParseObjectInfoListFromJsonResponse$3.apply(ParseObjectInfoListFromJsonResponse.java:82) at org.jclouds.openstack.swift.functions.ParseObjectInfoListFromJsonResponse$3.apply(ParseObjectInfoListFromJsonResponse.java:80) at com.google.common.collect.Iterators$9.transform(Iterators.java:893) at com.google.common.collect.TransformedIterator.next(TransformedIterator.java:48) at com.google.common.collect.Sets.newTreeSet(Sets.java:345) at org.jclouds.openstack.swift.functions.ParseObjectInfoListFromJsonResponse.apply(ParseObjectInfoListFromJsonResponse.java:79) at org.jclouds.openstack.swift.functions.ParseObjectInfoListFromJsonResponse.apply(ParseObjectInfoListFromJsonResponse.java:54) at org.jclouds.http.functions.ParseJson.apply(ParseJson.java:66) at org.jclouds.http.functions.ParseJson.apply(ParseJson.java:46) at com.google.common.util.concurrent.Futures$3.apply(Futures.java:376) at com.google.common.util.concurrent.Futures$ChainingListenableFuture.run(Futures.java:518) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:724) This may affect more than just the SwiftClient API since it looks like the bug may be in: org.jclouds.util.Strings2.urlDecode org.jclouds.http.Uris$UriBuilder.appendPath Here is an example of a simple method that generates the exception: private PageSetObjectInfo listObjects(String containerName, String prefix, int maxResults, String marker) { ListContainerOptions containerOptions = ListContainerOptions.Builder.maxResults(maxResults); if(marker != null) containerOptions.afterMarker(marker); if(prefix != null) containerOptions.withPrefix(prefix); return swiftClient.listObjects(containerName, containerOptions); } Calling this method with the container name of the container containing the object whose name contains a '%' symbol and a maxResults of 1000 and null for both prefix and marker will result in the above exception. Let's just say my container name is percent-container and I have an object in this container with the name AND_-_100%_TVX/test.txt So this is what the method call to the above method might look like: listObjects(percent-container, null, 1000, null); Even if I URL encode the object name before storing it I still get the same exception when retrieving a list of contents for the space. I can run a cURL command straight to the Swift storage provider to get the object and it returns fine. Am I doing anything wrong? Do I need to handle '%' symbols in a special way? The docs swift docs don't express any character restrictions on object names: http://docs.openstack.org/trunk/openstack-object-storage/admin/content/containers-and-objects.html -- This message was sent by Atlassian JIRA (v6.2#6252)