[Resolved] ClassNotFoundException during startup because of Application Model Changes [message #1711930] |
Tue, 20 October 2015 10:38 |
Karl Puperze Messages: 36 Registered: August 2011 |
Member |
|
|
We have shipped version 6 of our RCP Product a couple of months ago. The Application Model of this version contains an Addon which does not exist anymore in version 7 of the product we want to ship in a couple of weeks. But the Application Model is persisted and includes a reference to the old Addon. If I try to start version 7 of our product with a persisted application model of version 6 I constantly get ClassNotFoundExceptions during startup, because the Addon class cannot be resolved (because it does not exist anymore).
Is it possible to only persist the information about last opened windows and rebuild the rest of the application model during startup? I want to make sure, that I have a clean application model and don't get this version errors, but I don't want to loose all the information (e.g. last opened perspective, view, editor). That's why I don't want to use clearPersistedState. Basically I want the same behavior like our old Eclipse RCP 3.x based product.
[Updated on: Tue, 20 October 2015 12:57] Report message to a moderator
|
|
|
Re: ClassNotFoundException during startup because of Application Model Changes [message #1711934 is a reply to message #1711930] |
Tue, 20 October 2015 10:49 |
Thomas Schindl Messages: 6651 Registered: July 2009 |
Senior Member |
|
|
Hi,
2 solutions to the problem:
a) add a LifecycleHandler to your product who cleans up the model in
@ProcessRemoval
b) contribute a ModelProcessor who runs ALWAYS and checks does the same
thing @ProcessRemoval does
BTW: There's a reason we are not removing stuff not there anymore,
because there might be situations eg think of the Eclipse IDE where you
install a new version open an old workspace but you eg have not yet
installed CDT. If we'd now remove all not yet available components you'd
have to reconfigure your UI.
There's even the possibility for a generic CleanerAddon which uses the
contributorURI of elements, the contributionURI for MContribution,
MCommand-References for MHandler and MHandleItem, ... .
Tom
On 20.10.15 12:38, Karl Puperze wrote:
> We have shipped version 6 of our RCP Product a couple of months ago. The
> Application Model of this version contains an Addon which does not exist
> anymore in version 7 of the product we want to ship in a couple of
> weeks. But the Application Model is persisted and includes a reference
> to the old Addon. If I try to start version 7 of our product with a
> persisted application model of version 6 I constantly get
> ClassNotFoundExceptions during startup, because the Addon class cannot
> be resolved (because it does not exist anymore).
>
> Is it possible to only persist the information about last opened windows
> and rebuild the rest of the application model during startup? I want to
> make sure, that I have a clean application model and don't get this
> version errors, but I don't want to loose all the information (e.g. last
> opened perspective, view, editor). That's why I don't want to use
> clearPersistedState. Basically I want the same behavior like our old
> Eclipse RCP 3.x based product.
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04277 seconds