java - Openstack juno with Jclouds API generating URISyntaxException because of an extra space in response -


openstack juno orchestration endpoint having space in response, giving me exception while using jclouds api use openstack, there can do?

{     "endpoints": [{         "adminurl": "http://115.249.4.66:8004/v1/38bc976fd99d4ef4b6d48be6729b8576",         "region": "iptc",         "internalurl": "http://115.249.4.66:8004/v1/38bc976fd99d4ef4b6d48be6729b8576 ",         "id": "64667a399bb446d0bf0f6537e113ec52",         "publicurl": "http://115.249.4.66:8004/v1/38bc976fd99d4ef4b6d48be6729b8576"     }],     "endpoints_links": [],     "type": "orchestration",     "name": "heat" }, 

as shown above line

"htttp://115.249.4.66:8004/v1/38bc976fd99d4ef4b6d48be6729b8576 ",

has space before double quotes closing url (i manually added 't' http)

but in other endpoints there no space,

the same response trystack.org shown below,

{     "endpoints": [{         "adminurl": "http://10.100.0.222:8004/v1/18b792582bba4385ac9c4820af4a8b5e",         "region": "regionone",         "internalurl": "http://10.100.0.222:8004/v1/18b792582bba4385ac9c4820af4a8b5e",         "id": "38fa4f9afce34d4ca0f5e0f90fd758dd",         "publicurl": "http://8.21.28.222:8004/v1/18b792582bba4385ac9c4820af4a8b5e"     }],     "endpoints_links": [],     "type": "orchestration",     "name": "heat" }, 

as can see in url "htttp://10.100.0.222:8004/v1/18b792582bba4385ac9c4820af4a8b5e", there no space before double quotes. (i manually added 't' http)

because of space there url, error in jclouds follows,

