Search code examples
eclipsespring-tool-suiteeclipse-marketplacespring-tools-4

Spring Tool Suite 4 (STS) not able to open Marketplace. No proxy in connection


I'm using latest STS version 4.7 on Windows 10 Enterprise. I don't have any proxy to connect to internet. I don't need to configure any proxy to browse internet as well.

I'm facing strange problem. Whenever I click on Eclipse Marketplace, I just see a message box Titled "Progress Information" with progress bar. Message is "Retrieving data from http://marketplace.eclipse.org.

The progress bar goes upto 80% and gets stuck there. No errors reported. I can't even cancel it.

I unfortunately have to kill the STS and start again. I tried all solutions on the stackoverflow.

  1. Checking Network Connection settings,
  2. Adding -Djava.net.preferIPv4Stack=true switch to VM args And any other options suggested but its not working.

What exactly is happening here? Why STS hangs and

  1. doesn't even allow me to cancel?
  2. or report any error or timeout in connecting to the internet?

I can access http://marketplace.eclipse.org from my browser without any proxy.

enter image description here

Further irony is I'm able to open http://marketplace.eclipse.org from Internal Web Browser in STS. But direct Eclipse Marketplace gets stuck and hangs the STS. Only way to get out is to kill the process.

Please see, I have opened Marketplace URL in STS using Internal Web Browser but attempt to open direct Eclipse Marketplace has hanged the STS. Now I have to kill the process tree.

enter image description here


Solution

  • This is a problem with the JDK in use. I was using openjdk-13.0.2_windows-x64_bin. I am using openjdk-14.0.1_windows-x64_bin and STS is able to launch Marketplace now.

    But I'm not sure what exactly changed inside the JDK. Because on my old laptop I never faced this problem with same JDK. In any case STS v 4.7 has a bug and it MUST not hang. If it can't connect to internet or complete certain operation it should give an error/timeout and fail. Not hang without giving any error and leave user in dilemma what exactly went wrong.

    So any of you get into such situation try changing the JDK before spending hours finding what is wrong with internet connection or STS/Eclipse's ability to connect to the Internet.

    If you are interested in story to come to this conclusion here it is,

    Background (I know part of it is in the question but I want to elaborate about this subtle but very annoying problem anyone may get into) I was facing this problem when I installed STS on brand new laptop. I copied the JDK distribution (openjdk-13.0.2_windows-x64_bin) as it is from my old laptop, set the JAVA_HOME env variable to point to the copied JDK distro folder. Updated PATH env variable to add JAVA_HOME/bin. Downloaded latest STS (sts-4.7.0.RELEASE) and launched the STS. I don't have any internet proxy in between so no question of changing network connection settings. Nothing else changed. The Eclipse Marketplace launch was hanging the STS completely.

    After trying everything that I have described in question, I noticed at the startup of STS I was also seeing "Error:Could not initialize class javax.crypto.JceSecurity" in Gradle initialization but I don't use Gradle so I was ignoring this error. Now I searched this and got this thread Error:Could not initialize class javax.crypto.JceSecurity. Though I'm not doing android development, still I decided to try it. The solution there didn't work.

    So I decided to change the full JDK and try. I took openjdk-14.0.1_windows-x64_bin, updated relevant env settings (JAVA_HOME etc,) and launched STS version 4.7. To my surprise I didn't see any error at startup and even Eclipse Marketplace launched quickly.