【发布时间】:2018-03-16 11:16:09
【问题描述】:
After upgrading the Azure SDK version to 1.7.0, authentication code failed with "java.lang.NoClassDefFoundError: com/microsoft/azure/management/batchai/implementation/BatchAIManager"
我的验证码是
/** * 默认构造函数。 */ 公共 Azure() {
try {
credentials = new ApplicationTokenCredentials(Config.AzureclientId_admin, Config.AzuretenantId_admin,
Config.Azuresecret_admin, AzureEnvironment.AZURE);
azure = com.microsoft.azure.management.Azure.authenticate(credentials)
.withSubscription(Config.AzuresubscriptionId_admin);
} catch (Exception ex) {
Log.Message("Unable to create the Azure object", LogLevel.ERROR);
ex.printStackTrace();
}
}
【问题讨论】:
-
这看起来是 maven 问题。该依赖项已下载并在 .m2 目录中查看,但未在 Eclipse Maven 依赖项中加载。我从 .m2 中删除了 azure 目录并再次编译它解决了这个问题。
标签: azure authentication aws-java-sdk