问题标签 [oci-java-sdk]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
131 浏览

oracle-cloud-infrastructure - MultipartObjectAssembler OCI 对象存储失败的原因

我正在使用 MultipartObjectAssembler 将数据从数据库上传到 OCI 对象存储。使用分段上传时有没有办法知道失败的原因?

当我尝试提交汇编程序时,我收到 IllegalStateException 消息“一个或多个部分尚未成功完成上传”。我想知道为什么任何部分都失败了?我找不到从 SDK 获取此信息的方法。

编辑:我需要获取失败部分引发的异常并传播错误消息。

0 投票
1 回答
85 浏览

oracle-cloud-infrastructure - Resource ownership of GetObjectResponse.InputStream

Who owns the OCI object-storage GetObjectResponse.InputStream resource?

Do I need to explicitly close the stream? There is no information about this in the API doc.

0 投票
1 回答
957 浏览

oracle-cloud-infrastructure - 使用 oci-java-sdk 获取存储桶或对象的 URL

我已经有一个代码可以使用 oci-java-sdk 检索存储桶中的对象,并且按预期工作。我想检索上传到对象存储中的存储桶的文件的 URL,当我使用此 URL 时,它应该重定向到实际位置而不询问任何凭据。我看到了预先验证的请求,但我需要再创建一个请求。我不想再发送一个请求并想在现有的GetObjectResponse 中获取 URL。 任何建议>谢谢,js

0 投票
0 回答
87 浏览

oracle-cloud-infrastructure - 创建密钥时出错:com.oracle.bmc.model.BmcException: (400, InvalidParameter, false) 阶段必须是当前阶段之一

我正在尝试使用 oci java sdk 创建秘密:https ://docs.oracle.com/en-us/iaas/tools/java-sdk-examples/2.8.0/vault/CreateSecretExample.java.html

但收到此错误:

我尝试了两个阶段:SecretContentDetails.Stage.Pending、SecretContentDetails.Stage.Current

但得到与上述相同的错误?知道如何解决吗?

0 投票
0 回答
23 浏览

oracle-cloud-infrastructure - 从 Oracle 云存储 (oci-java-sdk) 生成预验证 URL 时出错

得到错误

com.oracle.bmc.model.BmcException: (-1, null, false) 通信时处理异常:https://objectstorage.eu-frankfurt-1.oraclecloud.com (outbound opc-request-id: 610055D587CD432284C75AA1C52A6446)

我已从 Oracle https://docs.oracle.com/en-us/iaas/api/#/en/objectstorage/20160918/PreauthenticatedRequest/CreatePreauthenticatedRequest获取代码单元,但它不起作用

代码

有什么我想念的吗?完成错误日志 09:02:25 INFO [co.or.bm.ht.ApacheConfigurator] 将连接器提供程序设置为 ApacheConnectorProvider 09:02:25 INFO [co.or.bm.ob.ObjectStorageClient] 将端点设置为https://objectstorage .eu-frankfurt-1.oraclecloud.com 09:02:25 DEBUG[or.fr.co.DocStoreOracleService]Client Created = https://objectstorage.eu-frankfurt-1.oraclecloud.com 09:02:25 DEBUG[ or.fr.co.DocStoreOracleService]createPreauthenticatedRequestDetails Created...EXAMPLE-name-Value com.oracle.bmc.model.BmcException: (-1, null, false) 通信时处理异常:https://objectstorage.eu- frankfurt-1.oraclecloud.com(出站 opc-request-id: 813E7CD051BD44FB9303B033D912F187) 在 com.oracle.bmc.http.internal.RestClient.convertToBmcException(RestClient.java:994) 在 com.oracle.bmc.http.internal.RestClient.post(RestClient.java: 306) 在 com.oracle.bmc.retrier.BmcGenericRetrier.doFunctionCall(BmcGenericRetrier.java:89) 在 com.oracle.bmc 的 com.oracle.bmc.objectstorage.ObjectStorageClient.lambda$null$12(ObjectStorageClient.java:684)。 retrier.BmcGenericRetrier.lambda$execute$0(BmcGenericRetrier.java:60) at com.oracle.bmc.waiter.GenericWaiter.execute(GenericWaiter.java:55) at com.oracle.bmc.retrier.BmcGenericRetrier.execute(BmcGenericRetrier.java :51) 在 com.oracle.bmc.retrier.BmcGenericRetrier.doFunctionCall(BmcGenericRetrier.java:89) 在 com.oracle.bmc.retrier.com.oracle.com.oracle.bmc.objectstorage.ObjectStorageClient.lambda$createPreauthenticatedRequest$13(ObjectStorageClient.java:680)。bmc.retrier.BmcGenericRetrier.lambda$execute$0(BmcGenericRetrier.java:60) at com.oracle.bmc.waiter.GenericWaiter.execute(GenericWaiter.java:55) at com.oracle.bmc.retrier.BmcGenericRetrier.execute(BmcGenericRetrier .java:51) 在 com.oracle.bmc.objectstorage.ObjectStorageClient.createPreauthenticatedRequest(ObjectStorageClient.java:674) 在 org.freshfood.controller.DocStoreOracleService.generatePAUNew(DocStoreOracleService.java:774) 在 org.freshfood.controller.DocStoreOracleService_Subclass。 generatePAUNew$$superforward1(Unknown Source) at org.freshfood.controller.DocStoreOracleService_Subclass$$function$$8.apply(Unknown Source) at io.quarkus.arc.impl.AroundInvokeInvocationContext.proceed(AroundInvokeInvocationContext.java:54) at io.quarkus .arc.runtime.devconsole.InvocationInterceptor.proceed(InvocationInterceptor.java:62) 在 io.quarkus.arc.runtime。devconsole.InvocationInterceptor.monitor(InvocationInterceptor.java:49) at io.quarkus.arc.runtime.devconsole.InvocationInterceptor_Bean.intercept(Unknown Source) at io.quarkus.arc.impl.InterceptorInvocation.invoke(InterceptorInvocation.java:41) at io.quarkus.arc.impl.AroundInvokeInvocationContext.perform(AroundInvokeInvocationContext.java:41) 在 io.quarkus.arc.impl.InvocationContexts.performAroundInvoke(InvocationContexts.java:32) 在 org.freshfood.controller.DocStoreOracleService_Subclass.generatePAUNew(Unknown Source ) 在 org.freshfood.controller.DocumentResource.getPreAuthURL(DocumentResource.java:36) 在 org.freshfood.controller.DocumentResource_Subclass.getPreAuthURL$$superforward1(Unknown Source) 在 org.freshfood.controller.DocStoreOracleService_ClientProxy.generatePAUNew(Unknown Source) 在org.freshfood.controller。DocumentResource_Subclass$$function$$4.apply(Unknown Source) at io.quarkus.arc.impl.AroundInvokeInvocationContext.proceed(AroundInvokeInvocationContext.java:54) at io.quarkus.arc.runtime.devconsole.InvocationInterceptor.proceed(InvocationInterceptor.java: 62) 在 io.quarkus.arc.runtime.devconsole.InvocationInterceptor_Bean.intercept(Unknown Source) 在 io.quarkus.arc.impl 的 io.quarkus.arc.runtime.devconsole.InvocationInterceptor.monitor(InvocationInterceptor.java:49)。 InterceptorInvocation.invoke(InterceptorInvocation.java:41) at io.quarkus.arc.impl.AroundInvokeInvocationContext.perform(AroundInvokeInvocationContext.java:41) at io.quarkus.arc.impl.InvocationContexts.performAroundInvoke(InvocationContexts.java:32) at org .freshfood.controller.DocumentResource_Subclass.getPreAuthURL(Unknown Source) at java.base/jdk.internal.reflect。NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) 在 org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:170) 在 org.jboss.resteasy.core.MethodInjectorImpl。 org.jboss.resteasy.core.ResourceMethodInvoker.invokeOnTargetAfterFilter(ResourceMethodInvoker.java:524) at org.jboss.resteasy.core.ResourceMethodInvoker.invokeOnTargetAfterFilter(ResourceMethodInvoker.java:524) at org.jboss.resteasy.core.ResourceMethodInvoker.internalInvokeOnTarget(ResourceMethodInvoker.java:660) 调用(MethodInjectorImpl.java:130) .resteasy.core.ResourceMethodInvoker.lambda$invokeOnTarget$2(ResourceMethodInvoker.java:474) 在 org.jboss.resteasy.core.interception.jaxrs。PreMatchContainerRequestContext.filter(PreMatchContainerRequestContext.java:364) at org.jboss.resteasy.core.ResourceMethodInvoker.invokeOnTarget(ResourceMethodInvoker.java:476) at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:434) at org .jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:408) at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:69) at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher .java:492) 在 org.jboss.resteasy.core.SynchronousDispatcher.lambda$invoke$4(SynchronousDispatcher.java:261) 在 org.jboss.resteasy.core.SynchronousDispatcher.lambda$preprocess$0(SynchronousDispatcher.java:161) 在org.jboss.resteasy.core.interception.jaxrs.PreMatchContainerRequestContext.filter(PreMatchContainerRequestContext.java:364) 在 org.jboss.resteasy.core.SynchronousDispatcher.preprocess(SynchronousDispatcher.java:164) at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:247) at io.quarkus.resteasy.runtime.standalone.RequestDispatcher.service( RequestDispatcher.java:73) 在 io.quarkus.resteasy.runtime.standalone.VertxRequestHandler.dispatch(VertxRequestHandler.java:151) 在 io.quarkus.resteasy.runtime.standalone.VertxRequestHandler$1.run(VertxRequestHandler.java:91) 在io.quarkus.vertx.core.runtime.VertxCoreRecorder$13.runWith(VertxCoreRecorder.java:543) at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2449) at org.jboss.threads.EnhancedQueueExecutor$ThreadBody .run(EnhancedQueueExecutor.java:1478) 在 org.jboss.threads.DelegatingRunnable.run(DelegatingRunnable.java:29) 在 org.jboss.threads.ThreadLocalResettingRunnable。run(ThreadLocalResettingRunnable.java:29) at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) at java.base/java.lang.Thread.run(Thread.java:834) 原因:javax .ws.rs.ProcessingException:RESTEASY004655:无法调用请求:javax.ws.rs.ProcessingException:RESTEASY003215:找不到内容类型应用程序/json类型的编写器:org.jboss.resteasy.client的java.lang.String .jaxrs.engines.ManualClosingApacheHttpClient43Engine.invoke(ManualClosingApacheHttpClient43Engine.java:321) at org.jboss.resteasy.client.jaxrs.internal.ClientInvocation.invoke(ClientInvocation.java:494) at org.jboss.resteasy.client.jaxrs.internal .ClientInvocation.invoke(ClientInvocation.java:69) 在 org.jboss.resteasy.client.jaxrs.internal.ClientInvocationBuilder.post(ClientInvocationBuilder.java:226) 在 com.oracle.bmc.http.internal。ForwardingInvocationBuilder.post(ForwardingInvocationBuilder.java:157) 在 com.oracle.bmc.http.internal.RestClient.lambda$post$4(RestClient.java:304) 在 com.oracle.bmc.circuitbreaker.internal.JaxRsCircuitBreakerImpl.lambda$decorateSupplier $0(JaxRsCircuitBreakerImpl.java:83) at io.github.resilience4j.circuitbreaker.CircuitBreaker.lambda$decorateSupplier$4(CircuitBreaker.java:198) at com.oracle.bmc.circuitbreaker.internal.JaxRsCircuitBreakerImpl.lambda$decorateSupplier$1(JaxRsCircuitBreakerImpl. java:93) 在 com.oracle.bmc.http.internal.RestClient.post(RestClient.java:304) 的 com.oracle.bmc.http.internal.RestClient.lambda$decorateSupplier$0(RestClient.java:175) 。 .. 还有 64 个原因:javax.ws.rs.ProcessingException:RESTEASY003215:找不到内容类型应用程序/json 类型的编写器:org.jboss.resteasy.core.interception 的 java.lang.String。jaxrs.ClientWriterInterceptorContext.throwWriterNotFoundException(ClientWriterInterceptorContext.java:50) 在 org.jboss.resteasy.core.interception.jaxrs.AbstractWriterInterceptorContext.getWriter(AbstractWriterInterceptorContext.java:302) 在 org.jboss.resteasy.core.interception.jaxrs.AbstractWriterInterceptorContext。在 org.jboss.resteasy.client.jaxrs.internal.ClientInvocation.writeRequestBody(ClientInvocation. java:446) 在 org.jboss.resteasy.client.jaxrs.engines.ManualClosingApacheHttpClient43Engine 的 org.jboss.resteasy.client.jaxrs.engines.ManualClosingApacheHttpClient43Engine.writeRequestBodyToOutputStream(ManualClosingApacheHttpClient43Engine.java:625)。buildEntity(ManualClosingApacheHttpClient43Engine.java:584) at org.jboss.resteasy.client.jaxrs.engines.ManualClosingApacheHttpClient43Engine.loadHttpMethod(ManualClosingApacheHttpClient43Engine.java:489) at org.jboss.resteasy.client.jaxrs.engines.ManualClosingApacheHttpClient43Engine.invoke(ManualClosingApacheHttpClient43Engine. java:299) ... 74 更多