When configuring my project's targeted runtime (I try to add Wildfly) via Project/Properties/Targeted Runtime/New), expand 'Red Hat JBoss Middleware' and choose 'JBoss AS, Wildfly, & EAP Server Tools' I get this message:
Unable to read repository at
https://download.jboss.org/jbosstools/updates/webtools/photon/content.xml.
Indeed when I try this URL from curl I get a certificate error. Ignoring that I get HTTP status 404. Looking up https://download.jboss.org/jbosstools/updates/webtools/photon/ I can see that indeed the file content.xml
does not exist. So either Eclipse may not like the certificate or is using the wrong URL.
How can I find out the exact problem, and even more: what can I do to fix it?
On my PC I freshly installed
Eclipse is running on the bundled JVM C:\Program Files\eclipse-jee-2023-12-R-win32-x86_64\eclipse\plugins/org.eclipse.justj.openjdk.hotspot.jre.full.win32.x86_64_17.0.9.v20231028-0858
My company has an intercepting proxy.
Getting more information about the issue is crucial, and this should have been the first hint actually:
Find the logfile in <Eclipse's workspace>/.metadata/.log
In there errors like this one became visible:
!ENTRY org.eclipse.equinox.p2.transport.ecf 2 0 2024-01-24 10:36:36.061
!MESSAGE Connection to https://download.jboss.org/jbosstools/updates/webtools/photon/site.xml failed on PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target. Retry attempt 0 started
!STACK 0
javax.net.ssl.SSLHandshakeException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
With that it is evident that the intercepting proxy is an issue. I used my default webbrowser and accessed the problematic url, then exported the root certificate used into a .pem file. Next, I used Portecle to import that into the Eclipse's VM's truststore at C:\Program Files\eclipse-jee-2023-12-R-win32-x86_64\eclipse\plugins\org.eclipse.justj.openjdk.hotspot.jre.full.win32.x86_64_17.0.9.v20231028-0858\jre\lib\security\cacerts
. After restarting Eclipse it would happily download all the addons - even updates.
Disadvantage: A new VM was downloaded, so I will have to patch that VM's truststore again...