-
Notifications
You must be signed in to change notification settings - Fork 83
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
Validation error when launching child eclipse #194
Comments
These packages got added in Import-package directive in latest Jetty (version 10.0.11) in 10.0.9 these were not there java.io, |
Happens 1st on 28th June build gitlog of 28th 2022-06-28 Build input for build I20220628-1800 Eclipse Releng Bot |
I removed the import packages of comment#2 (by Sravan) in org.eclipse.jetty.http and that particular no longer is in the list of validation error. Another issue is why org.eclipse.osgi.internal.resolver.UserState@492d0748 cant resolve import of java.io etc |
If I add "Import-Package: java.io" manually in manifest of pde.core, plugin validation give pde.core also as the offending plugin. |
Shouldn't we resolve JDK libraries? |
Yes, one really kind of needs the a.jre.javase IU (or equivalent there of) corresponding to the selected JRE of the launcher to verify that the required packages are really in the actual JRE. But that's easier said than done. |
While resolving the bundle org.eclipse.jetty.http in ResolverImpl for org.eclipse.jetty.http
For ResolverImport (java.io)
imp.getSelectedSupplier() comes as null |
The above is causing the resolve of org.eclipse.jetty.http to fail in OSGI. |
@tjwatson Can you provide your views on this? |
This is an ancient (one can't really call it old anymore) bug in PDE, and to clarify this is not an Validation error but a warning, and it does not really require a a.jre.javase IU as this all can be derived from the selected JDK itself (and P2 already do that for the workspace JRE).
Can you show the exact error? This should only fail if using OSGi <= 6, at all as it is valid to import java packages since OSGi R7: |
That's really not that hard, Tycho uses the following to get all system-packages of a JVM:
and if you prefer a |
Yes, though that requires launching the JRE. And in the end, I believe that JDT has already computed all the packages of each JVM so it's just a matter of creating an IU like the a.jre.javase IU with those package capabilities... |
Probably yes :-)
I thin this is just relevant for P2, the problem is that PDE uses "old" OSGi API and that these packages are superposed to be exported by the system-bundle dynamically, so at least PDE must handle this and hopefully could finally throw away the javax is from JRE assumption so we can get better errors / warnings at the first place. |
I'm just pointing out that "the system bundle information" must be the one that would be specified for the actual JRE of the launcher, not the one of the running IDE itself. |
Yep, int this case it is actually the Target-JRE. |
A note from other perspective: the same error will be shown also if we debug from "old" Eclipse against new target platform containing Jetty. I know we usually say "just update to latest", but if that is impossible, people will be angry too. So why Jetty is requiring now system packages at all? What''s the point doing that? |
See bug -> jetty/jetty.project#8265 |
Notification @bjhargrave |
For those that are asking if these packages are generated intentionally (by BND), the answer is yes: |
There is nothing to fix see https://blog.osgi.org/2018/02/osgi-r7-highlights-java-9-support.html |
Why should Jetty do this? These days it's quite possible to use jlink to create reduced JREs which may not provide all the packages. By declaring it needs a certain package it's ensuring that there won't just be class not found exceptions but rather that it's clear a certain package is needed and not present... |
In OSGi Core Release 7, it became supported to import So Bnd supports this. An OSGi R7 framework when running on Java 9+ will export all the available It appears here that parts of Eclipse (PDE) do not properly handle this. Bnd has a |
I can offer to try to fix this false positive validation error in the next days (for the current PDE).
... with this in mind it should be straight forward. Anybody that is interested in having this fix in older versions is then free to backport it. :) Just for curiosity, would this automatically be fixed if PDE migrates off Resolver-State in the |
Have not checked this, but I think it is more that the current target platform state need to consider the packages of the selected target-jre instead. and not really related to the |
We should try to fix this in M1 since this is rather annoying validation error ( which kind-of suggests that the launch is not good) . If this is not fixed, we should also consider rollback of jetty update for M1. |
@vik-chand I honestly won't consider a rollback because PDE is annoying ... that will only lead to this bug never fixed and jetty never upgraded.
This is not the only case where PDE annoys the user ... I regularly get complains form PDE and the OSGi is fine with that, so this is really not a measure... |
It comes down to how PDE discovers the packages available from the execution environment. I don't recall the details on how PDE does this now. But it needs to be able to have the Moving away from the old equinox resolver for this is not going to fix this directly. You would still be left with the same issue of having to configure what the system bundle exports from the execution environment for |
I don't think this is needed, actually a Target hat a JVM and that has to be used instead of an individual per bundle. |
These are not errors, just warnings.
Simply click |
Yes, indeed.
Right. Or untick the launch configuration option |
The list of packages in the <ee>-systempackages.profile file in o.e.pde.api.tools is not suitable. Fixes eclipse-pde#194
The list of system-packages in the <ee>-systempackages.profile file in o.e.pde.api.tools is not suitable for Launch-validation. Fixes eclipse-pde#194
The list of system-packages in the <EE>-systempackages.profile file in o.e.pde.api.tools is not suitable for Launch-validation. Fixes eclipse-pde#194
Created #221 that should fix this issue. |
The list of system-packages in the <EE>-systempackages.profile file in o.e.pde.api.tools is not suitable for Launch-validation, query them from the VM instead. Fixes eclipse-pde#194
The list of system-packages in the <EE>-systempackages.profile file in o.e.pde.api.tools is not suitable for Launch-validation, query them from the VM instead. Fixes #194
The list of system-packages in the <EE>-systempackages.profile file in o.e.pde.api.tools is not suitable for Launch-validation, query them from the VM instead. Fixes #194
The list of system-packages in the <EE>-systempackages.profile file in o.e.pde.api.tools is not suitable for Launch-validation, query them from the VM instead. Fixes eclipse-pde#194 for PDE-build
…e export Fixes eclipse-pde/eclipse.pde#194 for PDE-build Refs: eclipse-pde/eclipse.pde#624
…e export Fixes eclipse-pde#194 for PDE-build Refs: eclipse-pde#624
…e export Fixes eclipse-pde/eclipse.pde#194 for PDE-build Refs: eclipse-pde/eclipse.pde#624
…e export Fixes eclipse-pde/eclipse.pde#194 for PDE-build Refs: eclipse-pde/eclipse.pde#624
We are getting this error
All these are for JDK packages.
Build information:
Eclipse SDK
Version: 2022-06 (4.25)
Build id: I20220630-1800
OS: Windows 10, v.10.0, x86_64 / win32
Java vendor: Eclipse Adoptium
Java runtime version: 17.0.3+7
Java version: 17.0.3
Notifications: @SarikaSinha @akurtakov
The text was updated successfully, but these errors were encountered: