1
我知道如何創建通過認證獲得比調用API如何在使用JAVA的對象存儲中創建對象?
這裏點擊以下鏈接可如何獲得認證信息對象, Unauthorized error while connecting Object Storage from API from Postman
是否有JAVA任何可用的庫執行這些操作?
我從圖書館下面的鏈接,但似乎舊的,而不是工作, https://github.com/softlayer/softlayer-object-storage-java/tree/master/sl-objectstorage
如果有人知道你能不能請張貼如何操作呢?
利用圖書館獲取下面的錯誤,
Error while handling an HTTP client call
java.lang.ClassCastException: org.restlet.data.Parameter incompatible with org.restlet.data.Header
at org.restlet.engine.header.HeaderUtils.addExtensionHeaders(HeaderUtils.java:220)
at org.restlet.engine.header.HeaderUtils.addRequestHeaders(HeaderUtils.java:479)
at org.restlet.engine.adapter.ClientAdapter.toSpecific(ClientAdapter.java:163)
at org.restlet.engine.adapter.HttpClientHelper.handle(HttpClientHelper.java:118)
at org.restlet.Client.handle(Client.java:153)
at org.restlet.routing.Filter.doHandle(Filter.java:150)
at org.restlet.routing.Filter.handle(Filter.java:197)
at org.restlet.resource.ClientResource.handle(ClientResource.java:1092)
at org.restlet.resource.ClientResource.handleOutbound(ClientResource.java:1176)
at org.restlet.resource.ClientResource.handle(ClientResource.java:1047)
at org.restlet.resource.ClientResource.handle(ClientResource.java:1023)
at org.restlet.resource.ClientResource.handle(ClientResource.java:928)
at org.restlet.resource.ClientResource.get(ClientResource.java:636)
at com.softlayer.objectstorage.Client.httpRequest(Client.java:245)
at com.softlayer.objectstorage.Client.get(Client.java:177)
at com.softlayer.objectstorage.Client.auth(Client.java:128)
at com.softlayer.objectstorage.Client.<init>(Client.java:107)
at com.softlayer.objectstorage.Container.<init>(Container.java:77)
at com.wrakafka.consumer.ObjectStorageUtil.createContainer(ObjectStorageUtil.java:24)
at spark.KafkaConsumer.main(KafkaConsumer.java:51)
Nov 21, 2016 1:24:18 PM org.restlet.resource.ClientResource retry
INFO: A recoverable error was detected (1002), attempting again in 2000 ms.
Nov 21, 2016 1:24:20 PM org.restlet.engine.adapter.HttpClientHelper handle
INFO: Error while handling an HTTP client call
java.lang.ClassCastException: org.restlet.data.Parameter incompatible with org.restlet.data.Header
at org.restlet.engine.header.HeaderUtils.addExtensionHeaders(HeaderUtils.java:220)
at org.restlet.engine.header.HeaderUtils.addRequestHeaders(HeaderUtils.java:479)
at org.restlet.engine.adapter.ClientAdapter.toSpecific(ClientAdapter.java:163)
at org.restlet.engine.adapter.HttpClientHelper.handle(HttpClientHelper.java:118)
at org.restlet.Client.handle(Client.java:153)
at org.restlet.routing.Filter.doHandle(Filter.java:150)
at org.restlet.routing.Filter.handle(Filter.java:197)
at org.restlet.resource.ClientResource.handle(ClientResource.java:1092)
at org.restlet.resource.ClientResource.retry(ClientResource.java:1650)
at org.restlet.resource.ClientResource.handle(ClientResource.java:1100)
at org.restlet.resource.ClientResource.handleOutbound(ClientResource.java:1176)
at org.restlet.resource.ClientResource.handle(ClientResource.java:1047)
at org.restlet.resource.ClientResource.handle(ClientResource.java:1023)
at org.restlet.resource.ClientResource.handle(ClientResource.java:928)
at org.restlet.resource.ClientResource.get(ClientResource.java:636)
at com.softlayer.objectstorage.Client.httpRequest(Client.java:245)
at com.softlayer.objectstorage.Client.get(Client.java:177)
at com.softlayer.objectstorage.Client.auth(Client.java:128)
at com.softlayer.objectstorage.Client.<init>(Client.java:107)
at com.softlayer.objectstorage.Container.<init>(Container.java:77)
at com.wrakafka.consumer.ObjectStorageUtil.createContainer(ObjectStorageUtil.java:24)
at spark.KafkaConsumer.main(KafkaConsumer.java:51)
Nov 21, 2016 1:24:20 PM org.restlet.resource.ClientResource retry
INFO: A recoverable error was detected (1002), attempting again in 2000 ms.
Nov 21, 2016 1:24:22 PM org.restlet.engine.adapter.HttpClientHelper handle
INFO: Error while handling an HTTP client call
java.lang.ClassCastException: org.restlet.data.Parameter incompatible with org.restlet.data.Header
at org.restlet.engine.header.HeaderUtils.addExtensionHeaders(HeaderUtils.java:220)
at org.restlet.engine.header.HeaderUtils.addRequestHeaders(HeaderUtils.java:479)
at org.restlet.engine.adapter.ClientAdapter.toSpecific(ClientAdapter.java:163)
at org.restlet.engine.adapter.HttpClientHelper.handle(HttpClientHelper.java:118)
at org.restlet.Client.handle(Client.java:153)
at org.restlet.routing.Filter.doHandle(Filter.java:150)
at org.restlet.routing.Filter.handle(Filter.java:197)
at org.restlet.resource.ClientResource.handle(ClientResource.java:1092)
at org.restlet.resource.ClientResource.retry(ClientResource.java:1650)
at org.restlet.resource.ClientResource.handle(ClientResource.java:1100)
at org.restlet.resource.ClientResource.retry(ClientResource.java:1650)
at org.restlet.resource.ClientResource.handle(ClientResource.java:1100)
at org.restlet.resource.ClientResource.handleOutbound(ClientResource.java:1176)
at org.restlet.resource.ClientResource.handle(ClientResource.java:1047)
at org.restlet.resource.ClientResource.handle(ClientResource.java:1023)
at org.restlet.resource.ClientResource.handle(ClientResource.java:928)
at org.restlet.resource.ClientResource.get(ClientResource.java:636)
at com.softlayer.objectstorage.Client.httpRequest(Client.java:245)
at com.softlayer.objectstorage.Client.get(Client.java:177)
at com.softlayer.objectstorage.Client.auth(Client.java:128)
at com.softlayer.objectstorage.Client.<init>(Client.java:107)
at com.softlayer.objectstorage.Container.<init>(Container.java:77)
at com.wrakafka.consumer.ObjectStorageUtil.createContainer(ObjectStorageUtil.java:24)
at spark.KafkaConsumer.main(KafkaConsumer.java:51)
它似乎運行添加依賴關係org.res需要驗證碼tlet.jee。有沒有可能使用Class文件,有些不需要這種依賴關係? –
正如我所見,客戶需要這些依賴關係 –
好的。如何將String(Base64編碼的字符串)保存到對象存儲中。代碼似乎只適用於上傳文件 –