Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Equinox » Problem mirroring a p2 repository(mirrorApplication not found despite the required bundles are present)
Problem mirroring a p2 repository [message #1810345] Thu, 08 August 2019 14:55 Go to next message
Nils Loose is currently offline Nils LooseFriend
Messages: 5
Registered: September 2017
Junior Member
Dear experts,

we're developing an eclipse/equinox based RCP application, that is updated from a p2 repository. We want to mirror that repository as described in the Developers Guide. When we did this the last time in december/january it worked perfectly. In the meantime we migrated our application to the new eclipse version (2018-09 back then, 2019-06 now), and now when trying to mirror our repo we get the following error message:
java.lang.RuntimeException: Application "org.eclipse.equinox.p2.metadata.repository.mirrorApplication" could not be found in the registry.

Same for the artifact repository. Obviously, the mirror application seems to be missing. Now according to the Developers Guide, for mirroring reopsitories "you simply need an eclipse installation that contains the org.eclipse.equinox.p2.artifact/metadata.repository bundle". This condition should be fulfilled, as our application includes the org.eclipse.equinox.p2.core.feature that contains those bundles, and jar files for both bundles are located in the application's plugins folder. I think that should be sufficient to make the mirror tool available, or am I overlooking something?

As initially mentioned, it worked three eclipse versions ago. Have there been any changes to p2 in the meantime that might explain why it no longer does?

Any other ideas what I'm doing wrong here? Any help would be appreciated! Thanks in advance!

Best regards,

Nils
Re: Problem mirroring a p2 repository [message #1810385 is a reply to message #1810345] Fri, 09 August 2019 08:37 Go to previous messageGo to next message
Nils Loose is currently offline Nils LooseFriend
Messages: 5
Registered: September 2017
Junior Member
A small update: I figured out how to check the bundle states of our application using the OSGI console. Both the org.eclipse.equinox.p2.artifact.repository and org.eclipse.equinox.p2.metadata.repository bundle seem to be stuck at state starting, without ever reaching active state even after waiting several minutes. So I guess that's the reason why the mirroring doesn't work. Any hints how to solve this?

Thanks a lot!
Re: Problem mirroring a p2 repository [message #1810398 is a reply to message #1810385] Fri, 09 August 2019 12:03 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33224
Registered: July 2009
Senior Member
I know there have been changes related to the dependency services.

Formerly in our product file we had:

- <plugin id="org.eclipse.equinox.ds" autoStart="true" startLevel="2" />

Which we had to replace with

+ <plugin id="org.apache.felix.scr" autoStart="true" startLevel="2" />

So make sure that org.apache.felix.scr is deployed in your application and at the required start level.


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Problem mirroring a p2 repository [message #1810401 is a reply to message #1810398] Fri, 09 August 2019 12:51 Go to previous messageGo to next message
Nils Loose is currently offline Nils LooseFriend
Messages: 5
Registered: September 2017
Junior Member
Thank you for your reply! We also switched from org.eclipse.equinox.ds to org.apache.felix.scr when migrating our application to the new eclipse version, actually we have exactly the same line in our product file. So this is probably not the source of our problems. Thanks anyway and best regards!
Re: Problem mirroring a p2 repository [message #1810425 is a reply to message #1810345] Sat, 10 August 2019 15:38 Go to previous message
Christian Derksen is currently offline Christian DerksenFriend
Messages: 11
Registered: September 2017
Junior Member
I worked on the problem as Nils and we - somehow - figured out, how to reattach the repository mirroring to our product.

After also checking via OSGI console the states of the p2 bundles, we found that these bundles were loaded in the same way as for an eclipse IDE. But still we got the error that org.eclipse.equinox.p2.metadata.repository.mirrorApplication could not be found in the registry, if we tried to start the mirroring using the command line options.

In the past, the only two bundles that we added to the dependencies of our core product bundle were:

  • org.eclipse.equinox.p2.operations
  • org.eclipse.equinox.p2.metadata
and that seems to do the job but fails now as described.

Checking the tutorial of Lars and adding some further bundle dependencies to our products core bundle, we end up with the following p2 dependency configuration:

  1. org.eclipse.equinox.p2.core
  2. org.eclipse.equinox.p2.engine,
  3. org.eclipse.equinox.p2.metadata,
  4. org.eclipse.equinox.p2.operations,
  5. org.eclipse.equinox.p2.repository,
  6. org.eclipse.equinox.p2.repository.tools,
  7. org.eclipse.equinox.p2.ui,
  8. org.eclipse.equinox.p2.ui.sdk,
  9. org.eclipse.equinox.p2.ui.sdk.scheduler
Here, the bundles 1, 2, 4 and 5 came from the mentioned tutorial, Bundle 3 worked in the past and we simply let it as is, 7-9 are required and used by the SWT workbench and properties window.
Finally, Bundle no. 6, I guess, did the trick to let products mirror repositories via command line.

[Updated on: Sat, 10 August 2019 15:38]

Report message to a moderator

Previous Topic:Create p2 site: ProductPublisher can't find the product file [SOLVED]
Next Topic:How to consume OSGi based product outside OSGi container
Goto Forum:
  


Current Time: Thu Oct 10 01:54:10 GMT 2024

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

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

Back to the top