-
Bug
-
Resolution: Fixed
-
Neutral
-
5.4.5
-
-
Empty show more show less
-
Saigon 74, Saigon 75
-
5
When using the empy-webapp as foundation for any project, the resource-loader module throws an NPE exception upon install. The actual install is not affected.
Stacktrace:
2016-03-11 16:26:21,050 ERROR info.magnolia.module.InstallContextImpl : [56/216 tasks - Magnolia Resource Loader (version 5.4.6-SNAPSHOT)]> Could not install or update resource-loader module. Task 'Setup module repositories' failed. (NullPointerException: ) info.magnolia.module.delta.TaskExecutionException: Could not bootstrap workspace: null at info.magnolia.module.delta.SetupModuleRepositoriesTask.execute(SetupModuleRepositoriesTask.java:91) at info.magnolia.module.ModuleManagerImpl.applyDeltas(ModuleManagerImpl.java:531) at info.magnolia.module.ModuleManagerImpl.installOrUpdateModule(ModuleManagerImpl.java:513) at info.magnolia.module.ModuleManagerImpl$1.doExec(ModuleManagerImpl.java:288) at info.magnolia.context.MgnlContext$VoidOp.exec(MgnlContext.java:421) at info.magnolia.context.MgnlContext$VoidOp.exec(MgnlContext.java:418) at info.magnolia.context.MgnlContext.doInSystemContext(MgnlContext.java:392) at info.magnolia.module.ModuleManagerImpl.performInstallOrUpdate(ModuleManagerImpl.java:282) at info.magnolia.module.ui.ModuleManagerWebUI$2.run(ModuleManagerWebUI.java:123) at java.lang.Thread.run(Thread.java:745) Caused by: java.lang.NullPointerException at info.magnolia.module.delta.SetupModuleRepositoriesTask.grantRepositoryToSuperuser(SetupModuleRepositoriesTask.java:99) at info.magnolia.module.delta.SetupModuleRepositoriesTask.execute(SetupModuleRepositoriesTask.java:86) ... 9 more
How to reproduce
Do a clean install using the empty-webapp (and additionally excluding all lang-modules from the webapp).
Source of the problem
During installation SecuritySupport might not yet be available and therefore is replaced with info.magnolia.cms.security.SecuritySupportObservedComponentFactory.InitPhaseSecuritySupportImpl. This implementation doesn't have an InitPhaseRoleManager so giving access to superuser role (as part of the installation of the module) fails, as the returned role manager is null (see info.magnolia.module.delta.SetupModuleRepositoriesTask#grantRepositoryToSuperuser(String) which is part of every DefaultModuleVersionHandler).
Adding such an InitPhaseRoleManager solves the NPE, but also doesn't properly execute the task, i.e. superuser doesn't have explicit access to the resources workspace after the installation (superuser has access to it thought, only the explicit ACL is missing in the role).
Additional info
It is not yet clear which module addition to the webapp solves the problem (by being installed after core and before resources-module) as the problem doesn't seem to be occuring in community-webapp.
- is duplicated by
-
MAGNOLIA-6598 NPE at SetupModuleRepositoriesTask.grantRepositoryToSuperuser
- Closed
- relates to
-
MAGNOLIA-5634 SecuritySupport will always be null when accessed prior to being initialized
- Closed
-
MAGNOLIA-9097 Instances randomly fail to start up on fast machines
- Closed
-
MAGNOLIA-9214 Instances randomly fail to start up on fast machines
- Closed
- mentioned in
-
Page Loading...