[MGNLWORKFLOW-210] Migration failed when the customer is using LDAP Created: 13/Feb/14  Updated: 19/May/22  Resolved: 19/May/22

Status: Closed
Project: Magnolia Workflow Module
Component/s: None
Affects Version/s: 5.2.2
Fix Version/s: 5.3.x

Type: Bug Priority: Neutral
Reporter: Magnolia International Assignee: Unassigned
Resolution: Won't Do Votes: 0
Labels: maintenance, quickwin
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
Date of First Response:

 Description   

The customer is using LDAP, its LDAP usermanager is located before the admin usermanager. Thus a call to UserManager.getUser('eric') will fetch the user eric from LDAP...

Changing the order of the usermanager solves the issue, but this workaround cannot be used by the customer.

Here is the stacktrace thrown during the migration :

2014-02-12 15:40:05,282 ERROR info.magnolia.module.InstallContextImpl : > Error while installing or updating workflow module. Task 'Update group for user eric' failed. (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)
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.AddUserToGroupTask.execute(AddUserToGroupTask.java:57)
at info.magnolia.module.delta.ConditionalDelegateTask.execute(ConditionalDelegateTask.java:61)
at info.magnolia.module.ModuleManagerImpl.applyDeltas(ModuleManagerImpl.java:509)
at info.magnolia.module.ModuleManagerImpl.installOrUpdateModule(ModuleManagerImpl.java:491)
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.ModuleManagerNullUI.onStartup(ModuleManagerNullUI.java:66)
at info.magnolia.cms.beans.config.ConfigLoader.load(ConfigLoader.java:149)
at info.magnolia.init.MagnoliaServletContextListener$1.doExec(MagnoliaServletContextListener.java:248)
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.init.MagnoliaServletContextListener.startServer(MagnoliaServletContextListener.java:245)
at info.magnolia.init.MagnoliaServletContextListener.contextInitialized(MagnoliaServletContextListener.java:171)
at info.magnolia.init.MagnoliaServletContextListener.contextInitialized(MagnoliaServletContextListener.java:125)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4701)
at org.apache.catalina.core.StandardContext$1.call(StandardContext.java:5204)
at org.apache.catalina.core.StandardContext$1.call(StandardContext.java:5199)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
2014-02-12 15:40:05,283 ERROR info.magnolia.cms.beans.config.ConfigLoader : An unspecified error occurred during initialization: Guice provision errors:



 Comments   
Comment by Jan Haderka [ 13/Feb/14 ]

Eric and Peter are demo users, the update task to update this user should run only and only when samples are installed, otherwise it should not.
What does the task do anyway? Is it updating uuid of the group that has changed? In that case it should probably update it for all users using such a group directly on jcr level no?

Comment by Magnolia International [ 26/May/14 ]

Right, according to the code, user eric is installed only if demo-project is installed. Removing this dependency (with maven exclude) should fix the issue.

Comment by Roman Kovařík [ 19/May/22 ]

Hello,

This ticket is now marked as closed due to one of the following reasons:

  • A long period of inactivity
  • Uses an old or Beta version of an application, module, or framework that we no longer support
  • The issue is no longer reproducible or has been fixed in later versions

If you are still facing a problem or consider this issue still relevant, please feel free to re-open the ticket and we will reach out to you.

Thank you,
The Magnolia Team

Generated at Mon Feb 12 10:07:50 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.