Failure to handle OCI authentication in /bmc-examples/src/main/java/CreateInstanceExample.java
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Anfängerfreundlichkeit
- 35/100
- Issue-Typ
- Bug
- Klarheit
- Muss geklärt werden
- Aktivitätsstatus
- Veraltet
- Tech-Stack
- java
- Bereich
- api, authentication, cloud
Rechercherichtung
Beginnen Sie mit bmc-examples/src/main/java/CreateInstanceExample.java und reproduzieren Sie den Fehler mit den im Beispiel beschriebenen Argumenten. Verfolgen Sie die Einrichtung der Authentifizierung bis zum im Stacktrace gezeigten ListAvailabilityDomains-Aufruf; abgeschlossen ist die Aufgabe, wenn sich das Beispiel erfolgreich authentifiziert und ohne den gemeldeten 401 NotAuthenticated-Fehler fortfährt.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
Hello,
I tried the example https://github.com/oracle/oci-java-sdk/blob/master/bmc-examples/src/main/java/CreateInstanceExample.java
with the latest SDK version and providing the arguments mentioned by the example. However the example fails with:
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
Exception in thread "main" com.oracle.bmc.model.BmcException: Error returned by ListAvailabilityDomains operation in Identity service.(401, NotAuthenticated, false) The required information to complete authentication was not provided or was incorrect. (opc-request-id: C936D868CDD14E86ABD33B089FBE87D1/0477CC4974ED912CFA787CE7B4B46A00/1EC18D8155B178BAD7A5AD7E9566F2D7)
Timestamp: 2023-12-14T10:55:18.221Z
Client version: Oracle-JavaSDK/3.31.0
Request Endpoint: https://identity.us-phoenix-1.oci.oraclecloud.com/20160918/availabilityDomains?compartmentId=******************************************************
Troubleshooting Tips: See https://docs.oracle.com/en-us/iaas/Content/API/References/apierrors.htm#apierrors_401__401_notauthenticated for more information about resolving this error
Also see https://docs.oracle.com/iaas/api/#/en/identity/20160918/AvailabilityDomain/ListAvailabilityDomains for details on this operation's requirements.
To get more info on the failing request, you can enable debug level logs as mentioned in `Using SLF4J for Logging section` in https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconfig.htm.
If you are unable to resolve this Identity issue, please contact Oracle support and provide them this full error message.
at com.oracle.bmc.http.internal.ClientCall.lambda$checkError$18(ClientCall.java:816)
at java.base/java.util.concurrent.CompletableFuture.uniHandle(CompletableFuture.java:934)
at java.base/java.util.concurrent.CompletableFuture.uniHandleStage(CompletableFuture.java:950)
at java.base/java.util.concurrent.CompletableFuture.handle(CompletableFuture.java:2372)
at java.base/java.util.concurrent.CompletableFuture.handle(CompletableFuture.java:144)
at com.oracle.bmc.http.internal.ClientCall.checkError(ClientCall.java:772)
at com.oracle.bmc.http.internal.ClientCall.transformResponse(ClientCall.java:637)
at com.oracle.bmc.http.internal.ClientCall.lambda$callAsyncImpl$24(ClientCall.java:1021)
at java.base/java.util.concurrent.CompletableFuture$UniCompose.tryFire(CompletableFuture.java:1150)
at java.base/java.util.concurrent.CompletableFuture$Completion.run(CompletableFuture.java:482)
at com.oracle.bmc.http.internal.SyncFutureWaiter$Waiter.waitAndWork(SyncFutureWaiter.java:63)
at com.oracle.bmc.http.internal.SyncFutureWaiter.listenForResult(SyncFutureWaiter.java:32)
at com.oracle.bmc.http.internal.ClientCall.callSync(ClientCall.java:1089)
at com.oracle.bmc.identity.IdentityClient.listAvailabilityDomains(IdentityClient.java:2543)
at org.example.Main.getAvailabilityDomains(Main.java:278)
at org.example.Main.main(Main.java:179)
The key provided is for sure a valid one as I it has been obtained via OCI user interface and I tested it with another SDK. In the above stack trace I removed my compartmentID as that is sensitive information to publish.
Can you please provide a solution to this?
Thank you
- 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