Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 354356

Summary: Exception is thrown while updating Eclipse RCP application
Product: [Eclipse Project] Equinox Reporter: Michael Spector <spektom>
Component: p2Assignee: P2 Inbox <equinox.p2-inbox>
Status: CLOSED WONTFIX QA Contact:
Severity: normal    
Priority: P3 CC: pascal
Version: 3.5.2   
Target Milestone: ---   
Hardware: PC   
OS: Windows Vista   
Whiteboard: stalebug
Attachments:
Description Flags
P2Util.java used for seamless upgrade of RCP app. none

Description Michael Spector CLA 2011-08-10 06:38:21 EDT
One of our users has encountered this exception while upgrading his Eclipse RCP application. This looks like a bug:

!ENTRY org.eclipse.core.jobs 4 2 2011-08-08 17:07:10.767
!MESSAGE An internal error occurred during: "Installing updates...".
!STACK 0
java.lang.IllegalStateException: Profile profile is not current.
	at org.eclipse.equinox.internal.p2.engine.SimpleProfileRegistry.lockProfile(SimpleProfileRegistry.java:691)
	at org.eclipse.equinox.internal.provisional.p2.engine.Engine.perform(Engine.java:44)
	at com.stepwell.rcp.update.P2Util$1.run(P2Util.java:211)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)


The class P2Util is attached.
Comment 1 Pascal Rapicault CLA 2011-08-11 18:47:38 EDT
This happens when you are trying to start an engine operation on a profile that is not the most recent one. 
This is likely a bug in your code.
Comment 2 Michael Spector CLA 2011-08-12 08:48:05 EDT
(In reply to comment #1)
> This happens when you are trying to start an engine operation on a profile that
> is not the most recent one. 
> This is likely a bug in your code.

I'll appreciate if you elaborate a little bit on this. I'm not a p2 equinox core developer, so what you said looks to me like a magic spell. I'm using the same PDE build process for at least a year, none of build parameters has been changed since then. I also use "standard" P2Util for running seamless upgrade, which I've found under Eclipse repository. Nevertheless, one of our users has received such a message. Where should I look for bugs?

Thanks.
Comment 3 Michael Spector CLA 2011-08-12 08:49:11 EDT
Created attachment 201392 [details]
P2Util.java used for seamless upgrade of RCP app.
Comment 4 Michael Spector CLA 2011-08-14 09:54:27 EDT
I think you cannot just close such a bug by saying "works for me". You can't be sure that your framework works in 100% of cases, and this is why we (consumers) of the framework are useful in finding these non-working cases.
Comment 5 DJ Houghton CLA 2011-08-17 15:51:43 EDT
Pascal, is this a case where the new simplified Operations API that was released for Indigo might help?
Comment 6 DJ Houghton CLA 2011-08-17 15:55:21 EDT
And by "help" I mean it would simplify the user's code for discovering and applying updates.
Comment 7 Eclipse Genie CLA 2019-09-17 13:43:05 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.