Community
Participate
Working Groups
Build Identifier: I'm getting NPE when executing Mail Sample (Riena UI). Here is the error trace: > Wed Jun 15 09:52:48 BRT 2011 INFO [Framework Event Dispatcher] org.eclipse.riena.internal.core.Activator$StartupBundleListener Riena is running in stage '<unknown>'. > Wed Jun 15 09:52:48 BRT 2011 INFO [Framework Event Dispatcher] org.eclipse.riena.internal.core.StartupsSafeRunnable Startup: 'org.eclipse.equinox.log' succesful. > Wed Jun 15 09:52:48 BRT 2011 INFO [Framework Event Dispatcher] null BundleEvent STARTED > Wed Jun 15 09:52:48 BRT 2011 INFO [Framework Event Dispatcher] null BundleEvent STARTED > Wed Jun 15 09:52:48 BRT 2011 INFO [Framework Event Dispatcher] null FrameworkEvent INFO > Wed Jun 15 09:52:48 BRT 2011 INFO [Framework Event Dispatcher] null FrameworkEvent INFO > Wed Jun 15 09:52:48 BRT 2011 INFO [Framework Event Dispatcher] null BundleEvent STARTED > Wed Jun 15 09:52:48 BRT 2011 INFO [Framework Event Dispatcher] null BundleEvent STARTED > Wed Jun 15 09:52:48 BRT 2011 INFO [Framework Event Dispatcher] null BundleEvent STARTED > Wed Jun 15 09:52:48 BRT 2011 INFO [Framework Event Dispatcher] null BundleEvent STARTED > Wed Jun 15 09:52:48 BRT 2011 INFO [Thread-1] null {org.eclipse.osgi.framework.console.CommandProvider}={service.id=45} ServiceEvent REGISTERED > Wed Jun 15 09:52:48 BRT 2011 INFO [Framework Event Dispatcher] null BundleEvent STARTED > Wed Jun 15 09:52:48 BRT 2011 INFO [Framework Event Dispatcher] null BundleEvent STARTED > Wed Jun 15 09:52:48 BRT 2011 INFO [Thread-1] null {org.eclipse.riena.ui.filter.IUIFilterProvider}={service.ranking=-100, service.id=46} ServiceEvent REGISTERED > Wed Jun 15 09:52:48 BRT 2011 INFO [Framework Event Dispatcher] null BundleEvent STARTED > Wed Jun 15 09:52:48 BRT 2011 INFO [Framework Event Dispatcher] null BundleEvent STARTED > Wed Jun 15 09:52:48 BRT 2011 INFO [Thread-1] null {org.eclipse.riena.ui.workarea.spi.IWorkareaDefinitionRegistry}={service.ranking=100, service.id=47} ServiceEvent REGISTERED > Wed Jun 15 09:52:48 BRT 2011 INFO [Framework Event Dispatcher] null BundleEvent STARTED > Wed Jun 15 09:52:48 BRT 2011 INFO [Framework Event Dispatcher] null BundleEvent STARTED > Wed Jun 15 09:52:48 BRT 2011 INFO [Thread-1] null {org.eclipse.riena.ui.workarea.spi.IWorkareaDefinitionRegistry}={service.ranking=-100, service.id=48} ServiceEvent REGISTERED > Wed Jun 15 09:52:48 BRT 2011 INFO [Framework Event Dispatcher] null BundleEvent STARTED > Wed Jun 15 09:52:48 BRT 2011 INFO [Framework Event Dispatcher] null BundleEvent STARTED > Wed Jun 15 09:52:48 BRT 2011 INFO [Framework Event Dispatcher] null BundleEvent STARTED > Wed Jun 15 09:52:48 BRT 2011 INFO [Framework Event Dispatcher] null BundleEvent STARTED > Wed Jun 15 09:52:48 BRT 2011 INFO [Framework Event Dispatcher] null BundleEvent STARTED > Wed Jun 15 09:52:48 BRT 2011 INFO [Framework Event Dispatcher] null BundleEvent STARTED > Wed Jun 15 09:52:49 BRT 2011 INFO [Framework Event Dispatcher] null FrameworkEvent INFO > Wed Jun 15 09:52:49 BRT 2011 INFO [Framework Event Dispatcher] null BundleEvent STARTED > Wed Jun 15 09:52:49 BRT 2011 INFO [Thread-1] null {org.eclipse.osgi.service.runnable.StartupMonitor}={service.ranking=2147483647, service.id=49} ServiceEvent REGISTERED > Wed Jun 15 09:52:49 BRT 2011 INFO [Framework Event Dispatcher] null BundleEvent STARTED > Wed Jun 15 09:52:50 BRT 2011 INFO [Framework Event Dispatcher] null BundleEvent STARTED > Wed Jun 15 09:52:51 BRT 2011 DEBUG [Thread-1] org.eclipse.riena.ui.swt.utils.ImageStore Image resource "arrowright.png" not found in: > initial@reference:file:plugins/org.eclipse.riena.ui.swt_3.0.0.v20110614_3_0_0_0.jar/icons > initial@reference:file:../../../../org.eclipse.riena.sample.app.client.mail/icons > Wed Jun 15 09:52:51 BRT 2011 DEBUG [Thread-1] null {org.osgi.service.application.ApplicationHandle, org.eclipse.equinox.app.IApplicationContext}={application.state=RUNNING, eclipse.application.type=main.thread, application.supports.exitvalue=true, eclipse.application.default=true, service.pid=org.eclipse.riena.sample.app.client.mail.mailapp.0, application.descriptor=org.eclipse.riena.sample.app.client.mail.mailapp, service.id=40} ServiceEvent MODIFIED > Wed Jun 15 09:52:51 BRT 2011 INFO [Thread-1] null {org.eclipse.osgi.service.runnable.StartupMonitor}={service.ranking=2147483647, service.id=49} ServiceEvent UNREGISTERING > !SESSION 2011-06-15 09:52:46.675 ----------------------------------------------- > eclipse.buildId=unknown > java.version=1.6.0_24 > java.vendor=Apple Inc. > BootLoader constants: OS=macosx, ARCH=x86_64, WS=cocoa, NL=en_US > Framework arguments: -product org.eclipse.riena.sample.app.client.mail.product > Command-line arguments: -product org.eclipse.riena.sample.app.client.mail.product -data /Users/cvgaviao/Workspaces/Riena-Tutoriais/../runtime-rcp.mail.product -dev file:/Users/cvgaviao/Workspaces/Riena-Tutoriais/.metadata/.plugins/org.eclipse.pde.core/Mail Sample (Riena UI)/dev.properties -os macosx -ws cocoa -arch x86_64 -consolelog > > !ENTRY org.eclipse.riena.core 4 0 2011-06-15 09:52:51.426 > !MESSAGE Unhandled event loop exception > !STACK 0 > java.lang.NullPointerException > at org.eclipse.riena.navigation.ui.swt.presentation.SwtViewProvider.getSwtViewId(SwtViewProvider.java:85) > at org.eclipse.riena.navigation.ui.swt.views.ApplicationViewAdvisor$MySubApplicationNodeListener.showPerspective(ApplicationViewAdvisor.java:646) > at org.eclipse.riena.navigation.ui.swt.views.ApplicationViewAdvisor$MySubApplicationNodeListener.activated(ApplicationViewAdvisor.java:633) > at org.eclipse.riena.navigation.ui.swt.views.ApplicationViewAdvisor$MySubApplicationNodeListener.activated(ApplicationViewAdvisor.java:1) > at org.eclipse.riena.navigation.listener.NavigationTreeObserver$MySubApplicationNodeListener.activated(NavigationTreeObserver.java:439) > at org.eclipse.riena.navigation.listener.NavigationTreeObserver$MySubApplicationNodeListener.activated(NavigationTreeObserver.java:1) > at org.eclipse.riena.navigation.model.NavigationNode.notifyActivated(NavigationNode.java:198) > at org.eclipse.riena.navigation.model.NavigationNode.activate(NavigationNode.java:799) > at org.eclipse.riena.navigation.model.NavigationProcessor.activate(NavigationProcessor.java:1136) > at org.eclipse.riena.navigation.model.NavigationProcessor.activate(NavigationProcessor.java:118) > at org.eclipse.riena.navigation.model.NavigationNode.activate(NavigationNode.java:435) > at org.eclipse.riena.navigation.ui.swt.views.ApplicationAdvisor.postStartup(ApplicationAdvisor.java:81) > at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2631) > at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2494) > at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:674) > at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332) > at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:667) > at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) > at org.eclipse.riena.navigation.ui.swt.application.SwtApplication.createView(SwtApplication.java:72) > at org.eclipse.riena.navigation.ui.application.AbstractApplication.start(AbstractApplication.java:79) > 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:344) > 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:622) > at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577) > at org.eclipse.equinox.launcher.Main.run(Main.java:1410) > at org.eclipse.equinox.launcher.Main.main(Main.java:1386) > Wed Jun 15 09:52:51 BRT 2011 ERROR [Thread-1] org.eclipse.riena.internal.core.exceptionmanager.SimpleExceptionHandlerManager Unhandled event loop exception > java.lang.NullPointerException > at org.eclipse.riena.navigation.ui.swt.presentation.SwtViewProvider.getSwtViewId(SwtViewProvider.java:85) > at org.eclipse.riena.navigation.ui.swt.views.ApplicationViewAdvisor$MySubApplicationNodeListener.showPerspective(ApplicationViewAdvisor.java:646) > at org.eclipse.riena.navigation.ui.swt.views.ApplicationViewAdvisor$MySubApplicationNodeListener.activated(ApplicationViewAdvisor.java:633) > at org.eclipse.riena.navigation.ui.swt.views.ApplicationViewAdvisor$MySubApplicationNodeListener.activated(ApplicationViewAdvisor.java:1) > at org.eclipse.riena.navigation.listener.NavigationTreeObserver$MySubApplicationNodeListener.activated(NavigationTreeObserver.java:439) > at org.eclipse.riena.navigation.listener.NavigationTreeObserver$MySubApplicationNodeListener.activated(NavigationTreeObserver.java:1) > at org.eclipse.riena.navigation.model.NavigationNode.notifyActivated(NavigationNode.java:198) > at org.eclipse.riena.navigation.model.NavigationNode.activate(NavigationNode.java:799) > at org.eclipse.riena.navigation.model.NavigationProcessor.activate(NavigationProcessor.java:1136) > at org.eclipse.riena.navigation.model.NavigationProcessor.activate(NavigationProcessor.java:118) > at org.eclipse.riena.navigation.model.NavigationNode.activate(NavigationNode.java:435) > at org.eclipse.riena.navigation.ui.swt.views.ApplicationAdvisor.postStartup(ApplicationAdvisor.java:81) > at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2631) > at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2494) > at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:674) > at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332) > at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:667) > at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) > at org.eclipse.riena.navigation.ui.swt.application.SwtApplication.createView(SwtApplication.java:72) > at org.eclipse.riena.navigation.ui.application.AbstractApplication.start(AbstractApplication.java:79) > 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:344) > 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:622) > at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577) > at org.eclipse.equinox.launcher.Main.run(Main.java:1410) > at org.eclipse.equinox.launcher.Main.main(Main.java:1386) > Wed Jun 15 09:52:51 BRT 2011 DEBUG [Thread-1] null {org.osgi.service.application.ApplicationHandle, org.eclipse.equinox.app.IApplicationContext}={application.state=STOPPING, eclipse.application.type=main.thread, application.supports.exitvalue=true, eclipse.application.default=true, service.pid=org.eclipse.riena.sample.app.client.mail.mailapp.0, application.descriptor=org.eclipse.riena.sample.app.client.mail.mailapp, service.id=40} ServiceEvent MODIFIED > Wed Jun 15 09:52:51 BRT 2011 DEBUG [Thread-1] null {org.osgi.service.application.ApplicationHandle, org.eclipse.equinox.app.IApplicationContext}={application.state=org.eclipse.equinox.app.stopped, eclipse.application.type=main.thread, application.supports.exitvalue=true, eclipse.application.default=true, service.pid=org.eclipse.riena.sample.app.client.mail.mailapp.0, application.descriptor=org.eclipse.riena.sample.app.client.mail.mailapp, service.id=40} ServiceEvent MODIFIED > Wed Jun 15 09:52:51 BRT 2011 DEBUG [Thread-1] null {org.osgi.service.application.ApplicationDescriptor}={eclipse.application.type=main.thread, application.name=, application.visible=false, application.container=org.eclipse.equinox.app, service.pid=org.eclipse.equinox.app.error, application.launchable=true, application.locked=false, application.location=initial@reference:file:plugins/org.eclipse.equinox.app_1.3.100.v20110321.jar/, service.id=39} ServiceEvent MODIFIED > Wed Jun 15 09:52:51 BRT 2011 DEBUG [Thread-1] null {org.osgi.service.application.ApplicationDescriptor}={eclipse.application.type=main.thread, application.name=, application.visible=true, application.container=org.eclipse.equinox.app, service.pid=org.eclipse.riena.sample.app.client.mail.mailapp, application.launchable=true, eclipse.application.default=true, application.locked=false, application.location=initial@reference:file:../../../../org.eclipse.riena.sample.app.client.mail/, service.id=38} ServiceEvent MODIFIED > Wed Jun 15 09:52:51 BRT 2011 INFO [Thread-1] null {org.osgi.service.application.ApplicationHandle, org.eclipse.equinox.app.IApplicationContext}={application.state=org.eclipse.equinox.app.stopped, eclipse.application.type=main.thread, application.supports.exitvalue=true, eclipse.application.default=true, service.pid=org.eclipse.riena.sample.app.client.mail.mailapp.0, application.descriptor=org.eclipse.riena.sample.app.client.mail.mailapp, service.id=40} ServiceEvent UNREGISTERING > Wed Jun 15 09:52:51 BRT 2011 INFO [Thread-1] null {org.eclipse.osgi.service.runnable.ApplicationLauncher}={service.id=42} ServiceEvent UNREGISTERING > Wed Jun 15 09:52:51 BRT 2011 INFO [Thread-1] null {org.eclipse.osgi.service.runnable.StartupMonitor}={service.ranking=-2147483648, service.id=1} ServiceEvent UNREGISTERING > Wed Jun 15 09:52:51 BRT 2011 INFO [Thread-1] null {org.eclipse.osgi.framework.console.CommandProvider}={service.ranking=2147483647, service.id=2} ServiceEvent UNREGISTERING > Wed Jun 15 09:52:51 BRT 2011 INFO [Framework Event Dispatcher] null BundleEvent STOPPED > Wed Jun 15 09:52:51 BRT 2011 INFO [Thread-1] null {org.eclipse.riena.ui.workarea.spi.IWorkareaDefinitionRegistry}={service.ranking=-100, service.id=48} ServiceEvent UNREGISTERING > Wed Jun 15 09:52:51 BRT 2011 INFO [Framework Event Dispatcher] null BundleEvent STOPPED > Wed Jun 15 09:52:51 BRT 2011 INFO [Framework Event Dispatcher] null BundleEvent STOPPED > Wed Jun 15 09:52:51 BRT 2011 INFO [Framework Event Dispatcher] null BundleEvent STOPPED > Wed Jun 15 09:52:51 BRT 2011 INFO [Framework Event Dispatcher] null BundleEvent STOPPED > Wed Jun 15 09:52:51 BRT 2011 INFO [Framework Event Dispatcher] null BundleEvent STOPPED > Wed Jun 15 09:52:51 BRT 2011 INFO [Thread-1] null {org.eclipse.osgi.framework.console.CommandProvider}={service.id=45} ServiceEvent UNREGISTERING > Wed Jun 15 09:52:51 BRT 2011 INFO [Framework Event Dispatcher] null BundleEvent STOPPED > Wed Jun 15 09:52:51 BRT 2011 INFO [Framework Event Dispatcher] null BundleEvent STOPPED > Wed Jun 15 09:52:51 BRT 2011 INFO [Thread-1] null {org.eclipse.riena.ui.workarea.spi.IWorkareaDefinitionRegistry}={service.ranking=100, service.id=47} ServiceEvent UNREGISTERING > Wed Jun 15 09:52:51 BRT 2011 INFO [Thread-1] null {org.eclipse.riena.ui.filter.IUIFilterProvider}={service.ranking=-100, service.id=46} ServiceEvent UNREGISTERING > Wed Jun 15 09:52:51 BRT 2011 INFO [Framework Event Dispatcher] null BundleEvent STOPPED Reproducible: Always Steps to Reproduce: 1. setup launcher Mail Sample (Riena UI) 2. call it 3.
Like mentioned before on riena-dev, this was probably caused by accidentally installed RAP bundles. We updated the Riena targetplatform installation documentation in our wiki, to prevent this from happening: http://wiki.eclipse.org/Riena_Downloads_%E2%80%93_Installation_%E2%80%93_Setup#Installation If this solved your problem, please let us know so we can close this bug.
Created attachment 198083 [details] My Target Platform Definition File
Hi, thanks for updating the docs, it will save some people from mistakes. But unfortunately this doesn't resolve the problem stated. I've mount another eclipse installation with a new workspace, without RAP bundles. I'm attaching the target definition file, so you can take a look what was installed on my mac. cheers Cristiano
I've tested this on Mac and Windows and found out, that it's not specific to MacOs. It's just a bug in the SWTViewProvider.getSwtViewId(). There is an assert to check if the node is already registered, but the nodeId is null and therefore a NPE is raised. But I'm not sure why all our other applications didn't stumble upon this issue.
I fixed the NPE in SWTViewProvider and cleaned up the code in the mail-demo.
Created attachment 198173 [details] Patch for Riena 3.0 to fix the NPE in the SwtViewProvider
To fix this you can either look for code in your application that creates a NavigationNode without a NavigationNodeId or apply the provided patch.
To fix this in the Riena Mail Sample open the org.eclipse.riena.sample.app.client.mail.Application and replace the line 36: final ISubApplicationNode subApp = new SubApplicationNode("Your Mail"); //$NON-NLS-1$ with this line final ISubApplicationNode subApp = new SubApplicationNode(new NavigationNodeId("yourmail"), "Your Mail"); //$NON-NLS-1$ //$NON-NLS-2$
Doing the fix that you recommend I could open the client application. Don't know if it related, but I'm still seeing a error on console: Sat Jun 18 16:31:01 BRT 2011 INFO [Thread-1] null {org.eclipse.ui.IWorkbench}={service.id=50} ServiceEvent REGISTERED 2011-06-18 16:31:01.344 java[48388:903] ERROR: Can't have a toolbar in a window with <NSNextStepFrame: 0x1001da5e0> as it's borderview cheers Cristiano
Forget to ask... New applications created by Riena Toolbox has the same problematic code than Email app. I would like to know if with the patch that you provided its safe to use this sentence create by toolbox: ISubApplicationNode subApplication = new SubApplicationNode("Customers"); or I do need to change for this syntax: ISubApplicationNode subApplication = new SubApplicationNode(new NavigationNodeId("customers", "Customers")); thanks
you should (In reply to comment #10) > Forget to ask... > > New applications created by Riena Toolbox has the same problematic code than > Email app. > > > I would like to know if with the patch that you provided its safe to use this > sentence create by toolbox: > > ISubApplicationNode subApplication = new > SubApplicationNode("Customers"); > > or I do need to change for this syntax: > > ISubApplicationNode subApplication = new SubApplicationNode(new > NavigationNodeId("customers", "Customers")); > > thanks you should change it to the later syntax. We'll look into the problem with the toolbox on monday. Until then Its a good idea to manually change to code to create a SubApplicationNode based on a NavigationNodeId rather than just based on a string.