Issue in OCI Java SDK Deserialization of LifecycleState Enum during ListVcns Call
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Anfängerfreundlichkeit
- 42/100
Rechercherichtung
Beginne mit com.oracle.bmc.core.model.Vcn.LifecycleState und dem Deserialisierungspfad, der vom shaded OCI Java SDK verwendet wird, und reproduziere anschließend den ListVcns-Aufruf aus dem Issue. Als erledigt gilt, wenn eine Antwort mit lifecycleState="AVAILABLE" keine InvalidFormatException mehr auslöst und dem ausgewählten Fallback-Verhalten folgt.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
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
- Vorherrschende Sprache
- Java
- Sterne
- 243
- Forks
- 171
- Ø Merge
- 5 Min.
- Gemergte PRs (30 T.)
- 4
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Keine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus oracle/oci-java-sdk
-
NoSuchMethodError in the circuit breaker since 3.103.0 when resilience4j 2.x is on the classpathOffen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
oracle/oci-java-sdk#803 ·
-
Potential token refresh timeout issue in Versions 2.91.0, 2.93.0, and 2.95.0 (Fixed in 2.97.0)OffenSDK
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 20/100
oracle/oci-java-sdk#788 ·
-
Identity Domains
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 25/100
oracle/oci-java-sdk#764 · 3 Kommentare ·
-
SDK
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 48/100
oracle/oci-java-sdk#726 · 1 Kommentar ·
-
Object Storage
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 25/100
oracle/oci-java-sdk#723 · 1 Reaktion ·
Alle Issues in oracle/oci-java-sdk
Ähnliche Issues
-
enhancement infra
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 67/100
Maintainer antworten meist innerhalb von 1 Tag
-
5.0.x backport bug
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 68/100
spring-cloud/spring-cloud-function#1569 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Move the spring-cloud-commons version and BOM import from the bus parent to the stream parentEvtl. vergeben @olegz hat das heute übernommen. Offentask
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 74/100
spring-cloud/spring-cloud-stream#3355 ·
Maintainer antworten meist innerhalb von 1 Tag
-
area:cpan-port area:performance bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
fglock/PerlOnJava#2230 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100