Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Errors updating RCP
Errors updating RCP [message #1808842] Tue, 02 July 2019 21:44 Go to next message
Alex Kravets is currently offline Alex KravetsFriend
Messages: 561
Registered: November 2009
Senior Member
I am getting following errors during running update on our RCP

An error occurred while collecting items to be installed
session context was:(profile=DefaultProfile, phase=org.eclipse.equinox.internal.p2.engine.phases.Collect, operand=, action=).
No repository found containing: osgi.bundle,org.apache.commons.compress,1.18.0.v20181121-2221
No repository found containing: osgi.bundle,org.apache.httpcomponents.httpcore,4.4.10.v20190123-2214
No repository found containing: osgi.bundle,org.bouncycastle.bcpkix,1.61.0.v20190602-1335
No repository found containing: osgi.bundle,org.bouncycastle.bcprov,1.61.0.v20190602-1335


I see these bundles in target definition, but with lower version. Which makes me think that this has something to do with latest Eclipse release and some features we depend on.

If I update RCP version v1 to v2.1, the update works. However, if I update from v2 to v2.1, that's when update fails. The only thing that changed was inclusion of egit update site in p2.inf. Furthermore, if I remove reference to egit update site from 'Available Software Sites' and just leave update site product (with other sites), I get error

An error occurred while uninstalling
session context was:(profile=DefaultProfile, phase=org.eclipse.equinox.internal.p2.engine.phases.Uninstall, operand=[R]my.product 8.0.3.R20190530-1447 --> [R]my.product 8.0.3.R20190702-2042, action=org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions.UninstallBundleAction).
Installable unit contains no artifacts: [R]my.product 8.0.3.R20190530-1447.


How can I find out what causes update failure?

Thanks,
Alex

[Updated on: Wed, 03 July 2019 00:14]

Report message to a moderator

Re: Errors updating RCP [message #1808844 is a reply to message #1808842] Wed, 03 July 2019 03:08 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33258
Registered: July 2009
Senior Member
The first errors sounds like one related to a missing update site.

The second looks more mysterious. I've never seen such an error before. This seems to happen purely because you've removed a dependency in the p2.inf?

It would be good to know which update sites you are searching and to see what you changed exactly in your p2.inf.

You could use this approach to locate a repository that contains the missing IUs:

https://wiki.eclipse.org/Eclipse_Oomph_Authoring#How_to_find_a_P2_repository_at_Eclipse_using_the_Repository_Explorer



Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Errors updating RCP [message #1808876 is a reply to message #1808842] Wed, 03 July 2019 16:49 Go to previous messageGo to next message
Alex Kravets is currently offline Alex KravetsFriend
Messages: 561
Registered: November 2009
Senior Member
Quote:

The second looks more mysterious. I've never seen such an error before. This seems to happen purely because you've removed a dependency in the p2.inf?


All that there is p2.inf are some predefined update sites that are needed to be shown in Software Installation dialog, like

org.eclipse.equinox.p2.touchpoint.eclipse.addRepository(type:0,location:http${#58}//download.eclipse.org/egit/updates/,name:EGit Tooling,enabled:true);\


And I just confirmed that if I remove eGit from Available Sites dialog, I get error about missing bundles. If I put it back in I get the second error.

Here is target definition used, all sites are bound to specific version, so I am not sure which one mandates the latest versions. I did find that all of the bundles in question are part of org.eclipse.equinox.p2.iu, so perhaps this has something to do with the issue?

https://i.ibb.co/GTDDcyV/Screenshot-from-2019-07-03-12-49-14.png
Re: Errors updating RCP [message #1808880 is a reply to message #1808876] Wed, 03 July 2019 18:35 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33258
Registered: July 2009
Senior Member
Well neon.target tells me a lot. That sounds ancient but you want to install the latest version of EGit as well, thought your *.target file locks in very specific versions.

I can only suggest that you don't use a *.target file at all. Use Targlets instead:

https://wiki.eclipse.org/Oomph_Targlets

And better yet, create an Oomph setup for your project with including Targlet tasks to specify the target platform in a much simpler way:

https://wiki.eclipse.org/Eclipse_Oomph_Authoring

It works well for even for super complicated setups:

https://wiki.eclipse.org/Eclipse_Platform_SDK_Provisioning

But you need the *.target file for your Maven/Tycho build you say. I know, we need that for the Oomph build as well, but we just generate it as a side effect of resolving the Targlets using annotations on the the Targlet task. Life could be simpler.


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Errors updating RCP [message #1808986 is a reply to message #1808880] Fri, 05 July 2019 13:11 Go to previous messageGo to next message
Alex Kravets is currently offline Alex KravetsFriend
Messages: 561
Registered: November 2009
Senior Member
Thanks Ed,

I'll look into your suggestion to use Targlets.

Quote:

Well neon.target tells me a lot. That sounds ancient but you want to install the latest version of EGit as well, thought your *.target file locks in very specific versions.

eGit update site is not part of target, and in p2.inf it points to general update url without version.

I still want to find out though why update fails, because update succeeds when I update from v1 to v2.1, but fails updating from v2 to v2.1. Also why with eGit the errors occur? It's in p2.inf and not part of target, so it shouldn't affect against what product is build, should it?

Another observation I noticed is if I remove everything from Install Software dialog and just leave product's update site I get the error I mentioned above

Quote:

An error occurred while uninstalling
session context was:(profile=DefaultProfile, phase=org.eclipse.equinox.internal.p2.engine.phases.Uninstall, operand=[R]my.product 8.0.3.R20190530-1447 --> [R]my.product 8.0.3.R20190702-2042, action=org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions.UninstallBundleAction).
Installable unit contains no artifacts: [R]my.product 8.0.3.R20190530-1447.


These errors are really weird because nothing major changed in our build process other than introduction of some new plugins and features.

[Updated on: Fri, 05 July 2019 13:47]

Report message to a moderator

Re: Errors updating RCP [message #1808998 is a reply to message #1808986] Fri, 05 July 2019 15:02 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33258
Registered: July 2009
Senior Member
I couldn't see your *.target file. Maybe the link got removed? I didn't see any actual "egit errors" in the resolution. And I'm getting confused to by failures to resolve a target platform versus failures to install/update your product...

Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Errors updating RCP [message #1809006 is a reply to message #1808998] Fri, 05 July 2019 17:45 Go to previous messageGo to next message
Alex Kravets is currently offline Alex KravetsFriend
Messages: 561
Registered: November 2009
Senior Member
My mistake, the git repository was private. I fixed it https://github.com/akravets/test/blob/master/neon.target

There are no egit errors in resolution of target definition because update site is in p2.inf. Target definition resolves fine, the error occurs when I am trying to update product to latest release.
Re: Errors updating RCP [message #1809022 is a reply to message #1809006] Sat, 06 July 2019 04:38 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33258
Registered: July 2009
Senior Member
Your target platform looks like maintenance nightmare. With a targlet task you can maintain multiple target platforms for different versions as we do for Oomph itself:

https://git.eclipse.org/c/oomph/org.eclipse.oomph.git/tree/setups/Oomph.setup#n232

And then generate the *.target using the annotations. Here we use annotations that minimize the size of the *.target by specifying only the root features and without version constraints:

https://git.eclipse.org/c/oomph/org.eclipse.oomph.git/tree/releng/org.eclipse.oomph.parent/tp/org.eclipse.oomph.tp.target

In any case, if the issue is that update of the product itself is what fails, then it's an question of which repositories are visible to resolve the IUs.

Looking at http://download.eclipse.org/egit/updates/ with the repository explorer I can see that it definitely contains all the IUs mentioned in your failure so it seems to me that during the failed update this update site is not available. Of course if this update is introducing this site via the touchpoint it won't be available until after the update which is obviously kind of a chicken and egg problem.

Likely you would be better to provide a composite update site that references (composes) other sites needed to find your dependencies.


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Errors updating RCP [message #1809041 is a reply to message #1809022] Sun, 07 July 2019 12:49 Go to previous messageGo to next message
Alex Kravets is currently offline Alex KravetsFriend
Messages: 561
Registered: November 2009
Senior Member
I get the advantages of using targlets, and will certainly look into using them. However, the issue still remains what is the underlying cause of error

Quote:

An error occurred while uninstalling
session context was:(profile=DefaultProfile, phase=org.eclipse.equinox.internal.p2.engine.phases.Uninstall, operand=[R]my.product 8.0.3.R20190530-1447 --> [R]my.product 8.0.3.R20190702-2042, action=org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions.UninstallBundleAction).
Installable unit contains no artifacts: [R]my.product 8.0.3.R20190530-1447.


What does "Installable unit contains no artifacts" mean and why can't it be uninstalled? Are there logs I can look at to see the cause of the error? I'd like to fix this issue as update needs to be available before we move to targlets solution.

Error especially confusing since I can update previous release fine, which makes me think that something is wrong with v2 release IU?
Re: Errors updating RCP [message #1809048 is a reply to message #1809041] Mon, 08 July 2019 06:00 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33258
Registered: July 2009
Senior Member
Because I've create a development environment for the full Platform SDK, I can look for where this message comes from:

https://wiki.eclipse.org/Eclipse_Platform_SDK_Provisioning

In all uses there is a guard like this:

if (artifacts == null || artifacts.size() == 0)
return Util.createError(NLS.bind(Messages.iu_contains_no_arifacts, iu));

So it looks like it happens at line 61 of this file:

https://git.eclipse.org/c/equinox/rt.equinox.p2.git/tree/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/InstallBundleAction.java#n61

The only way to debug such a thing is to attach a remote debugger...


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:Upgrading eclipse from 3.5 to 4.8 for eclipse based application
Next Topic:Installing Gradle in runtime eclipse through target platform
Goto Forum:
  


Current Time: Sun Dec 08 09:46:35 GMT 2024

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

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

Back to the top