[MGNLLDAP-86] Magnolia Install or Upgrade throws Exception if LDAPUserManager is registered Created: 27/Oct/14  Updated: 01/Aug/17  Resolved: 24/Jul/17

Status: Closed
Project: LDAP Connector
Component/s: None
Affects Version/s: 1.6.3
Fix Version/s: 1.9

Type: Bug Priority: Neutral
Reporter: Marcus Büttner Assignee: Milan Divilek
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled
Documentation update required:
Yes
Sprint: Kromeriz 105, Kromeriz 106
Story Points: 2

 Description   

Installation of magnolia 5.3.4 throws the following exception when LDAPUserManager is registred.

1) Module instance for module [ldap] not available, most likely because the module has not yet been started. Inject a Provider<> instead to get access to the module instance when it's available.
at info.magnolia.objectfactory.guice.GuiceComponentConfigurationModule.bindProvider(GuiceComponentConfigurationModule.java:161)
while locating info.magnolia.jaas.sp.ldap.LDAPModule

1 error
com.google.inject.ProvisionException: Guice provision errors:

1) Module instance for module [ldap] not available, most likely because the module has not yet been started. Inject a Provider<> instead to get access to the module instance when it's available.
at info.magnolia.objectfactory.guice.GuiceComponentConfigurationModule.bindProvider(GuiceComponentConfigurationModule.java:161)
while locating info.magnolia.jaas.sp.ldap.LDAPModule

1 error
at com.google.inject.internal.InjectorImpl$4.get(InjectorImpl.java:987)
at com.google.inject.internal.InjectorImpl.getInstance(InjectorImpl.java:1013)
at info.magnolia.objectfactory.guice.GuiceComponentProvider.getComponent(GuiceComponentProvider.java:102)
at info.magnolia.objectfactory.Components.getComponent(Components.java:96)
at info.magnolia.jaas.sp.ldap.LDAPUtils.isAllowPartialResults(LDAPUtils.java:86)
at info.magnolia.jaas.sp.ldap.LDAPUserManager.getUser(LDAPUserManager.java:75)
at info.magnolia.cms.security.DelegatingUserManager$5.delegate(DelegatingUserManager.java:112)
at info.magnolia.cms.security.DelegatingUserManager$5.delegate(DelegatingUserManager.java:109)
at info.magnolia.cms.security.DelegatingUserManager.delegateUntilSupportedAndNotNull(DelegatingUserManager.java:190)
at info.magnolia.cms.security.DelegatingUserManager.getUser(DelegatingUserManager.java:109)
at info.magnolia.module.delta.AddRoleToUserTask.execute(AddRoleToUserTask.java:57)
at info.magnolia.module.delta.ConditionalDelegateTask.execute(ConditionalDelegateTask.java:61)
at info.magnolia.module.ModuleManagerImpl.applyDeltas(ModuleManagerImpl.java:514)
at info.magnolia.module.ModuleManagerImpl.installOrUpdateModule(ModuleManagerImpl.java:496)
at info.magnolia.module.ModuleManagerImpl$1.doExec(ModuleManagerImpl.java:274)
at info.magnolia.context.MgnlContext$VoidOp.exec(MgnlContext.java:414)
at info.magnolia.context.MgnlContext$VoidOp.exec(MgnlContext.java:411)
at info.magnolia.context.MgnlContext.doInSystemContext(MgnlContext.java:385)
at info.magnolia.module.ModuleManagerImpl.performInstallOrUpdate(ModuleManagerImpl.java:268)
at info.magnolia.module.ui.ModuleManagerWebUI$2.run(ModuleManagerWebUI.java:124)
at java.lang.Thread.run(Thread.java:745)

LDAPUtils tries to resolve the LDAPModule. But the LDAPModule is not available at this time. There is a null check in LDAPUtils but the Provider throws an exception if the module could be resolved. IMHO the result could never be null.


Generated at Mon Feb 12 02:21:26 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.