Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Oomph » Update issue with product containing fragments
Update issue with product containing fragments [message #1833066] Thu, 01 October 2020 16:15 Go to next message
Aleksei Airapetov is currently offline Aleksei AirapetovFriend
Messages: 13
Registered: December 2019
Junior Member
Hello,

I have a feature-based product which is installed and updated from p2 repository. Among others my product contains Babel features with localization plugin fragments.

Recently I faced an issue with updating to a newer version of the product - after performing setup tasks the new version of the product simply wasn't available.

After a few experiments I realized that the reason is that the new version of the p2 contains a new version of Babel features.

I also tried setting a version range to the product version in my setup file - my product was updated to the new version, offered to restart, and then crashed with an exception like this:
java.lang.IllegalStateException: Module has been uninstalled.
	at org.eclipse.osgi.internal.framework.EquinoxBundle.checkValid(EquinoxBundle.java:1000)
	at org.eclipse.osgi.internal.framework.EquinoxBundle.getEntry(EquinoxBundle.java:699)
	at org.eclipse.core.internal.runtime.FindSupport.findInFragments(FindSupport.java:254)
	at org.eclipse.core.internal.runtime.FindSupport.findNL(FindSupport.java:223)
	at org.eclipse.core.internal.runtime.FindSupport.find(FindSupport.java:112)
	at org.eclipse.core.internal.runtime.FindSupport.find(FindSupport.java:64)
	at org.eclipse.core.runtime.FileLocator.find(FileLocator.java:90)


After debugging, I found out that the module on which the exception is thrown is the localization fragment for jface (but the problem is not in a specific fragment, if you delete a jface localization fragment, then checking of the next fragments will also throw such an exception).
However, if you try to launch the product again after that, it will launch without any problems.

So I would like to ask for advice - has anyone encountered such strange behavior when updating plugin fragments? Can this behavior be related specifically to Babel or is it generally related to plugin fragments? Are there any known problems similar to mine, or any common practices for organizing fragments in p2/products that I might have missed?

[Updated on: Thu, 01 October 2020 16:15]

Report message to a moderator

Re: Update issue with product containing fragments [message #1833089 is a reply to message #1833066] Fri, 02 October 2020 05:11 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33113
Registered: July 2009
Senior Member
Looking at that code, it is specific to finding NL fragments and it seems the fragment bundles associated with the host bundle are "stale", i.e., are the uninstalled fragments (presumably replaced with newer versions).

I wonder if, after the update, you exit and then start the product executable with "-clean" if that fixes/avoids the problem? I ask because Equinox keeps a cached state of the bundles to speed up startup, and it appears to me that this cached state contains references to older NL fragments that should have been properly recomputed automatically...


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Update issue with product containing fragments [message #1833099 is a reply to message #1833089] Fri, 02 October 2020 08:27 Go to previous messageGo to next message
Aleksei Airapetov is currently offline Aleksei AirapetovFriend
Messages: 13
Registered: December 2019
Junior Member
Well, after the update, if I manually exit and launch the product again even without the flag, everything looks fine - there are no exceptions and in the installation details I see that the Babel fragments have been updated to the new version.

What else bothers me is that the Perform setup tasks operation can't find updates on its own, without specifying version range in the setup file.

I also forgot to specify that only the product itself is specified in the setup file (Babel features are included in the product itself, on the basis of which p2 is formed). I think this might be important.

Re: Update issue with product containing fragments [message #1833132 is a reply to message #1833099] Sat, 03 October 2020 07:41 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33113
Registered: July 2009
Senior Member
I mention the -clean thing because of problems in this bug:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=565066

It does seem a problem of somehow the cached stated not being properly/fully refresh.

I did expect a restart to be equivalent to a manual exit and a manual launch, but you say that appears not to be the case. :-( That sounds like it would be very hard to debug.

As for not finding updates, that too is something that would need to be debugged to find out why p2 is not automatically finding a solution with newer IU versions. I assume that minimally the qualifier of the product version really is newer...


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Update issue with product containing fragments [message #1833153 is a reply to message #1833132] Sun, 04 October 2020 17:20 Go to previous message
Aleksei Airapetov is currently offline Aleksei AirapetovFriend
Messages: 13
Registered: December 2019
Junior Member
Actually the -clean flag seems to be useful - after I added it to .ini file, when I try to update the product, it no longer throws any exceptions when restarting.

Also the bug you mentioned is claimed to be fixed, so I guess I should try to update to a newer version of p2 plugins and try to make it work without the flag.

Concerning not finding updates without version range:

  • Product qualifier is indeed higher in p2 repo which I'm trying to update to
  • I suspect that updating the version of Babel features is the cause of the issue, as I tried to update to an identical version of the product but with the same version of Babel and everything was just fine - updates were being found without any version ranges specified
  • Some time ago I tried to debug the update mechanism to understand the reason and I realized that the product sees available new versions of plugins, but however when resolving dependencies makes a choice in favor of the old already installed version of product. I still didn't understand what the problem was because I got to the Sat4j level, where human-readable plug-in names turned into "zeros and ones", and it was difficult to understand where the algorithm turns the wrong way.

[Updated on: Sun, 04 October 2020 17:41]

Report message to a moderator

Previous Topic:Missing cipher in eclipse installer
Next Topic:Oomph Customization
Goto Forum:
  


Current Time: Thu Mar 28 19:26:41 GMT 2024

Powered by FUDForum. Page generated in 0.03994 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top