3

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 enter image description here

Any idea what's wrong ?

Siva R
  • 427
  • 2
  • 8
  • 23
  • Seems it is an issue with Java security. I've upgraded %JAVA_HOME%/jre/lib/security to unlimited security(local_policy.jar and US_export_policy.jar) and restarted eclipse. Still the same problem – Siva R Feb 09 '17 at 06:13
  • For anybody facing this kind of issue, and if provided solutions don't work for you, you can try checking my solution on this question (import from another Eclipse installation): https://stackoverflow.com/a/73865229/9725841 – mihallievich Sep 27 '22 at 09:26

3 Answers3

4

It's probably one of the following two cases:

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.

Community
  • 1
  • 1
adangel
  • 1,816
  • 14
  • 17
  • It seems to depend a bit on the mirror, but some apparently do need the unlimited strength JCE policy, others don't. But all of them seem to be using Let's Encrypt certificates these days. Contrary to what Let's Encrypt claims, the root cert wasn't in Java 8.101 for me, but at least 8.121 had it. If you can't update your Java, or your global trust store, you can also set a custom trust store for your Eclipse. – Carsten Mar 16 '17 at 19:23
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

Siva R
  • 427
  • 2
  • 8
  • 23
  • Note that for any recent release of Java this is no longer the case. Per cranphin's answer to this SO question https://stackoverflow.com/questions/1179672/how-to-avoid-installing-unlimited-strength-jce-policy-files-when-deploying-an/39889731#39889731 "This is now no longer needed for Java 9, nor for any recent release of Java 6, 7, or 8.". – skomisa Jan 11 '18 at 01:38
0

InstallPMDplugin1

  • 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:

enter image description here

  • 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.)

skomisa
  • 16,436
  • 7
  • 61
  • 102