965 Star 7.6K Fork 3.2K

GVP张红元 / iot-dc3

 / 详情

启动mqtt报这个错是什么原因请问

待办的
创建于  
2022-12-14 10:58

输入图片说明

评论 (2)

lebronlzz 创建了任务

启动mqttDriver确实会爆下面这个错误:

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'mqttInbound' defined in class path resource [io/github/pnoker/driver/config/MqttConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.integration.core.MessageProducer]: Factory method 'mqttInbound' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'mqttClientFactory' defined in class path resource [io/github/pnoker/driver/config/MqttConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.integration.mqtt.core.MqttPahoClientFactory]: Factory method 'mqttClientFactory' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'getMqttConnectOptions' defined in class path resource [io/github/pnoker/driver/config/MqttConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.eclipse.paho.client.mqttv3.MqttConnectOptions]: Factory method 'getMqttConnectOptions' threw exception; nested exception is java.lang.BootstrapMethodError: java.lang.SecurityException: class "org.bouncycastle.openssl.PasswordFinder"'s signer information does not match signer information of other classes in the same package

会的大佬,能帮忙看下什么问题??

解决办法如下:
表明是jar包冲突,解决办法:
第一步:连按2次shift键搜索PasswordFinder类所属的jar包信息(包名信息:bcprov+group信息:bouncycastle)
第二步:idea安装maven helper插件,利用此插件找到并排除冲突的jar包
输入包名信息:bcprov或者group信息:bouncycastle,来搜索冲突的jar包,选择All Dependency as list
第三步:在最右边的框里面exclude掉bcpkix
第四步:重启MqttDeriver这个应用,发现没有报class 'PasswordFinder' 错误了

登录 后才可以发表评论

状态
负责人
里程碑
Pull Requests
关联的 Pull Requests 被合并后可能会关闭此 issue
分支
开始日期   -   截止日期
-
置顶选项
优先级
参与者(2)
Java
1
https://gitee.com/pnoker/iot-dc3.git
git@gitee.com:pnoker/iot-dc3.git
pnoker
iot-dc3
iot-dc3

搜索帮助