gpt4 book ai didi

java - Windows Azure Java SDK keystore 路径问题

转载 作者:行者123 更新时间:2023-11-30 03:43:02 24 4
gpt4 key购买 nike

我正在尝试在 Windows 7 计算机中设置Windows Azure Java SDK遵循他们的 Wiki 设置页面 https://github.com/Azure/azure-sdk-for-java/wiki/Devbox-Setup

当我运行测试用例/尝试访问 Azure REST Web 服务 URL 时,出现以下错误。

set management.keystore.path=E:/Program Files (x86)/Java/jdk1.7.0_51/jre/lib/security/clientcert.jks

Windows Azure Java SDK keystore 路径问题

java.lang.IllegalArgumentException: The keystore path cannot be null or empty.
at com.microsoft.windowsazure.core.utils.SSLContextFactory.create(SSLContextFactory.java:86)
at com.microsoft.windowsazure.core.utils.SSLContextFactory.create(SSLContextFactory.java:60)
at com.microsoft.windowsazure.credentials.CertificateCloudCredentials.applyConfig(CertificateCloudCredentials.java:128)
at com.microsoft.windowsazure.core.pipeline.apache.Exports$2.create(Exports.java:51)
at com.microsoft.windowsazure.core.pipeline.apache.Exports$2.create(Exports.java:1)
at com.microsoft.windowsazure.core.DefaultBuilder.build(DefaultBuilder.java:200)
at com.microsoft.windowsazure.core.pipeline.apache.Exports$3.create(Exports.java:65)
at com.microsoft.windowsazure.core.pipeline.apache.Exports$3.create(Exports.java:1)
at com.microsoft.windowsazure.core.DefaultBuilder.build(DefaultBuilder.java:200)
at com.microsoft.windowsazure.core.DefaultBuilder$1.create(DefaultBuilder.java:138)
at com.microsoft.windowsazure.core.DefaultBuilder.build(DefaultBuilder.java:200)
at com.microsoft.windowsazure.Configuration.create(Configuration.java:113)
at com.microsoft.windowsazure.management.storage.StorageManagementService.create(StorageManagementService.java:47)
at com.microsoft.windowsazure.management.compute.ComputeManagementIntegrationTestBase.createStorageManagementClient(ComputeManagementIntegrationTestBase.java:63)
at com.microsoft.windowsazure.management.compute.VirtualMachineOperationsTests.setup(VirtualMachineOperationsTests.java:61)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:24)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)

java.lang.NullPointerException
at com.microsoft.windowsazure.management.compute.VirtualMachineOperationsTests.cleanHostedService(VirtualMachineOperationsTests.java:452)
at com.microsoft.windowsazure.management.compute.VirtualMachineOperationsTests.cleanup(VirtualMachineOperationsTests.java:79)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:33)
at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)

最佳答案

尝试切换到最新版本的 Java SDK。我在这里写了一个非常基本的操作指南,可能会帮助您解决 JKS 问题。看起来您使用的命名空间来自早期版本。

http://azure.microsoft.com/blog/2014/09/15/getting-started-with-the-azure-java-management-libraries/

关于java - Windows Azure Java SDK keystore 路径问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26402279/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com