Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing dependency on jersey-jackson bundle on STS 4.7. Eclipse 4.14 update site? #497

Closed
kdvolder opened this issue Jun 30, 2020 · 19 comments
Milestone

Comments

@kdvolder
Copy link
Member

See: #495 (comment)

@kdvolder
Copy link
Member Author

kdvolder commented Jun 30, 2020

I've taken a quick peek inside the sts4 update site zip.

Eclipse 4.16:

-rw-r--r-- 1 kdvolder kdvolder   58553 Jun 18 06:33 org.glassfish.jersey.apache.connector_2.30.1.v20200513-1859.jar
-rw-r--r-- 1 kdvolder kdvolder  269096 Jun 18 06:33 org.glassfish.jersey.core.jersey-client_2.30.1.v20200513-1859.jar
-rw-r--r-- 1 kdvolder kdvolder 1243247 Jun 18 06:33 org.glassfish.jersey.core.jersey-common_2.30.1.v20200513-1859.jar
-rw-r--r-- 1 kdvolder kdvolder  982636 Jun 18 06:33 org.glassfish.jersey.core.jersey-server_2.30.1.v20200513-1859.jar
-rw-r--r-- 1 kdvolder kdvolder  102201 Jun 18 06:33 org.glassfish.jersey.ext.entityfiltering_2.30.1.v20200513-1859.jar
-rw-r--r-- 1 kdvolder kdvolder  174459 Jun 18 06:33 org.glassfish.jersey.inject.jersey-hk2_2.30.1.v20200512-1802.jar
-rw-r--r-- 1 kdvolder kdvolder   90991 Jun 18 06:33 org.glassfish.jersey.media.jersey-media-json-jackson_2.30.1.v20200513-1859.jar

Eclipse 4.14:

-rw-r--r-- 1 kdvolder kdvolder   58553 Jun 18 05:01 org.glassfish.jersey.apache.connector_2.30.1.v20200513-1859.jar
-rw-r--r-- 1 kdvolder kdvolder  269096 Jun 18 05:01 org.glassfish.jersey.core.jersey-client_2.30.1.v20200513-1859.jar
-rw-r--r-- 1 kdvolder kdvolder 1243247 Jun 18 05:01 org.glassfish.jersey.core.jersey-common_2.30.1.v20200513-1859.jar
-rw-r--r-- 1 kdvolder kdvolder  982636 Jun 18 05:01 org.glassfish.jersey.core.jersey-server_2.30.1.v20200513-1859.jar
-rw-r--r-- 1 kdvolder kdvolder  102201 Jun 18 05:01 org.glassfish.jersey.ext.entityfiltering_2.30.1.v20200513-1859.jar
-rw-r--r-- 1 kdvolder kdvolder  174459 Jun 18 05:01 org.glassfish.jersey.inject.jersey-hk2_2.30.1.v20200512-1802.jar
-rw-r--r-- 1 kdvolder kdvolder   90991 Jun 18 05:01 org.glassfish.jersey.media.jersey-media-json-jackson_2.30.1.v20200513-1859.jar

@kdvolder
Copy link
Member Author

I tried the following:

This installed fine and I didn't notice any problems with the resulting Eclipse instance.

I didn't try an upgrade scenario, but it seems that at least the required dependencies, including the jersey-jackson bundle in the error message. are all available from STS update site to be able to install in a 'minimal' Eclipse for Java developers.

@mauromol, perhaps this was a temporary issue caused by, for example, some stale cached data in your Eclipse instance. This happens quite commonly as Eclipse is somewhat agressive in caching data from update sites and the kind of error one often gets in the case is typically similar to your error (I guess Eclipse can't find the dependency because it has cached some data telling it wasn't there, or something like that).

Could you please try again and see if the problem persists?

Also for reference, these are the update sites I end up with in my 'minimal' instance:

@kdvolder
Copy link
Member Author

PS: There's a 'Reload' button on the 'Available Update Sites' peferences page that can be useful to try and force Eclipse to flush out stale data (though some experience suggests even clicking the button doesn't allways flush the data as you might expect). If all else fails you can edit the urls in trivial ways such as adding / removing a / at the end.

If none of this works we may need to look deeper but I'm hoping its really just a stale / cached data issue.

@mauromol
Copy link

mauromol commented Jul 1, 2020

First attempt with "check for updates" today, and still have this problem:

immagine

immagine

I'm going to try your suggestions.

@mauromol
Copy link

mauromol commented Jul 1, 2020

