Azure-Samples / Azure-Samples/MipSDK-File-Java-Basic

Lots of mistakes in TokenCacheAspect

Offen
#14 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
Java
Sterne
3
Forks
8
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

Error reading data from file: Cannot invoke "java.net.URL.toURI()" because "path" is null
java.lang.RuntimeException: java.lang.NullPointerException: Cannot invoke "java.net.URL.toURI()" because "path" is null
at com.microsoft.mipsdksample.TokenCacheAspect.readDataFromFile(TokenCacheAspect.java:63)
at com.microsoft.mipsdksample.TokenCacheAspect.(TokenCacheAspect.java:41)
at com.microsoft.mipsdksample.AuthDelegateImpl.acquireTokenInteractive(AuthDelegateImpl.java:80)
at com.microsoft.mipsdksample.AuthDelegateImpl.acquireToken(AuthDelegateImpl.java:67)
at com.microsoft.informationprotection.internal.NativeAuthDelegate.AcquireOAuth2Token(NativeAuthDelegate.java:21)
at com.microsoft.informationprotection.internal.gen.SdkWrapperJNI.SwigDirector_AuthDelegate_AcquireOAuth2Token__SWIG_0(SdkWrapperJNI.java:2022)
Caused by: java.lang.NullPointerException: Cannot invoke "java.net.URL.toURI()" because "path" is null
at com.microsoft.mipsdksample.TokenCacheAspect.readDataFromFile(TokenCacheAspect.java:60)
... 5 more
Error reading data from file: Cannot invoke "java.net.URL.toURI()" because "path" is null
java.lang.RuntimeException: java.lang.NullPointerException: Cannot invoke "java.net.URL.toURI()" because "path" is null
at com.microsoft.mipsdksample.TokenCacheAspect.readDataFromFile(TokenCacheAspect.java:63)
at com.microsoft.mipsdksample.TokenCacheAspect.(TokenCacheAspect.java:41)
at com.microsoft.mipsdksample.AuthDelegateImpl.acquireTokenInteractive(AuthDelegateImpl.java:80)
at com.microsoft.mipsdksample.AuthDelegateImpl.acquireToken(AuthDelegateImpl.java:67)
at com.microsoft.informationprotection.internal.NativeAuthDelegate.AcquireOAuth2Token(NativeAuthDelegate.java:21)
at com.microsoft.informationprotection.internal.gen.SdkWrapperJNI.SwigDirector_AuthDelegate_AcquireOAuth2Token__SWIG_0(SdkWrapperJNI.java:2022)
Caused by: java.lang.NullPointerException: Cannot invoke "java.net.URL.toURI()" because "path" is null
at com.microsoft.mipsdksample.TokenCacheAspect.readDataFromFile(TokenCacheAspect.java:60)
... 5 more
Exception in thread "main" java.util.concurrent.ExecutionException: com.microsoft.informationprotection.internal.gen.Error: NoAuthTokenError: Client application failed to provide authentication token for HTTP request., CorrelationId=xxx, CorrelationId.Description=PolicyProfile
at java.base/java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:396)
at java.base/java.util.concurrent.CompletableFuture.get(CompletableFuture.java:2073)
at com.microsoft.mipsdksample.Action.CreateFileEngine(Action.java:110)
at com.microsoft.mipsdksample.Action.(Action.java:79)
at com.microsoft.mipsdksample.App.main(App.java:54)
Caused by: com.microsoft.informationprotection.internal.gen.Error: NoAuthTokenError: Client application failed to provide authentication token for HTTP request., CorrelationId=xxx, CorrelationId.Description=PolicyProfile
at com.microsoft.informationprotection.internal.gen.SdkWrapperJNI.SwigDirector_FileProfile_Observer_OnAddEngineFailure(SdkWrapperJNI.java:2397)

Process finished with exit code 1

Please rewrite code and do not provide low quality products in the future.
Thank you for your cooperation.

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.