exception in thread "main" com.google.common.util.concurrent.uncheckedexecutionexception: com.google.gson.jsonioexception: java.net.urisyntaxexception: illegal character in path @ index 61: htttp://115.249.4.66:8004/v1/38bc976fd99d4ef4b6d48be6729b8576      @ com.google.common.cache.localcache$segment.get(localcache.java:2201)     @ com.google.common.cache.localcache.get(localcache.java:3934)     @ com.google.common.cache.localcache.getorload(localcache.java:3938)     @ com.google.common.cache.localcache$localloadingcache.get(localcache.java:4821)     @ com.google.common.cache.localcache$localloadingcache.getunchecked(localcache.java:4827)     @ org.jclouds.openstack.keystone.v2_0.config.keystoneauthenticationmodule$2.get(keystoneauthenticationmodule.java:234)     @ org.jclouds.openstack.keystone.v2_0.config.keystoneauthenticationmodule$2.get(keystoneauthenticationmodule.java:231)     @ org.jclouds.openstack.keystone.v2_0.suppliers.locationidtourifromaccessfortypeandversion.get(locationidtourifromaccessfortypeandversion.java:94)     @ org.jclouds.openstack.keystone.v2_0.suppliers.locationidtourifromaccessfortypeandversion.get(locationidtourifromaccessfortypeandversion.java:54)     @ org.jclouds.rest.suppliers.memoizedretryontimeoutbutnotonauthorizationexceptionsupplier$setandthrowauthorizationexceptionsupplierbackedloader.load(memoizedretryontimeoutbutnotonauthorizationexceptionsupplier.java:73)     @ org.jclouds.rest.suppliers.memoizedretryontimeoutbutnotonauthorizationexceptionsupplier$setandthrowauthorizationexceptionsupplierbackedloader.load(memoizedretryontimeoutbutnotonauthorizationexceptionsupplier.java:57)     @ com.google.common.cache.localcache$loadingvaluereference.loadfuture(localcache.java:3524)     @ com.google.common.cache.localcache$segment.loadsync(localcache.java:2317)     @ com.google.common.cache.localcache$segment.lockedgetorload(localcache.java:2280)     @ com.google.common.cache.localcache$segment.get(localcache.java:2195)     @ com.google.common.cache.localcache.get(localcache.java:3934)     @ com.google.common.cache.localcache.getorload(localcache.java:3938)     @ com.google.common.cache.localcache$localloadingcache.get(localcache.java:4821)     @ org.jclouds.rest.suppliers.memoizedretryontimeoutbutnotonauthorizationexceptionsupplier.get(memoizedretryontimeoutbutnotonauthorizationexceptionsupplier.java:119)     @ org.jclouds.openstack.neutron.v2.functions.versionawareregiontoendpoint.apply(versionawareregiontoendpoint.java:55)     @ org.jclouds.openstack.neutron.v2.functions.versionawareregiontoendpoint.apply(versionawareregiontoendpoint.java:33)     @ org.jclouds.rest.internal.restannotationprocessor.getendpointinparametersornull(restannotationprocessor.java:495)     @ org.jclouds.rest.internal.restannotationprocessor.getendpointfor(restannotationprocessor.java:518)     @ org.jclouds.rest.internal.restannotationprocessor.apply(restannotationprocessor.java:188)     @ org.jclouds.rest.internal.restannotationprocessor.apply(restannotationprocessor.java:129)     @ org.jclouds.rest.internal.invokehttpmethod.tocommand(invokehttpmethod.java:188)     @ org.jclouds.rest.internal.invokehttpmethod.invoke(invokehttpmethod.java:84)     @ org.jclouds.rest.internal.invokehttpmethod.apply(invokehttpmethod.java:73)     @ org.jclouds.rest.internal.invokehttpmethod.apply(invokehttpmethod.java:44)     @ org.jclouds.reflect.functionalreflection$functionalinvocationhandler.handleinvocation(functionalreflection.java:117)     @ com.google.common.reflect.abstractinvocationhandler.invoke(abstractinvocationhandler.java:87)     @ com.sun.proxy.$proxy62.list(unknown source)     @ example.jcloudsdemo.operations(jcloudsdemo.java:159)     @ example.jcloudsdemo.main(jcloudsdemo.java:146) caused by: com.google.gson.jsonioexception: java.net.urisyntaxexception: illegal character in path @ index 61: htttp://115.249.4.66:8004/v1/38bc976fd99d4ef4b6d48be6729b8576      @ com.google.gson.internal.bind.typeadapters$19.read(typeadapters.java:469)     @ com.google.gson.internal.bind.typeadapters$19.read(typeadapters.java:458)     @ org.jclouds.json.internal.deserializationconstructorandreflectivetypeadapterfactory$parameterreader.read(deserializationconstructorandreflectivetypeadapterfactory.java:272)     @ org.jclouds.json.internal.deserializationconstructorandreflectivetypeadapterfactory$deserializeintoparameterizedconstructor.read(deserializationconstructorandreflectivetypeadapterfactory.java:184)     @ org.jclouds.json.internal.nullfilteringtypeadapterfactories$iterabletypeadapter.readandbuild(nullfilteringtypeadapterfactories.java:90)     @ org.jclouds.json.internal.nullfilteringtypeadapterfactories$settypeadapter.read(nullfilteringtypeadapterfactories.java:180)     @ org.jclouds.json.internal.nullfilteringtypeadapterfactories$settypeadapter.read(nullfilteringtypeadapterfactories.java:166)     @ org.jclouds.json.internal.deserializationconstructorandreflectivetypeadapterfactory$parameterreader.read(deserializationconstructorandreflectivetypeadapterfactory.java:272)     @ org.jclouds.json.internal.deserializationconstructorandreflectivetypeadapterfactory$deserializeintoparameterizedconstructor.read(deserializationconstructorandreflectivetypeadapterfactory.java:184)     @ org.jclouds.json.internal.nullfilteringtypeadapterfactories$iterabletypeadapter.readandbuild(nullfilteringtypeadapterfactories.java:90)     @ org.jclouds.json.internal.nullfilteringtypeadapterfactories$settypeadapter.read(nullfilteringtypeadapterfactories.java:180)     @ org.jclouds.json.internal.nullfilteringtypeadapterfactories$settypeadapter.read(nullfilteringtypeadapterfactories.java:166)     @ org.jclouds.json.internal.deserializationconstructorandreflectivetypeadapterfactory$parameterreader.read(deserializationconstructorandreflectivetypeadapterfactory.java:272)     @ org.jclouds.json.internal.deserializationconstructorandreflectivetypeadapterfactory$deserializeintoparameterizedconstructor.read(deserializationconstructorandreflectivetypeadapterfactory.java:184)     @ com.google.gson.gson.fromjson(gson.java:803)     @ org.jclouds.http.functions.parsefirstjsonvaluenamed.apply(parsefirstjsonvaluenamed.java:80)     @ org.jclouds.http.functions.parsefirstjsonvaluenamed.apply(parsefirstjsonvaluenamed.java:44)     @ org.jclouds.rest.internal.invokehttpmethod.invoke(invokehttpmethod.java:90)     @ org.jclouds.rest.internal.invokehttpmethod.apply(invokehttpmethod.java:73)     @ org.jclouds.rest.internal.invokehttpmethod.apply(invokehttpmethod.java:44)     @ org.jclouds.rest.internal.delegatestoinvocationfunction.handle(delegatestoinvocationfunction.java:156)     @ org.jclouds.rest.internal.delegatestoinvocationfunction.invoke(delegatestoinvocationfunction.java:123)     @ com.sun.proxy.$proxy55.authenticatewithtenantnameandcredentials(unknown source)     @ org.jclouds.openstack.keystone.v2_0.functions.authenticatepasswordcredentials.authenticatewithtenantname(authenticatepasswordcredentials.java:43)     @ org.jclouds.openstack.keystone.v2_0.functions.authenticatepasswordcredentials.authenticatewithtenantname(authenticatepasswordcredentials.java:31)     @ org.jclouds.openstack.keystone.v2_0.functions.internal.baseauthenticator.apply(baseauthenticator.java:79)     @ org.jclouds.openstack.keystone.v2_0.functions.internal.baseauthenticator.apply(baseauthenticator.java:36)     @ com.google.common.cache.cacheloader$functiontocacheloader.load(cacheloader.java:151)     @ com.google.common.cache.localcache$loadingvaluereference.loadfuture(localcache.java:3524)     @ com.google.common.cache.localcache$segment.loadsync(localcache.java:2317)     @ com.google.common.cache.localcache$segment.lockedgetorload(localcache.java:2280)     @ com.google.common.cache.localcache$segment.get(localcache.java:2195) ... 33 more caused by: java.net.urisyntaxexception: illegal character in path @ index 61: htttp://115.249.4.66:8004/v1/38bc976fd99d4ef4b6d48be6729b8576      @ java.net.uri$parser.fail(uri.java:2829)     @ java.net.uri$parser.checkchars(uri.java:3002)     @ java.net.uri$parser.parsehierarchical(uri.java:3086)     @ java.net.uri$parser.parse(uri.java:3034)     @ java.net.uri.<init>(uri.java:595)     @ com.google.gson.internal.bind.typeadapters$19.read(typeadapters.java:467)     ... 64 more 

what can do?, in advance

this has been added jclouds jira. can track there. https://issues.apache.org/jira/browse/jclouds-907


Comments

Popular posts from this blog

apache - PHP Soap issue while content length is larger -

asynchronous - Python asyncio task got bad yield -

javascript - Complete OpenIDConnect auth when requesting via Ajax -