eclipse-m2e / m2e-core

Eclipse Public License 2.0
110 stars 109 forks source link

m2e catgalog wizard is not working when open catalog is clicked #179

Open jimmybirrias opened 3 years ago

jimmybirrias commented 3 years ago

Hello M2E team I am looking for some help regarding with the m2e catalogs with the m2e connectors install wizard, I am getting the following error when I click Window > Preference > Maven > Discovery > Open catalog I got this message in the wizard:

image Also in the $workspace/.metadata/.log I am seeing this stack trace:

org.eclipse.core.runtime.CoreException: IO failure: cannot load discovery directory
        at org.eclipse.equinox.internal.p2.discovery.compatibility.RemoteBundleDiscoveryStrategy.performDiscovery(RemoteBundleDiscoveryStrategy.java:94)
        at org.eclipse.equinox.internal.p2.discovery.Catalog.performDiscovery(Catalog.java:85)
        at org.eclipse.m2e.internal.discovery.wizards.MavenCatalogViewer$2.run(MavenCatalogViewer.java:164)
        at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:119)
Caused by: org.eclipse.equinox.internal.p2.discovery.compatibility.util.IOWithCauseException: Feature 'http://javax.xml.XMLConstants/feature/secure-processing' is not recognized.
        at org.eclipse.equinox.internal.p2.discovery.compatibility.DirectoryParser.parse(DirectoryParser.java:43)

I have checked the catalog URL (http://download.eclipse.org/technology/m2e/discovery/directory-1.8.xml) and it is reachable: image

My question here is, is there a workaround for this issue?

vrubezhny commented 3 years ago

@jimmybirrias Could you please specify what is the version you're running on and tell if you are behind any proxy? Any Antivivirus Software installed which may block jar downloading? In case if it's possible, Could you please try to update to the latest version and try again?

Could you please also specify what JRE/SDK you're running on? Probably it worth to move to Java 11 in case you're on Java 8 and check if the problem still persist - m2e is not supported against Java 8; please use at least Java 11.

Thanks in advance

jimmybirrias commented 3 years ago

Thanks for the response @vrubezhny, I am not running eclipse behind of any proxy or vpn, I am running it using the following IBM SDK: java version "1.8.0_271" Java(TM) SE Runtime Environment (build 8.0.6.20 - pwa6480sr6fp20-20201120_02(SR6 FP20)) IBM J9 VM (build 2.9, JRE 1.8.0 Windows 10 amd64-64-Bit Compressed References 20201102_458768 (JIT enabled, AOT enabled) OpenJ9 - 5b31a42 OMR - 6ad3a34 IBM - b7e48f4) JCL - 20201119_01 based on Oracle jdk8u271-b09

vrubezhny commented 3 years ago

@jimmybirrias Thanks for the details.

Unfortunately, as I said, m2e is not supported against Java 8. So please use at least Java 11.

HTH

eliasbalasis commented 1 month ago

This is still failing on Eclipse 2024-06 running on Java 21 and either Windows 10 or 11

org.eclipse.equinox.p2.core.ProvisionException: An error occurred while downloading https://github.com/eclipse-m2e/m2e-discovery-catalog/releases/download/2.x/catalog-2.x.xml. The cache file <workspace>\.metadata\.plugins\org.eclipse.equinox.p2.discovery.compatibility\cache\downloading\discovery554145892 could not be renamed to <workspace>\.metadata\.plugins\org.eclipse.equinox.p2.discovery.compatibility\cache\discovery554145892.
    at org.eclipse.equinox.internal.p2.discovery.compatibility.util.CacheManager.updateCache(CacheManager.java:228)
    at org.eclipse.equinox.internal.p2.discovery.compatibility.util.CacheManager.createCache(CacheManager.java:137)
    at org.eclipse.equinox.internal.p2.discovery.compatibility.util.TransportUtil.readResource(TransportUtil.java:99)
    at org.eclipse.equinox.internal.p2.discovery.compatibility.RemoteBundleDiscoveryStrategy.performDiscovery(RemoteBundleDiscoveryStrategy.java:84)
    at org.eclipse.equinox.internal.p2.discovery.Catalog.performDiscovery(Catalog.java:88)
    at org.eclipse.m2e.internal.discovery.wizards.MavenCatalogViewer.lambda$1(MavenCatalogViewer.java:158)
    at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:124)

The problem is not present in Eclipse 2023-12 though.

This is shooting on the foot people wanting to upgrade.

christopherj89 commented 2 weeks ago

This is still failing on Eclipse 2024-06 running on Java 21 and either Windows 10 or 11

org.eclipse.equinox.p2.core.ProvisionException: An error occurred while downloading https://github.com/eclipse-m2e/m2e-discovery-catalog/releases/download/2.x/catalog-2.x.xml. The cache file <workspace>\.metadata\.plugins\org.eclipse.equinox.p2.discovery.compatibility\cache\downloading\discovery554145892 could not be renamed to <workspace>\.metadata\.plugins\org.eclipse.equinox.p2.discovery.compatibility\cache\discovery554145892.
  at org.eclipse.equinox.internal.p2.discovery.compatibility.util.CacheManager.updateCache(CacheManager.java:228)
  at org.eclipse.equinox.internal.p2.discovery.compatibility.util.CacheManager.createCache(CacheManager.java:137)
  at org.eclipse.equinox.internal.p2.discovery.compatibility.util.TransportUtil.readResource(TransportUtil.java:99)
  at org.eclipse.equinox.internal.p2.discovery.compatibility.RemoteBundleDiscoveryStrategy.performDiscovery(RemoteBundleDiscoveryStrategy.java:84)
  at org.eclipse.equinox.internal.p2.discovery.Catalog.performDiscovery(Catalog.java:88)
  at org.eclipse.m2e.internal.discovery.wizards.MavenCatalogViewer.lambda$1(MavenCatalogViewer.java:158)
  at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:124)

The problem is not present in Eclipse 2023-12 though.

This is shooting on the foot people wanting to upgrade.

facing the same issue with eclipse 2024-06

TB-HunBoka commented 7 hours ago

I was facing the same issue. Problem is it could not move the file from the downloading folder to the cache folder. (No idea why) If you see the "could not be renamed to" text in the error message then there is a workaround: copy the files from the downloading folder to cache. You have to do that twice. Here are the stepts:

  1. click Window > Preference > Maven > Discovery > Open catalog
  2. copy the file discovery554145892 from .metadata.plugins\org.eclipse.equinox.p2.discovery.compatibility\cache\downloading\ to .metadata.plugins\org.eclipse.equinox.p2.discovery.compatibility\cache\
  3. click Window > Preference > Maven > Discovery > Open catalog
  4. copy the file discovery-1503674835 from .metadata.plugins\org.eclipse.equinox.p2.discovery.compatibility\cache\downloading\ to .metadata.plugins\org.eclipse.equinox.p2.discovery.compatibility\cache\
  5. click Window > Preference > Maven > Discovery > Open catalog should work