After clicking "Reload" for STS update site, it still doesn't work. Looking better at the error message, though, it seems like that the actually missing package is not 'jersey-media-json-jackson 2.30.1.v20200513-1859 (org.glassfish.jersey.media.jersey-media-json-jackson 2.30.1.v20200513-1859)', but rather 'java.package; com.fasterxml.jackson.core [2.10.0,3.0.0)'.

@mauromol
Copy link

mauromol commented Jul 1, 2020

Ok Kris, so the situation is this. I pressed "reload" on all my update sites, with no progress. Then I even further reduced my update sites to the minimal ones:

I still get the same error. Compared to your setup, I don't have:

Indeed, once I add "http://download.eclipse.org/releases/latest" to my update sites, the "Check for updates" is successful, no more missing dependencies, but the upgrade to Eclipse Platform 4.16 (together with WTP, etc.) is also proposed.

So, if I understand it right, the problem is that the transitively required com.fasterxml.jackson.core dependency is missing from the old official update sites and also from the STS update site.

What do you think?

(BTW: if I just add https://download.springsource.com/release/TOOLS/sts4-language-servers/e4.8, without http://download.eclipse.org/releases/latest, I still get the same error)

@kdvolder
Copy link
Member Author

kdvolder commented Jul 2, 2020

So, if I understand it right, the problem is that the transitively required com.fasterxml.jackson.core dependency is missing from the old official update sites and also from the STS update site.

Yes I think you are probably right. I can see that version 2.10.3 is available from the latest orbit:
https://download.eclipse.org/tools/orbit/downloads/drops/R20200529191137/

But the previous drop:
https://download.eclipse.org/tools/orbit/downloads/drops/R20200224183213/

... only has version 2.9.9 of the com.fasterxml.jackson family of bundles. So that means fasterxml more recent versions are not part of the Eclipse 4.14 eco system of update sites.

It was our intention to include these extra requirements for the jersey client in our own update site to allow installation into older Eclipses. But it seems like the jackson core bundel is (at least) one dependency that was missed somehow.

You can test this hypothesis by installing the missing jackson bundle (or bundles, as it may be the case that once you add one missing bundle, other "missing bundle" errors start coming out of the woodwork too).
The most recent drop of orbit should have everything that's missing:

https://download.eclipse.org/tools/orbit/downloads/drops/R20200529191137/

I suggest doing this in a 'controlled' fashion similar to what I suggested before, install just what seems needed to satisfy the missing dependency and then remove the update site again (to avoid pulling in more stuff from Eclipse 4.16 eco system by accident in future).

@kdvolder
Copy link
Member Author

kdvolder commented Jul 2, 2020

http://download.eclipse.org/releases/latest - I think this is something like a "rolling repository" for Eclipse simultaneous releases; I don't think I should have it, and indeed it's not there by default as soon as you download the Eclipse Runtime Platform binary; I guess I should add it on my own if I want my Eclipse instance to automatically update itself across major releases

Not totally sure where the update site came from. I did not manually add it. You say its not part automatically when downloading vanilla Eclipse, and I'll take your word for it. So I guess it must have been added automatically when installing STS from update site. (Since these were the only two steps in my process).

I gather the reason we missed the jackson dependency in our STS update site is probably because our testing before has worked in the same way.

But I agree it probably doesn't make sense for a user who is deliberately trying to hold back on an older version of Eclipse, to have that update site listed in their 'Available update sites'.

So... my conclusion is (thanks in large part to your careful analysis and details you provided :-)... this is indeed a packaging issue in STS 4 update sites.

Action items for us:

  • determine precisely where the 'http://download.eclipse.org/releases/latest` update site comes from and consider removing it from update sites for older eclipses.
  • add all missing dependencies for the jersey client to our update site (starting with com.fasterxml.jackson.core:2.10.3).

@mauromol
Copy link

mauromol commented Jul 2, 2020

The most recent drop of orbit should have everything that's missing:

https://download.eclipse.org/tools/orbit/downloads/drops/R20200529191137/

Hi Kris, unfortunately "No repository found at https://download.eclipse.org/tools/orbit/downloads/drops/R20200529191137/", so I can't test this hypothesis.

@martinlippert
Copy link
Member

This update site is the main Eclipse update site that comes as the default update site with the Eclipse packages and is also installed by default via the STS4 product definition. And I think this should stay this way. It is the official update policy of the Eclipse packages to have that update site in place and to let it point to the latest Eclipse version, so that users will get that latest Eclipse version automatically. The STS4 product definition follows the same path. Therefore we should not remove that from the product definition and we should not try to remove that update site from existing installs while during an update process to a newer STS4 version or anything like that.

If people decide to stay on an older Eclipse platform version, they should manually remove the references to the "latest" Eclipse platform update site as well as references to the "latest" STS4 update site repository - and instead keep the platform-specific update sites in the preferences.

@martinlippert
Copy link
Member

  • add all missing dependencies for the jersey client to our update site (starting with com.fasterxml.jackson.core:2.10.3).

big +1 to this one

@kdvolder
Copy link
Member Author

kdvolder commented Jul 3, 2020

Hi Kris, unfortunately "No repository found at https://download.eclipse.org/tools/orbit/downloads/drops/R20200529191137/", so I can't test this hypothesis.

Oh sorry, that is just the webpage for that drop, not the p2 repository url. But you can find all information about that particular drop on the webpage, including the repo url which is: https://download.eclipse.org/tools/orbit/downloads/drops/R20200529191137/repository

@kdvolder
Copy link
Member Author

kdvolder commented Jul 3, 2020

https://download.springsource.com/release/TOOLS/sts4-language-servers/e4.8 - this is marked for "e4.8", so I think it's something old?

I checked up on this one quickly. It does indeed appear to be an old update site. Downloaded its contents and it appears to be a composite update site which points to a version of the language servers update site from 2018:

<child location="https://download.springsource.com/release/TOOLS/sts4-language-servers/20180406/"/>

That site probably shouldn't be there. So finding where it came from and removing is one more action item to add to the list. All I did was install STS 4 from update site into brand-new Eclipse 4.14, so that site also must have come in somehow from the update site or one of its components.

@kdvolder
Copy link
Member Author

kdvolder commented Jul 3, 2020

Downloaded/installed another fesh Eclipse 4.14 for Java Developers to double check whether or not it comes with the http://download.eclipse.org/releases/latest update site automatically configured, and yes, that appears to be the case. We don't control this and I agree with Martin that STS product should just do the same thing as Eclipse. (Meaning it is up to the user to disable or remove it manually if they don't want to pull in dependencies from it automatically).

@kdvolder
Copy link
Member Author

kdvolder commented Jul 3, 2020

Easily repeatable test scenario that exposes the 'missing dependency' (recording it here for myself so I can repeat these steps exactly later to verify all dependencies are present after I attempt to fix packaging issue :-)

Similarly reproducible for Eclipse 4.15:

@mauromol
Copy link

mauromol commented Jul 3, 2020

Oh sorry, that is just the webpage for that drop, not the p2 repository url. But you can find all information about that particular drop on the webpage, including the repo url which is: https://download.eclipse.org/tools/orbit/downloads/drops/R20200529191137/repository

Indeed, I could have been smart enough to get it by myself... :-P Anyway, yes, after adding this update site, the "Check for Updates" on my 2019-12 to install STS 4.7.0 is successful and doesn't show any conflict any more!

@kdvolder
Copy link
Member Author

kdvolder commented Jul 3, 2020

I found where the ...language-servers/e48 update site is coming from:
https:/spring-projects/sts4/blob/7ff8dba90993df3e3b51462148c98f80733ec740/eclipse-language-servers/org.springframework.tooling.cloudfoundry.manifest.ls.feature/p2.inf

Not sure about whether it can/should be safely removed or not as I'm not totally sure why it is there. So I'll leave this upto @martinlippert to decide.

In the mean time, I have added some missing dependencies to the STS 4 update sites.

There won't be a fix for e414 site because the upcoming STS 4.7.1 release no longer supports e414. Our CI build therefore no longer produces Eclipse 4.14 update site. However it was still important to get this fixed regardless since e415 has the same problem.

Waiting now on CI build to double-check that the 'fixed' e415 update site works.

@kdvolder
Copy link
Member Author

kdvolder commented Jul 3, 2020

Waiting now on CI build to double-check that the 'fixed' e415 update site works.

Seems to be working fine for me now with the snapshot update site:
https://dist.springsource.com/snapshot/TOOLS/sts4/nightly/e4.15

@martinlippert
Copy link
Member

I double checked the install procedure on pure Eclipse Java packages without any p2 repository enabled in the preferences except for the Spring Tools 4 ones. Seems to work now just fine.

I also removed the outdated update site from the p2.inf file and added a remove task to automatically remove the update site from the preferences of existing installations when you install the update.

Should all be available as part of the upcoming 4.7.1 release.

@martinlippert martinlippert added this to the 4.7.1.RELEASE milestone Jul 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants