首页 > 其他分享 >【Azure Developer】com.azure:azure-identity jar包版本从1.2.0 升级到1.12.2 版本之后报错

【Azure Developer】com.azure:azure-identity jar包版本从1.2.0 升级到1.12.2 版本之后报错

时间:2024-10-15 20:19:50浏览次数:3  
标签:aad msal4j 7.4 报错 版本 azure com microsoft

问题描述

com.azure:azure-identity jar包版本从1.2.0 升级到1.12.2 版本之后报错,错误信息如下:

An attempt was made to call a method that does not exist. The attempt was made from the following location:    com.azure.identity.implementation.IdentityClientBase.getConfidentialClient(IdentityClientBase.java:235)The following method did not exist:    com.microsoft.aad.msal4j.ConfidentialClientApplicationBuilder.logPii(Z)Lcom/microsoft/aad/msal4j/AbstractApplicationBaseBuilder;The calling method's class, com.azure.identity.implementation.IdentityClientBase, was loaded from the following location:    jar:file:/C:/java/soft/gradle-7.4.2-bin/gradle-7.4.2/caches/modules-2/files-2.1/com.azure/azure-identity/1.12.2/e12bc63202063589f68318bd5a1b4d1a8ae88fb6/azure-identity-1.12.2.jar!/com/azure/identity/implementation/IdentityClientBase.classThe called method's class, com.microsoft.aad.msal4j.ConfidentialClientApplicationBuilder,isavailablefromthefollowinglocations:jar:file:/C:/java/soft/gradle−7.4.2−bin/gradle−7.4.2/caches/modules−2/files−2.1/com.microsoft.azure/msal4j/1.11.0/38df9693f67ea1f01f35ebbe9411f0760c9ac77f/msal4j−1.11.0.jar!/com/microsoft/aad/msal4j/ConfidentialClientApplicationBuilder.classThe called method's class hierarchy was loaded from the following locations:    com.microsoft.aad.msal4j.ConfidentialClientApplication.Builder: file:/C:/java/soft/gradle-7.4.2-bin/gradle-7.4.2/caches/modules-2/files-2.1/com.microsoft.azure/msal4j/1.11.0/38df9693f67ea1f01f35ebbe9411f0760c9ac77f/msal4j-1.11.0.jar    com.microsoft.aad.msal4j.AbstractClientApplicationBase.Builder: file:/C:/java/soft/gradle-7.4.2-bin/gradle-7.4.2/caches/modules-2/files-2.1/com.microsoft.azure/msal4j/1.11.0/38df9693f67ea1f01f35ebbe9411f0760c9ac77f/msal4j-1.11.0.jarAction:Correct the classpath of your application so that it contains compatible versions of the classes com.azure.identity.implementation.IdentityClientBase and com.microsoft.aad.msal4j.ConfidentialClientApplication$Builder

 

错误分析

应用日志显示存在依赖管理错误导致的method not found 报错。

  • The following method did not exist:    com.microsoft.aad.msal4j.ConfidentialClientApplicationBuilder.logPii(Z)Lcom/microsoft/aad/msal4j/AbstractApplicationBaseBuilder;
  • The called method's class hierarchy was loaded from the following locations:    com.microsoft.aad.msal4j.ConfidentialClientApplication.Builder: file:/C:/java/soft/gradle-7.4.2-bin/gradle-7.4.2/caches/modules-2/files-2.1/com.microsoft.azure/msal4j/1.11.0/38df9693f67ea1f01f35ebbe9411f0760c9ac77f/msal4j-1.11.0.jar

需要调整class path以确保能读取到正确的依赖包。

Correct the classpath of your application so that it contains compatible versions of the classes com.azure.identity.implementation.IdentityClientBase and com.microsoft.aad.msal4j.ConfidentialClientApplication$Builder

综合以上,错误的原因是项目依赖中可能存在了多个版本的msal4j。当前解析出的msal4j-1.11.0.jar与升级后的azure-identity-1.12.2不兼容。

 


当在复杂的环境中面临问题,格物之道需:浊而静之徐清,安以动之徐生。 云中,恰是如此!

标签:aad,msal4j,7.4,报错,版本,azure,com,microsoft
From: https://blog.51cto.com/u_13773780/12260294

