cloud版本引入第三方jar包运行报错

Blade 未结 2 87
联科吴
联科吴 2024-07-23 17:11

一、该问题的重现步骤是什么?

1. 引入了第三方sdk,在免费版运行无问题,企业版就报错


二、你期待的结果是什么?实际看到的又是什么?

正常运行,打包正常

三、你正在使用的是什么产品,什么版本?在什么操作系统上?

bladeX,企业版,windows

四、请提供详细的错误堆栈信息,这很重要。


Description:


An attempt was made to call a method that does not exist. The attempt was made from the following location:


    cn.com.agree.cipher.jwt.JWT.base64UrlEncode(JWT.java:515)


The following method did not exist:


    'void io.jsonwebtoken.lang.Assert.isInstanceOf(java.lang.Class, java.lang.Object, java.lang.String)'


The calling method's class, cn.com.agree.cipher.jwt.JWT, was loaded from the following location:


    jar:file:/D:/%e9%a1%b9%e7%9b%ae/Liandoo/trunk/Head/blade-service/ldkj-pay/src/main/resources/lib/api-sdk-1.9.133.jar!/cn/com/agree/cipher/jwt/JWT.class


The called method's class, io.jsonwebtoken.lang.Assert, is available from the following locations:


    jar:file:/D:/NICK/maven%e5%ba%93/sy-blade-repository/io/jsonwebtoken/jjwt-api/0.12.5/jjwt-api-0.12.5.jar!/io/jsonwebtoken/lang/Assert.class

    jar:file:/D:/%e9%a1%b9%e7%9b%ae/Liandoo/trunk/Head/blade-service/ldkj-pay/src/main/resources/lib/api-sdk-1.9.133.jar!/io/jsonwebtoken/lang/Assert.class


The called method's class hierarchy was loaded from the following locations:


    io.jsonwebtoken.lang.Assert: file:/D:/NICK/maven%e5%ba%93/sy-blade-repository/io/jsonwebtoken/jjwt-api/0.12.5/jjwt-api-0.12.5.jar



Action:


Correct the classpath of your application so that it contains compatible versions of the classes cn.com.agree.cipher.jwt.JWT and io.jsonwebtoken.lang.Assert


与目标 VM 断开连接, 地址为: ''127.0.0.1:23182',传输: '套接字''


进程已结束,退出代码1

五、若有更多详细信息,请在下面提供。

引入平安银行的sdk

来源:银行提供的sdk 版本 1.9.133

引用之后,启动自动加载这个方法,报上述错误

ApiClient = ApiClient.()

2条回答
  •  admin
    admin (楼主)
    2024-07-24 09:25

    jjwt的版本冲突了,开源版的版本应该是和sdk一样,所以可以用。

    bladex的jjwt升级到新版本了,底层api有变动。sdk版本较低,所以api接口报错了。

    解决办法就是给sdk升级适配新版本jjwt或者给bladex的jjwt降级,再修改成老版本api来解决。

提交回复