[Resolved] ClassNotFoundException during startup because of Application Model Changes [message #1711930] |
Tue, 20 October 2015 06:38  |
Eclipse User |
|
|
|
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 08:57] by Moderator
|
|
|
Re: ClassNotFoundException during startup because of Application Model Changes [message #1711934 is a reply to message #1711930] |
Tue, 20 October 2015 06:49   |
Eclipse User |
|
|
|
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.
|
|
|
|
Re: ClassNotFoundException during startup because of Application Model Changes [message #1711966 is a reply to message #1711964] |
Tue, 20 October 2015 09:02  |
Eclipse User |
|
|
|
As I said there's the possibility for a generic solution which could be
provided by the platform as a library you can use but someone needs to
invest the time to work out all the corner cases.
BTW: 3.x show the same behavior it would NOT remove views simply because
the View is not there anymore when you upgrade!
Tom
On 20.10.15 14:56, Karl Puperze wrote:
> I was hoping, that there is another solution. Then I use an additional
> model processor for cleanup. Thanks!
|
|
|
Powered by
FUDForum. Page generated in 0.02815 seconds