相关文章

  • Java的引擎效验报错-java.lang.VerifyError
    java包直接修改bytecode,经常会报错java.lang.VerifyError,包含非常多种的检查直接修改引擎dll文件去除效验jvm.dll-X64-V21.0.0.0.text:000000018084438F488D0DDA422100learcx,aVerifyingMetho;"Verifyingmethod%s".text:00000001......
  • 【Azure Developer】com.azure:azure-identity jar包版本从1.2.0 升级到1.12.2 版本之
    问题描述com.azure:azure-identityjar包版本从1.2.0升级到1.12.2版本之后报错,错误信息如下:Anattemptwasmadetocallamethodthatdoesnotexist.Theattemptwasmadefromthefollowinglocation:  com.azure.identity.implementation.IdentityClientBase.get......
  • 《统治者:罗马》游戏崩溃报错?解决《统治者:罗马》“An error has occured“崩溃问题的有
    《统治者:罗马》游戏崩溃报错,特别是出现"Anerrorhasoccured"这样的错误提示时,确实会让玩家感到困扰。以下是一些解决这一崩溃问题的有效方法:一、检查电脑配置确认配置要求:首先,确保你的电脑配置满足《统治者:罗马》的最低配置要求。如果配置不足,游戏可能会出现崩溃或运行不......
  • 拳皇14报错找不到vcomp120.dll?几个解决拳皇14 vcomp120.dll丢失问题有效方式
    当拳皇14报错找不到vcomp120.dll时,这通常意味着游戏所需的某个关键动态链接库文件(DLL)缺失。以下是一些有效解决拳皇14vcomp120.dll丢失问题的方式:一、重新安装游戏卸载当前游戏:首先,从计算机上完全卸载拳皇14游戏。清理残留文件:确保卸载过程中没有残留文件,特别是与vcomp120.......
  • ssh-add 报错:Error connecting to agent No such file or directory
    问题描述在添加SSH时报错Errorconnectingtoagent:Nosuchfileordirectory解决方法1.打开PowerShell管理员身份打开WindowsPowerShell2.查看服务是否启动get-servicessh*3.启动服务Set-Service-Namessh-agent-StartupTypeManualStart-Servicessh......
  • 关于最新版本mysql9,使用Kettle连接Mysql 9 报错,驱动问题
    使用kettle连接mysql时,报“Driverclassorg.gjt.mm.mysql.Drivercouldnotbefound”错,没有需要的connector包,在Mysql官网下载了最新的connector的jar包,并将其放在如下图的Kettle所示的目录中:重试发现仍然连接失败。这时候对比了网上大家的解决方法,发现我所下载的最新conne......
  • 双十一将近,如何解决API接口调用数据超量及报错问题?
    随着双十一的临近,电商平台的API接口面临着巨大的挑战,尤其是在数据超量和报错问题上。以下是一些解决方案和最佳实践,可以帮助你一站式解决这些问题。1.性能测试在大促期间,如双十一,流量会大幅增长,因此进行性能测试是必要的。性能测试包括负载测试、基线测试、冒烟测试、浸泡......
  • Azure Storage (31) Azure File审核下载日志
    《WindowsAzurePlatform系列文章目录》 一.需求:1.有1个AzureCLI的命令,叫azstoragefiledownload--path--share-name[--account-key][--account-name]具体可以参考:https://learn.microsoft.com/en-us/cli/azure/storage/file?view=azure-cli-lat......
  • Docker部署最新版本EMQX服务,上干货不废话
    1.拉取emqx镜像:dockerpullemqx/emqx:latest 显示如上即代表拉取成功2.使用dockerimages 查看镜像 4.启动emqx服务dockerrun-d-v/etc/localtime:/etc/localtime:ro-p18083:18083-p1883:1883-p8083:8083emqx/emqx:latest 说明已经成功启动5.去......
  • 过滤器拦截器拦截了request后,controller的@RequestBody 无法获取request内容,报错 Requ
    SpringMVC的拦截器、过滤器、Controller之间的关系 众所周知所有的post请求中的body参数是已流形式存在的,而流数据只能读取一次(为啥看这里),如果在拦截器和过滤器中需要对post参数进行处理的话,就会报Requiredrequestbodyismissing异常。既然知道原因,那只要能将流保存起来......