Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » Testing Eclipse 3.7 RCP app in Eclipse 4.2 - NPE
Testing Eclipse 3.7 RCP app in Eclipse 4.2 - NPE [message #799934] Thu, 16 February 2012 08:34 Go to next message
h1055071 is currently offline h1055071
Messages: 335
Registered: July 2009
Senior Member
My Eclipse RCP app runs just fine in Eclipse 3.7. However in 4.2 M5 not so. It compiles but when I try to run it I only get to see its splash screen and then:

java.lang.NullPointerException
at org.eclipse.e4.ui.internal.workbench.ModelServiceImpl.<init>(ModelServiceImpl.java:92)
at org.eclipse.e4.ui.internal.workbench.swt.E4Application.createDefaultContext(E4Application.java:482)
at org.eclipse.e4.ui.internal.workbench.swt.E4Application.createE4Workbench(E4Application.java:172)
at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:548)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:534)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at uk.ac.bolton.archimate.editor.Application.start(Application.java:59)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:352)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:624)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:579)
at org.eclipse.equinox.launcher.Main.run(Main.java:1433)
at org.eclipse.equinox.launcher.Main.main(Main.java:1409)

Did I miss something?

Re: Testing Eclipse 3.7 RCP app in Eclipse 4.2 - NPE [message #799954 is a reply to message #799934] Thu, 16 February 2012 08:57 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas Schindl
Messages: 5014
Registered: July 2009
Senior Member
Can you check if equinox.ds is in your launch config?

Tom

Am 16.02.12 14:34, schrieb Phil Beauvoir:
> My Eclipse RCP app runs just fine in Eclipse 3.7. However in 4.2 M5 not
> so. It compiles but when I try to run it I only get to see its splash
> screen and then:
>
> java.lang.NullPointerException
> at
> org.eclipse.e4.ui.internal.workbench.ModelServiceImpl.<init>(ModelServiceImpl.java:92)
>
> at
> org.eclipse.e4.ui.internal.workbench.swt.E4Application.createDefaultContext(E4Application.java:482)
>
> at
> org.eclipse.e4.ui.internal.workbench.swt.E4Application.createE4Workbench(E4Application.java:172)
>
> at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:548)
> at
> org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
>
> at
> org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:534)
> at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
> at uk.ac.bolton.archimate.editor.Application.start(Application.java:59)
> at
> org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
>
> at
> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
>
> at
> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
>
> at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:352)
>
> at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
>
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>
> at java.lang.reflect.Method.invoke(Method.java:597)
> at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:624)
> at org.eclipse.equinox.launcher.Main.basicRun(Main.java:579)
> at org.eclipse.equinox.launcher.Main.run(Main.java:1433)
> at org.eclipse.equinox.launcher.Main.main(Main.java:1409)
>
> Did I miss something?
>
>
Re: Testing Eclipse 3.7 RCP app in Eclipse 4.2 - NPE [message #799973 is a reply to message #799954] Thu, 16 February 2012 09:21 Go to previous messageGo to next message
h1055071 is currently offline h1055071
Messages: 335
Registered: July 2009
Senior Member
Tom,

no it wasn't. I added it and that didn't work. Then I added all the org.eclipse.equinox.* plug-ins to the launch config and hit "Add required Plug-ins". That got past the NPE and I could launch my RCP. It seems that the default "Add required Plug-ins" doesn't add the required plug-ins.

Now I have to figure out why RCP app looks like a mess in e4, why some menu items are missing, why Perspective IFolderLayouts don't disappear when devoid of Views and Editors, and why I can't drag views around the workspace...

Re: Testing Eclipse 3.7 RCP app in Eclipse 4.2 - NPE [message #799993 is a reply to message #799973] Thu, 16 February 2012 09:47 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas Schindl
Messages: 5014
Registered: July 2009
Senior Member
Yes - ds can't be resolved by "Add Required Plugins" because no-one has
a direct dependency on it. The check we had in M5 to give a more
reasonable error message didn't worked any more and we have rewritten it
for M6.

I think the biggest problem is most likely that the default css is not
loaded. If you have reproduceable problems please try to reduce them to
a minimum and file bugs so that we can fix them.

I'd also suggest you fetch one of the latest build - many problems might
already got fixed since M5 has been released!

Tom

Am 16.02.12 15:21, schrieb Phil Beauvoir:
> Tom,
>
> no it wasn't. I added it and that didn't work. Then I added all the
> org.eclipse.equinox.* plug-ins to the launch config and hit "Add
> required Plug-ins". That got past the NPE and I could launch my RCP. It
> seems that the default "Add required Plug-ins" doesn't add the required
> plug-ins.
>
> Now I have to figure out why RCP app looks like a mess in e4, why some
> menu items are missing, why Perspective IFolderLayouts don't disappear
> when devoid of Views and Editors, and why I can't drag views around the
> workspace...
>
>
Re: Testing Eclipse 3.7 RCP app in Eclipse 4.2 - NPE [message #800118 is a reply to message #799993] Thu, 16 February 2012 13:08 Go to previous messageGo to next message
Brian de Alwis is currently offline Brian de Alwis
Messages: 242
Registered: July 2009
Senior Member
Include the org.eclipse.rcp *feature*. I'd guess from your description that you've not included a number of addons that clean up empty stacks, etc.

(Updated to correct auto-correct misspellings!)

[Updated on: Thu, 16 February 2012 13:09]

Report message to a moderator

Re: Testing Eclipse 3.7 RCP app in Eclipse 4.2 - NPE [message #800168 is a reply to message #800118] Thu, 16 February 2012 14:32 Go to previous messageGo to next message
h1055071 is currently offline h1055071
Messages: 335
Registered: July 2009
Senior Member
I think I need to revisit this a bit later. I'm not sure what the best migration plan is from a mature and established 3.7 Eclipse RCP application (http://archi.cetis.ac.uk) with hundreds of users to an e4 application. Would it be best to re-write from scratch?
Re: Testing Eclipse 3.7 RCP app in Eclipse 4.2 - NPE [message #800240 is a reply to message #800168] Thu, 16 February 2012 16:15 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas Schindl
Messages: 5014
Registered: July 2009
Senior Member
I would start refactoring the existing code base to the e4 programming
model using the e4 bridge - but like I said before if something does not
work when running your application on 4.x this is a bug in the compat
layer we'll address (unless you used some internal API).

Please provide us with informations what is not working and how we can
reproduce this.

Keeping your code base running on Eclipse 4.x without change is one of
our major selling points!

Tom

Am 16.02.12 20:32, schrieb Phil Beauvoir:
> I think I need to revisit this a bit later. I'm not sure what the best
> migration plan is from a mature and established 3.7 Eclipse RCP
> application (http://archi.cetis.ac.uk) with hundreds of users to an e4
> application. Would it be best to re-write from scratch?
Re: Testing Eclipse 3.7 RCP app in Eclipse 4.2 - NPE [message #800251 is a reply to message #800240] Thu, 16 February 2012 16:33 Go to previous messageGo to next message
h1055071 is currently offline h1055071
Messages: 335
Registered: July 2009
Senior Member
Thanks for the support, Tom.

What is the "e4 bridge"?

One thing I need to address is what dependencies to add to my app's main bundle manifest. For Eclipse 3.7 I have the following dependencies:

org.eclipse.core.runtime
org.eclipse.core.runtime.compatibility
org.eclipse.gef
org.eclipse.help.ui
org.eclipse.ui
org.eclipse.ui.forms
org.eclipse.ui.views
org.eclipse.ui.views.properties.tabbed

I'm guessing I need to add some e4-specific core dependencies?

Regards,

Phil
Re: Testing Eclipse 3.7 RCP app in Eclipse 4.2 - NPE [message #871680 is a reply to message #800240] Mon, 14 May 2012 13:14 Go to previous messageGo to next message
Alex Renger is currently offline Alex Renger
Messages: 2
Registered: May 2012
Junior Member
Hello Mr. Schindl... you requested a way to reproduce the NullPointerException described by h1055071. I get this same error when I create a new RCP app within Eclipse 4.2. I first saw the problem in M6 and hoped it would be fixed in M7, but it still exists there. The "Hello RCP" example app gives the same NullPointerException.

I'll try including various things, as mentioned here in your exchange with h1055071 -- but please let us know if there's a simple/clean/quick way to solve this. In general this RCP thing seems pretty cool; thanks for your work on it.
Re: Testing Eclipse 3.7 RCP app in Eclipse 4.2 - NPE [message #871948 is a reply to message #871680] Tue, 15 May 2012 03:37 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas Schindl
Messages: 5014
Registered: July 2009
Senior Member
Make sure:
* equinox.ds
* equinox.event

Are in your launch configuration.

Tom

Am 14.05.12 19:14, schrieb Alex Renger:
> Hello Mr. Schindl... you requested a way to reproduce the
> NullPointerException described by h1055071. I get this same error when
> I create a new RCP app within Eclipse 4.2. I first saw the problem in
> M6 and hoped it would be fixed in M7, but it still exists there. The
> "Hello RCP" example app gives the same NullPointerException.
> I'll try including various things, as mentioned here in your exchange
> with h1055071 -- but please let us know if there's a simple/clean/quick
> way to solve this. In general this RCP thing seems pretty cool; thanks
> for your work on it.
Re: Testing Eclipse 3.7 RCP app in Eclipse 4.2 - NPE [message #871974 is a reply to message #871948] Tue, 15 May 2012 04:32 Go to previous messageGo to next message
Daniel Zimmermann is currently offline Daniel Zimmermann
Messages: 70
Registered: July 2009
Member
As Tom states, try to fullfil the requirements as listed within Lars Vogels turorial (Dammit, I have not enough posts, so I cant send you the link! Search "vogella e4 compatibility" and you will find it! Sorry Tom, I know you've bloged about it, but it's far easier to find Lars' article Wink ).
I too still received errors and had some trouble with it afterwards, but I found is usefull to modify the existing product so far, that beside the plugins Lars mentioned in his article you only need to press the "add required plugins" button and voila...

Daniel
Re: Testing Eclipse 3.7 RCP app in Eclipse 4.2 - NPE [message #872140 is a reply to message #871974] Tue, 15 May 2012 10:26 Go to previous messageGo to next message
Alex Renger is currently offline Alex Renger
Messages: 2
Registered: May 2012
Junior Member
OK, thanks Guys (Tom and Daniel). That does help.
Re: Testing Eclipse 3.7 RCP app in Eclipse 4.2 - NPE [message #872161 is a reply to message #872140] Tue, 15 May 2012 11:11 Go to previous message
Paul Webster is currently offline Paul Webster
Messages: 6850
Registered: July 2009
Location: Ottawa
Senior Member

For RC1 we've added a require-bundle dependency on o.e.equinox.event and o.e.equinox.ds so that the anything generating the required bundle list will pick them up automatically.

PW


Previous Topic:how to change the width of MArea element
Next Topic:Using favicons as title image for MPart in a Stack
Goto Forum:
  


Current Time: Mon Apr 21 00:42:56 EDT 2014

Powered by FUDForum. Page generated in 0.03030 seconds