|Re: Classes not being found [message #1733283 is a reply to message #1731320]
||Thu, 26 May 2016 00:41
| GianMaria Romanato
Registered: November 2015
Sorrt for the late reply, I did not notice this message.|
Bill Mair wrote on Wed, 04 May 2016 11:24
It is not apparent that javax.* has to be explicitly imported and I never saw this behaviour when running an "equinox" server.
Is there a plugin available that can alert me to the missing imports?
That's probably because of a different boot delegation policy. Eclipse itself, configures Equinox to make automatically available a large number of packages that you would otherwise need to import explicitly. I guess this is because in Eclipse RCP it's more common to use Require-Bundle than Import-Package so Equinox is configured to reduce the learning curve of plug-in developers.
I am not aware of any plug-in that can help you. However, if you compile with Maven/Tycho for example, I think Tycho will refuse to compile your code if a javax.* package is not imported. So if you use some sort of continuous integration you may be alerted soon. In any case, this is really something to which I am sure you will get used very soon.
I am now undecided as to whether I should use the "osgi.compatibility.bootdelegation" option or not. I would love it if the PDE or maybe even the Virgo tooling could flag up missing imports.
I am not aware of a way PDE can be extended to overcome this limitation. I believe it's a non trivial issue otherwise the PDE team would have already solved it.
The Virgo tools just integrate Virgo in Eclipse and I cannot really work around the PDE limitations.
Personally I would avoid to tweak with bootdelegation, unless you are 100% sure you will never want to try another Application Server, because not all OSGi application servers allow to configure all aspects of the OSGi runtime.
For example, IBM WebSphere Liberty does not allow to control bundle start level and activation order.
Powered by FUDForum
. Page generated in 0.01965 seconds