Eclipse Mqtt paho抛出java.lang.SecurityException:Manifest主要属性的签名文件摘要无效

时间:2015-01-28 04:35:22

标签: mqtt securityexception paho meta-inf

我正在使用mqtt作为客户端从mqtt代理获取messagaes。     以前我有0.2.1在clientId生成中有问题(超过23个字符会失败)

我看到修复程序在更高版本中完成,因此我升级到1.0.1。我从下面的存储库下载了1.0.1 jar

eclipse repo [/content/repositories/paho-releases/org/eclipse/paho/org.eclipse.paho.client.mqttv3/1.0.1/]

我得到:Invalid signature file digest for Manifest main attribute

我用谷歌搜索并找到解决问题的方法。我取下META-INF并再次拉上罐子。它暂时解决了我的问题。但这不应该像我理解的那样完成。

我找到了其他没有帮助的修补程序,例如将下面的配置放在我的pom中。

<pre>
    <exclude>META-INF/*.SF</exclude>
    <exclude>META-INF/*.DSA</exclude>
    <exclude>META-INF/*.RSA</exclude>
</pre>

后来我跑了jarsigner -verify org.eclipse.paho.client.mqttv3-1.0.1.jar

我得到了以下内容:

jar verified.

Warning: 
This jar contains entries whose signer certificate will expire within six months. 

签名者证书在6个月后到期。

我不确定是否应该下载同一个罐子。

1 个答案:

答案 0 :(得分:0)

Eclipse packages as and puts osgi bundles in their maven repo.
This is how I made it work: