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

Problems resolving provisioning plan with osgi.contract #322

Open
laeubi opened this issue Sep 19, 2023 · 8 comments
Open

Problems resolving provisioning plan with osgi.contract #322

laeubi opened this issue Sep 19, 2023 · 8 comments

Comments

@laeubi
Copy link
Member

laeubi commented Sep 19, 2023

In platform builds we see a lot of these warnings

Warning: Problems resolving provisioning plan.: [Unable to satisfy dependency from org.osgi.service.http 1.2.2.202109301733 to java.package; javax.servlet [2.1.0,3.0.0).; Unable to satisfy dependency from org.osgi.service.http 1.2.2.202109301733 to java.package; javax.servlet.http [2.1.0,3.0.0).; Unable to satisfy dependency from org.osgi.service.http.whiteboard 1.1.1.202109301733 to osgi.contract; (&(osgi.contract=JavaServlet)(version=3.1.0)).]

it seems for some reason P2 does not understand the osgi.contract ... and if it does I'm curious why this is a WARNING and not an ERROR? Because at runtime it would mean that the bundle can not be resolved (@bjhargrave @tjwatson please correct me if I'm wrong) if there is really no provider for the required contract.

@tjwatson
Copy link
Contributor

It would help if there was some context for the question. What is pulling in the org.osgi.service.http.whiteboard bundle?

Much of was discussed about the JavaServlet osgi.contract capability in eclipse-equinox/equinox.framework#44

Are we again trying to pull in org.osgi.service.http.whiteboard

@merks
Copy link
Contributor

merks commented Sep 19, 2023

Not that this is a helpful comment, but I get this validation error when I try to launch a runtime workspace:

image

It looks like the "same" problem.

@laeubi
Copy link
Member Author

laeubi commented Sep 19, 2023

You can go to

https://ci.eclipse.org/platform/job/eclipse.platform.releng.aggregator/job/master/1535/console

then show the "plain text" and search for osgi.contract (reports more than 1000 matches).

@tjwatson
Copy link
Contributor

I have the latest I-Build installed I20230919-0530 and I don't see the org.osgi.service.http.whiteboard being installed. I am still unsure what is trying to pull in org.osgi.service.http.whiteboard

@laeubi
Copy link
Member Author

laeubi commented Sep 19, 2023

@tjwatson thats why I opened a P2 issue here it might be that P2 tries to resolve the IU but it is actually never used and therefore there is a warning, but the warning is annoying as it fills the log and leaves the user suspicious that there might be some problem.

@HannesWell
Copy link
Member

I've also seen this warning when launching the SDK from an Eclipse workspace reported by the PDE Launch validation, so I don't think that's a P2 issue but something really requires it.
IIRC I only saw it when using the eclipse-prereq.target.
I'll try to investigate it later this evening.

It reminded me as well about the issue Tom mentioned (maybe a good motivation to really complete the work and almost completly empty o.e.osgi.services).

@HannesWell
Copy link
Member

Currently we have the official org.osgi.service.http.whiteboard jar from Maven-Central in the target

https://github.com/eclipse-platform/eclipse.platform.releng.aggregator/blob/c0dd6931cc77fc6c65a3a1ad6efaaa0850980308/eclipse.platform.releng.prereqs.sdk/eclipse-sdk-prereqs.target#L430-L435

(it was added in eclipse-platform/eclipse.platform.releng.aggregator#235)
and have o.e.osgi.services that also exports the org.osgi.service.http.whiteboard package:
https://github.com/eclipse-equinox/equinox/blob/e419739107a99bfda4bfb19c89f1da16c298bf5c/bundles/org.eclipse.osgi.services/META-INF/MANIFEST.MF#L16

It looks like it somehow changed which one is selected eventually by P2 respectively PDE, but I have no immediate idea why?

The only real consumer in the platform seems to be org.eclipse.equinox.http.servlet and its tests.

@tjwatson should we just continue with your suggestion from eclipse-platform/eclipse.platform.releng.aggregator#239 (comment) and add a fragment for the capability. This would also allow us to finally remove the org.osgi.service.http.* API sources from o.e.osgi.services.

@laeubi
Copy link
Member Author

laeubi commented Jan 11, 2024

I found that the problem is not that P2 does not understand it but how the slicer works, it tries to satisfy everything but if something is not satiable it gives a warning... still in the end the thing might not be needed at all....

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

4 participants