Uploaded image for project: 'Magnolia UI'
  1. Magnolia UI
  2. MGNLUI-1800

Errors in apps breaks admincentral

XMLWordPrintable

      When an app encounters a problem, either because of a configuration error, such as starting an app that is not correctly configured or when it throws an exception because of a programming error, admincentral breaks because it gets stalled in app loading mode.

      We need a plan for how we deal with this, either just close the app and go back to app launcher, or insert a view that informs the user about the error.

      Here's two scenarios in which this happens:

      Launching an app that doesn't have any sub apps

      java.lang.NullPointerException
      	at info.magnolia.ui.framework.app.AppControllerImpl.updateLocation(AppControllerImpl.java:358)
      	at info.magnolia.ui.framework.app.AppControllerImpl.onLocationChanged(AppControllerImpl.java:324)
      	at info.magnolia.ui.api.location.LocationChangedEvent.dispatch(LocationChangedEvent.java:64)
      	at info.magnolia.ui.api.location.LocationChangedEvent.dispatch(LocationChangedEvent.java:42)
      	at info.magnolia.event.SimpleEventBus.fireEvent(SimpleEventBus.java:78)
      	at info.magnolia.ui.api.location.LocationController.goToWithoutChecks(LocationController.java:105)
      	at info.magnolia.ui.api.location.LocationController.goTo(LocationController.java:99)
      	at info.magnolia.ui.api.location.LocationHistoryHandler.handleFragment(LocationHistoryHandler.java:120)
      	at info.magnolia.ui.api.location.LocationHistoryHandler.access$100(LocationHistoryHandler.java:49)
      	at info.magnolia.ui.api.location.LocationHistoryHandler$1.onFragmentChanged(LocationHistoryHandler.java:79)
      	at info.magnolia.ui.api.shell.FragmentChangedEvent.dispatch(FragmentChangedEvent.java:55)
      	at info.magnolia.ui.api.shell.FragmentChangedEvent.dispatch(FragmentChangedEvent.java:41)
      	at info.magnolia.event.EventHandlerCollection.dispatch(EventHandlerCollection.java:72)
      	at info.magnolia.ui.framework.shell.ShellImpl$2.onFragmentChanged(ShellImpl.java:132)
      	at info.magnolia.ui.vaadin.magnoliashell.MagnoliaShell.notifyOnFragmentChanged(MagnoliaShell.java:272)
      	at info.magnolia.ui.framework.shell.ShellImpl.goToApp(ShellImpl.java:263)
      	at info.magnolia.ui.framework.shell.ShellImpl.access$500(ShellImpl.java:80)
      	at info.magnolia.ui.framework.shell.ShellImpl$2.goToApp(ShellImpl.java:152)
      	at info.magnolia.ui.vaadin.magnoliashell.MagnoliaShell.goToApp(MagnoliaShell.java:131)
      	at info.magnolia.ui.vaadin.magnoliashell.rpc.MagnoliaShellRpcDelegate.activateApp(MagnoliaShellRpcDelegate.java:68)
      	at sun.reflect.GeneratedMethodAccessor278.invoke(Unknown Source)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      	at java.lang.reflect.Method.invoke(Method.java:597)
      	at com.vaadin.server.ServerRpcManager.applyInvocation(ServerRpcManager.java:168)
      	at com.vaadin.server.ServerRpcManager.applyInvocation(ServerRpcManager.java:118)
      	at com.vaadin.server.AbstractCommunicationManager.handleBurst(AbstractCommunicationManager.java:1680)
      	at com.vaadin.server.AbstractCommunicationManager.handleVariables(AbstractCommunicationManager.java:1566)
      	at com.vaadin.server.AbstractCommunicationManager.handleUidlRequest(AbstractCommunicationManager.java:582)
      	at com.vaadin.server.VaadinServlet.service(VaadinServlet.java:315)
      	at com.vaadin.server.VaadinServlet.service(VaadinServlet.java:201)
      

      Launching an app that has sub apps but no app class set

      java.lang.NullPointerException
      	at info.magnolia.objectfactory.ObjectManufacturer.newInstance(ObjectManufacturer.java:59)
      	at info.magnolia.objectfactory.guice.GuiceComponentProvider.newInstanceWithParameterResolvers(GuiceComponentProvider.java:118)
      	at info.magnolia.objectfactory.guice.GuiceComponentProvider.newInstance(GuiceComponentProvider.java:108)
      	at info.magnolia.ui.framework.app.AppInstanceControllerImpl.start(AppInstanceControllerImpl.java:212)
      	at info.magnolia.ui.framework.app.AppControllerImpl.doStartIfNotAlreadyRunning(AppControllerImpl.java:254)
      	at info.magnolia.ui.framework.app.AppControllerImpl.onLocationChanged(AppControllerImpl.java:335)
      	at info.magnolia.ui.api.location.LocationChangedEvent.dispatch(LocationChangedEvent.java:64)
      	at info.magnolia.ui.api.location.LocationChangedEvent.dispatch(LocationChangedEvent.java:42)
      	at info.magnolia.event.SimpleEventBus.fireEvent(SimpleEventBus.java:78)
      	at info.magnolia.ui.api.location.LocationController.goToWithoutChecks(LocationController.java:105)
      	at info.magnolia.ui.api.location.LocationController.goTo(LocationController.java:99)
      	at info.magnolia.ui.api.location.LocationHistoryHandler.handleFragment(LocationHistoryHandler.java:120)
      	at info.magnolia.ui.api.location.LocationHistoryHandler.access$100(LocationHistoryHandler.java:49)
      	at info.magnolia.ui.api.location.LocationHistoryHandler$1.onFragmentChanged(LocationHistoryHandler.java:79)
      	at info.magnolia.ui.api.shell.FragmentChangedEvent.dispatch(FragmentChangedEvent.java:55)
      	at info.magnolia.ui.api.shell.FragmentChangedEvent.dispatch(FragmentChangedEvent.java:41)
      	at info.magnolia.event.EventHandlerCollection.dispatch(EventHandlerCollection.java:72)
      	at info.magnolia.ui.framework.shell.ShellImpl$2.onFragmentChanged(ShellImpl.java:132)
      	at info.magnolia.ui.vaadin.magnoliashell.MagnoliaShell.notifyOnFragmentChanged(MagnoliaShell.java:272)
      	at info.magnolia.ui.framework.shell.ShellImpl.goToApp(ShellImpl.java:263)
      	at info.magnolia.ui.framework.shell.ShellImpl.access$500(ShellImpl.java:80)
      	at info.magnolia.ui.framework.shell.ShellImpl$2.goToApp(ShellImpl.java:152)
      	at info.magnolia.ui.vaadin.magnoliashell.MagnoliaShell.goToApp(MagnoliaShell.java:131)
      	at info.magnolia.ui.vaadin.magnoliashell.rpc.MagnoliaShellRpcDelegate.activateApp(MagnoliaShellRpcDelegate.java:68)
      	at sun.reflect.GeneratedMethodAccessor278.invoke(Unknown Source)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      	at java.lang.reflect.Method.invoke(Method.java:597)
      	at com.vaadin.server.ServerRpcManager.applyInvocation(ServerRpcManager.java:168)
      	at com.vaadin.server.ServerRpcManager.applyInvocation(ServerRpcManager.java:118)
      	at com.vaadin.server.AbstractCommunicationManager.handleBurst(AbstractCommunicationManager.java:1680)
      	at com.vaadin.server.AbstractCommunicationManager.handleVariables(AbstractCommunicationManager.java:1566)
      	at com.vaadin.server.AbstractCommunicationManager.handleUidlRequest(AbstractCommunicationManager.java:582)
      	at com.vaadin.server.VaadinServlet.service(VaadinServlet.java:315)
      	at com.vaadin.server.VaadinServlet.service(VaadinServlet.java:201)
      

      Launching a content app with none of the configured content views set as "active" will break the admin central:

      2013-07-08 17:03:33,492 WARN  info.magnolia.event.SimpleEventBus                : Exception caught when dispatching event: null
      java.lang.NullPointerException
      	at info.magnolia.ui.workbench.WorkbenchPresenter.setViewType(WorkbenchPresenter.java:165)
      	at info.magnolia.ui.workbench.WorkbenchPresenter.resynch(WorkbenchPresenter.java:247)
      	at info.magnolia.ui.contentapp.browser.BrowserPresenter.resync(BrowserPresenter.java:239)
      	at info.magnolia.ui.contentapp.browser.BrowserSubApp.restoreBrowser(BrowserSubApp.java:209)
      

      info.magnolia.ui.workbench.WorkbenchPresenter#start
      we should not rely on a property called "active" (meaning default?). Instead we should use the first configured contentview as default. Same pattern we are using for the configured sub apps

        Acceptance criteria

              apchelintcev Aleksandr Pchelintcev
              tmattsson Tobias Mattsson
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved:

                  Bug DoR
                  Task DoD