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

Default configuration doesn't work

Đang mở
#9 3 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Java
Star
3
Fork
8
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

Hello!

I have compiled java sample and created Application Registration in Azure AD with corresponding premissions, according to instructions. I have amended code

appInfo.setApplicationId("xxxxx-xxxx-xxxx-xxxx-xxxxxxxx");
appInfo.setApplicationName("MIP SDK Java Sample");
appInfo.setApplicationVersion("1.10");

but it give error about token. Firewall is disabled. Any idea?

PS C:\> java -jar mipsdksample.jar
Enter a username: tengrism@tengrism.onmicrosoft.com
Error reading data from file: null
java.lang.RuntimeException: java.lang.NullPointerException
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:1958)
Caused by: java.lang.NullPointerException
at com.microsoft.mipsdksample.TokenCacheAspect.readDataFromFile(TokenCacheAspect.java:60)
... 5 more
Error reading data from file: null
java.lang.RuntimeException: java.lang.NullPointerException
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:1958)
Caused by: java.lang.NullPointerException
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.
at java.util.concurrent.CompletableFuture.reportGet(Unknown Source)
at java.util.concurrent.CompletableFuture.get(Unknown Source)
at com.microsoft.mipsdksample.Action.CreateFileEngine(Action.java:105)
at com.microsoft.mipsdksample.Action.(Action.java:78)
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.
at com.microsoft.informationprotection.internal.gen.SdkWrapperJNI.SwigDirector_FileProfile_Observer_OnAddEngineFailure(SdkWrapperJNI.java:2315)

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.