Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » [Resolved] ClassNotFoundException during startup because of Application Model Changes
[Resolved] ClassNotFoundException during startup because of Application Model Changes [message #1711930] Tue, 20 October 2015 10:38 Go to next message
Karl Puperze is currently offline Karl PuperzeFriend
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 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
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.
Re: ClassNotFoundException during startup because of Application Model Changes [message #1711964 is a reply to message #1711934] Tue, 20 October 2015 12:56 Go to previous messageGo to next message
Karl Puperze is currently offline Karl PuperzeFriend
Messages: 36
Registered: August 2011
Member
I was hoping, that there is another solution. Then I use an additional model processor for cleanup. Thanks!
Re: ClassNotFoundException during startup because of Application Model Changes [message #1711966 is a reply to message #1711964] Tue, 20 October 2015 13:02 Go to previous message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
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!
Previous Topic:CleanupAddon hides perspective although it has a visible window
Next Topic:Using event.filter to register to event topics
Goto Forum:
  


Current Time: Fri Sep 20 04:46:56 GMT 2024

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

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

Back to the top