[MGNLDATA-257] Cannot start companyApp after update from Magnolia 4.5.19 Created: 18/Jun/14  Updated: 29/Oct/15  Resolved: 07/Aug/14

Status: Closed
Project: Magnolia Data Module (closed)
Component/s: None
Affects Version/s: 2.3
Fix Version/s: 2.3.2

Type: Bug Priority: Major
Reporter: Roman Kovařík Assignee: Mikaël Geljić
Resolution: Fixed Votes: 0
Labels: migration
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Text File diff.txt    
Issue Links:
Cloners
is cloned by MGNLDATA-261 Migration diffs when migrating from 4... Closed
is cloned by MGNLFORUM-265 Cannot start Forums app after update ... Closed
dependency
depends upon MGNLUI-3085 ContentAppMigrationTask uses QueryTas... Closed
depends upon MAGNOLIA-5857 Provide a NodeVisitorTask and emphasi... Closed
Template:
Acceptance criteria:
Empty
Date of First Response:
Epic Link: Migration (4.5 to 5.3.x)

 Description   
2014-06-18 10:12:09,623 WARN  info.magnolia.event.SimpleEventBus                : Exception caught when dispatching a class info.magnolia.ui.api.location.LocationChangedEvent event with class info.magnolia.ui.framework.app.AppControllerImpl eventHandler.
java.lang.NullPointerException
	at info.magnolia.objectfactory.ObjectManufacturer.newInstance(ObjectManufacturer.java:62)
	at info.magnolia.objectfactory.guice.GuiceComponentProvider.newInstanceWithParameterResolvers(GuiceComponentProvider.java:121)
	at info.magnolia.objectfactory.guice.GuiceComponentProvider.newInstance(GuiceComponentProvider.java:107)
	at info.magnolia.ui.framework.availability.AvailabilityCheckerImpl.prepareRules(AvailabilityCheckerImpl.java:104)
	at info.magnolia.ui.framework.availability.AvailabilityCheckerImpl.isAvailable(AvailabilityCheckerImpl.java:83)
	at info.magnolia.ui.contentapp.browser.BrowserSubApp.updateActionbar(BrowserSubApp.java:333)
	at info.magnolia.ui.contentapp.browser.BrowserSubApp.restoreBrowser(BrowserSubApp.java:216)
	at info.magnolia.ui.contentapp.browser.BrowserSubApp.start(BrowserSubApp.java:165)
	at info.magnolia.ui.contentapp.browser.BrowserSubApp.start(BrowserSubApp.java:107)
	at info.magnolia.ui.framework.app.AppInstanceControllerImpl.startSubApp(AppInstanceControllerImpl.java:374)
	at info.magnolia.ui.framework.app.AppInstanceControllerImpl.openSubApp(AppInstanceControllerImpl.java:333)
	at info.magnolia.ui.framework.app.BaseApp.start(BaseApp.java:71)
	at info.magnolia.ui.framework.app.AppInstanceControllerImpl.start(AppInstanceControllerImpl.java:219)
	at info.magnolia.ui.framework.app.AppControllerImpl.doStartIfNotAlreadyRunning(AppControllerImpl.java:257)
	at info.magnolia.ui.framework.app.AppControllerImpl.onLocationChanged(AppControllerImpl.java:337)
	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:103)
	at info.magnolia.ui.api.location.LocationController.goTo(LocationController.java:97)
	at info.magnolia.ui.framework.app.AppControllerImpl.onLocationChanged(AppControllerImpl.java:328)
	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:103)
	at info.magnolia.ui.api.location.LocationController.goTo(LocationController.java:97)
	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:130)
	at info.magnolia.ui.vaadin.magnoliashell.MagnoliaShell.notifyOnFragmentChanged(MagnoliaShell.java:275)
	at info.magnolia.ui.framework.shell.ShellImpl.goToApp(ShellImpl.java:262)
	at info.magnolia.ui.framework.shell.ShellImpl.access$500(ShellImpl.java:78)
	at info.magnolia.ui.framework.shell.ShellImpl$2.goToApp(ShellImpl.java:150)
	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.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 com.vaadin.server.ServerRpcManager.applyInvocation(ServerRpcManager.java:168)
	at com.vaadin.server.ServerRpcManager.applyInvocation(ServerRpcManager.java:118)
	at com.vaadin.server.communication.ServerRpcHandler.handleBurst(ServerRpcHandler.java:214)
	at com.vaadin.server.communication.ServerRpcHandler.handleRpc(ServerRpcHandler.java:111)
	at com.vaadin.server.communication.UidlRequestHandler.synchronizedHandleRequest(UidlRequestHandler.java:91)
	at com.vaadin.server.SynchronizedRequestHandler.handleRequest(SynchronizedRequestHandler.java:37)
	at com.vaadin.server.VaadinService.handleRequest(VaadinService.java:1371)
	at com.vaadin.server.VaadinServlet.service(VaadinServlet.java:238)
	at info.magnolia.ui.admincentral.AdmincentralVaadinServlet.service(AdmincentralVaadinServlet.java:131)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
	at info.magnolia.cms.filters.ServletDispatchingFilter.doFilter(ServletDispatchingFilter.java:147)
	at info.magnolia.cms.filters.AbstractMgnlFilter.doFilter(AbstractMgnlFilter.java:90)
	at info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:80)


 Comments   
Comment by Mikaël Geljić [ 20/Jun/14 ]

There is a config delta between 4.5-migrated and fresh install, although such delta does not appear when migrating from 5.2.

It hints at some upgrade tasks occurring in the wrong session/context.

See attached diff.txt; there seems to be issues with:

  • migration of availability rules
  • default availability of actionbar sections
  • missing contentConnector migration for details subApps.
Comment by Mikaël Geljić [ 07/Jul/14 ]

Okay, wrong guess here. It looks like for binary-incompatibility reasons between 5.2-5.3, the DataTypeToContentAppMigrationTask was adjusted, in particular re: newly introduced AvailabilityRuleDefinition.

1. This was probably the wrong thing to do because this task is still registered in 5.2 delta, while ContentAppMigrationTask is the one supposed to cover config changes from 5.2 to 5.3.
2. Furthermore, it looks like this adaptation has never been tested; it doesn't even produce the right configuration! It never sets implementationClass for rule definitions.

=> We must revert the logic of converting data-types to content-apps (configuration) to the 5.2.x style. Then leave it to ContentAppMigrationTask to do the rest.
For binary incompatibilities, we may have to:

  • change code to operate at JCR node/property level (rather than populate definition classes for convenience)
  • use fully qualified class names as Strings for classes which have changed/moved or were dropped since 5.2.
Comment by Mikaël Geljić [ 29/Jul/14 ]

In addition to the poor task adjustments mentioned above, it appeared 5.3's ContentAppMigrationTask carries a bunch of QueryTasks, where we cannot guarantee the outcome.
In case of migration from 4.5 to 5.3, data apps created by the DataTypesToContentAppsTask are not yet persisted in the workspace and may NOT be accounted for by the query.
There are a couple of query-based tasks in data module itself as well.

Generated at Mon Feb 12 05:12:52 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.