Eclipse pmd plug-in handshake failure

大城市里の小女人 提交于 2019-12-24 02:57:14

问题


I'm trying to add eclipse pmd plug-in ended up with the following error.

Unable to read repository at https://sourceforge.net/projects/pmd/files/pmd-eclipse/update-site/content.xml. Received fatal alert: handshake_failure

Any idea what's wrong ?


回答1:


It's probably one of the following two cases:

  • Either the cipher is not supported by your JRE - see answer https://stackoverflow.com/a/42129608/1169968 to install the JCE security patch to allow unlimited security (local_policy.jar and US_export_policy.jar)

  • The JRE version, you are using, doesn't trust Let's Encrypt certificates, that are used by some of the sourceforge mirrors. You need at least Java 7 Update 111 or Java 8 Update 101. See https://letsencrypt.org/docs/certificate-compatibility/

But even then, the eclipse update site hosted on sourceforge seems to be very unreliable - the mirrors are not always 100% in sync, so some files might be missing...

Therefore, see https://github.com/pmd/pmd-eclipse-plugin/issues/19 for an workaround:

download the update site as a zip archive from https://github.com/pmd/pmd-eclipse-plugin/releases , unpack it locally and use this folder as an update site.

Update (2017-03-18)

A new update-site is available now:

https://dl.bintray.com/pmd/pmd-eclipse-plugin/updates/

Please use this url from now on, to install the plugin.




回答2:


This is because of java security. Replace jars(two jars namely local_policy.jar and US_export_policy.jar) in %JRE%/lib/security with jars in http://www.oracle.com/technetwork/java/javase/downloads/jce-7-download-432124.html

Note: Here %JRE% means the jre location which eclipse is using. Find it at Windows -> Preference -> Java -> Installed JREs




回答3:


  • Firstly, unless you are using an old update of Java (regardless of Java version), issues relating Java Cryptography Extension (JCE) are now completely irrelevant. See cranphin's answer on this SO post: How to avoid installing "Unlimited Strength" JCE policy files when deploying an application?

  • Secondly, DO NOT USE sourceforge to download the plugin. Like the OP and many others, I also got that handshake_failure.

  • The approach that worked for me was to go to Eclipse Marketplace (https://marketplace.eclipse.org/content/eclipse-pmd) and drag the Install button on that page into the Eclipse workspace.

  • After doing that you should see the following screen in Eclipse:

  • Click Confirm, accept the license agreement and then click Install anyway when the unsigned content dialog is shown. If all goes well the plugin will be installed and you will be invited to restart Eclipse.

  • Once Eclipse has restarted, verify that the plugin is installed: Help->About->Installation Details->Installed Software:

  • As a final sanity check, review the Error Log (Window->Show View->Error Log) to verify that there are no stack traces or error messages following the most recent restart of Eclipse.

That's it. (My environment was Windows 10 + Eclipse Oxygen.2 Release (4.7.2) + JDK9.)



来源:https://stackoverflow.com/questions/42128981/eclipse-pmd-plug-in-handshake-failure

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!