Issue in OCI Java SDK Deserialization of LifecycleState Enum during ListVcns Call
还没有人认领这个 Issue。
评估
调研方向
从 com.oracle.bmc.core.model.Vcn.LifecycleState 和 shaded OCI Java SDK 使用的反序列化路径开始,然后重现 issue 中的 ListVcns 调用。完成意味着包含 lifecycleState="AVAILABLE" 的响应不再引发 InvalidFormatException,并遵循所选的 fallback 行为。
由索引模型根据 Issue 内容生成。
描述
Dear Oracle Support Team,
We are encountering a critical issue while using the OCI Java SDK (version oci-java-sdk-shaded-full-3.66.0) when calling the ListVcns API.
🔍 Issue Summary
The API returns lifecycleState = "AVAILABLE" (all uppercase), but the SDK expects the enum value as Available (PascalCase). This mismatch causes a com.fasterxml.jackson.databind.exc.InvalidFormatException during deserialization of the response into the SDK model class com.oracle.bmc.core.model.Vcn.
❗ Error Stack Trace (Excerpt)
vbnet
Copy
Edit
Caused by: shaded.com.oracle.oci.javasdk.com.fasterxml.jackson.databind.exc.InvalidFormatException:
Cannot deserialize value of type com.oracle.bmc.core.model.Vcn$LifecycleState from String "AVAILABLE":
not one of the values accepted for Enum class: [Terminated, UnknownEnumValue, Available, Provisioning, Terminating, Updating]
at [Source: (InputStream); line: 1, column: 875]
(through reference chain: java.util.ArrayList[0]->com.oracle.bmc.core.model.Vcn["lifecycleState"])
🧪 Reproduction Code
java
Copy
Edit
ListVcnsRequest request = ListVcnsRequest.builder()
.compartmentId("")
.lifecycleState(Vcn.LifecycleState.Available)
.build();
ListVcnsResponse response = virtualNetworkClient.listVcns(request);
📌 Observations
The Jackson deserializer used is from the shaded OCI SDK itself:
shaded.com.oracle.oci.javasdk.com.fasterxml.jackson.databind
The API response contains "AVAILABLE" (uppercase), but the SDK expects "Available", hence deserialization fails.
Although the enum includes UnknownEnumValue, it is not triggered because Jackson fails before enum fallback logic is invoked.
This causes a client-side error with HTTP code -1 and message: "Unknown error".
✅ Expected Behavior
The SDK should either:
Allow case-insensitive enum deserialization (e.g., AVAILABLE → Available), or
Fall back to UnknownEnumValue instead of throwing an exception.
🌐 Region & Endpoint
Region: ap-hyderabad-1
Endpoint: https://iaas.ap-hyderabad-1.oraclecloud.com/20160918/vcns
📦 SDK Version
OCI Java SDK: oci-java-sdk-shaded-full-3.66.0
Kindly advise if this is a known issue or if a fix/workaround is available. If needed, we can provide the full JSON response and debug logs.
Thanks & Regards,
suriya B
- 主要语言
- Java
- 星标
- 243
- 派生
- 171
- 平均合并
- 5 分钟
- 30 天内合并 PR
- 4
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
oracle/oci-java-sdk 的其他 Issue
-
NoSuchMethodError in the circuit breaker since 3.103.0 when resilience4j 2.x is on the classpath未关闭
难度 2/5 1-3 小时 新手友好度 76/100
oracle/oci-java-sdk#803 ·
-
SDK
难度 1/5 1 小时以内 新手友好度 20/100
oracle/oci-java-sdk#788 ·
-
Identity Domains
难度 4/5 3-5 天 新手友好度 25/100
oracle/oci-java-sdk#764 · 3 条评论 ·
-
SDK
难度 3/5 1-2 天 新手友好度 48/100
oracle/oci-java-sdk#726 · 1 条评论 ·
-
Object Storage
难度 4/5 3-5 天 新手友好度 25/100
oracle/oci-java-sdk#723 · 1 个 reaction ·
查看 oracle/oci-java-sdk 的全部 Issue
相似的 Issue
-
enhancement infra
难度 2/5 1-3 小时 新手友好度 67/100
维护者通常 1 天内回复
-
5.0.x backport bug
难度 1/5 1 小时以内 新手友好度 68/100
spring-cloud/spring-cloud-function#1569 ·
维护者通常 1 天内回复
-
Move the spring-cloud-commons version and BOM import from the bus parent to the stream parent可能已有人在做 @olegz 今天认领。 未关闭task
难度 2/5 1-3 小时 新手友好度 74/100
spring-cloud/spring-cloud-stream#3355 ·
维护者通常 1 天内回复
-
area:cpan-port area:performance bug
难度 2/5 1-3 小时 新手友好度 72/100
fglock/PerlOnJava#2230 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 76/100