Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » P2 » org.eclipse.equinox.p2.examples.rcp.prestartupdate fails with NPE(Basic examples fails out-of -the-box)
icon9.gif  org.eclipse.equinox.p2.examples.rcp.prestartupdate fails with NPE [message #869727] Fri, 04 May 2012 04:36 Go to next message
Jörn Guy Süß is currently offline Jörn Guy SüßFriend
Messages: 320
Registered: July 2009
Location: Anstead, Brisbane, Queens...
Senior Member

As the P2 eclipse wiki suggests, I have


  1. checked out the prestart update example
  2. into my Eclipse classic 3.7.2 and set the platform as target.
  3. opened the product file (it has the startup settings for DS) and selected "run"
  4. Got a Nullpointer in
    at org.eclipse.equinox.p2.examples.rcp.prestartupdate.P2Util.checkForUpdates(P2Util.java:61)



Debugging shows that


  • operation.getProvisioningJob(null)
    in line 60 yields null and causes the NPE.
  • status is
    Status OK: org.eclipse.equinox.p2.operations code=10001 Your original request has been modified. null children=[]

  • Most interesting is that operation.iusToUpdate is an emtpy collection.


I have checked that the P2 repo defined in the
p2.inf
file is active. I can see it from my Eclipse's P2 client. I would expect to see it in the applications update requirements, but it does not appear.

I have no way of debugging this further, as I cannot identify how the update is carried out. Given that this is a published example of a common use case, maybe one of the developers cares to comment?

Thanks, JG
Re: org.eclipse.equinox.p2.examples.rcp.prestartupdate fails with NPE [message #869882 is a reply to message #869727] Fri, 04 May 2012 15:50 Go to previous messageGo to next message
Gang Lao is currently offline Gang LaoFriend
Messages: 3
Registered: April 2012
Junior Member
In the Eclipse, you must change the Run Configuration
Run Configuration > Configuration > Software Installation > Support software installation in the launched application
Re: org.eclipse.equinox.p2.examples.rcp.prestartupdate fails with NPE [message #870606 is a reply to message #869882] Wed, 09 May 2012 00:16 Go to previous message
Jörn Guy Süß is currently offline Jörn Guy SüßFriend
Messages: 320
Registered: July 2009
Location: Anstead, Brisbane, Queens...
Senior Member

Thanks!!! That fixed the issue. Now related question: How is this switch manifested in the runtime? How do I hand it to a deployed build?
Previous Topic:load repository after startup in helios rcp
Next Topic:Problem to generate some plugins in p2 format
Goto Forum:
  


Current Time: Mon Dec 09 10:20:57 GMT 2024

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

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

Back to the top