将Azure SDK版本升级到1.7.0后,身份验证代码失败java.lang.NoClassDefFoundError:

时间:2018-03-16 11:16:09

标签: azure authentication aws-java-sdk

After upgrading the Azure SDK version to 1.7.0, authentication code failed with "java.lang.NoClassDefFoundError: com/microsoft/azure/management/batchai/implementation/BatchAIManager"

我的验证码是

/ **      *默认构造函数。      * /     public 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();
    }
}

1 个答案:

答案 0 :(得分:0)

这看起来是maven问题。依赖项已下载并在.m2目录中显示,但未在Eclipse Maven依赖项中加载。我从.m2中删除了azure目录并再次编译它解决了问题。

相关问题