UserObject must not be null - at com.mendix.basis.session.User.(User.java:47)

0
Hello guys,    Noticed a lot of following errors in log files (Prodiction):  ERROR - ActionManager: Exception in execution of monitored action 'Project.DocumentserverstatusStart' (execution id: 81cb6b7f-80ae-43ca-873a-76347282d1f7, execution type: SCHEDULED_EVENT)    ERROR - ActionManager: com.mendix.modules.microflowengine.MicroflowException: com.mendix.systemwideinterfaces.MendixRuntimeException: java.lang.IllegalArgumentException: UserObject must not be null.       at Casix.StartMicroflowAlsAchtergrondgebruiker (JavaAction : 'executeMicroflowNameAsUser')       at Casix.DocumentserverstatusStart (SubMicroflow : 'StartMicroflowAlsAchtergrondgebruiker')    Advanced stacktrace:        at com.mendix.modules.microflowengine.MicroflowUtil.processException(MicroflowUtil.java:154)    Caused by: com.mendix.core.CoreRuntimeException: com.mendix.systemwideinterfaces.MendixRuntimeException: java.lang.IllegalArgumentException: UserObject must not be null.       at com.mendix.basis.actionmanagement.ActionManagerBase.executeSync(ActionManagerBase.java:156) java.lang.IllegalArgumentException | UserObject must not be null. | com.mendix.systemwideinterfaces.MendixRuntimeException: java.lang.IllegalArgumentException: UserObject must not be null. at com.mendix.basis.actionmanagement.ActionManagerBase.executeSync(ActionManagerBase.java:156) Caused by: java.lang.IllegalArgumentException: UserObject must not be null. at com.mendix.util.classloading.Runner.doRunUsingClassLoaderOf(Runner.java:30) Caused by: UserObject must not be null. at com.mendix.basis.session.User.(User.java:47) at com.mendix.basis.session.PersistentSession.(PersistentSession.scala:35) at com.mendix.basis.session.PersistentSession.(PersistentSession.scala:43) at com.mendix.basis.session.SessionFactory$.createPersistentSession(SessionFactory.scala:80) at com.mendix.basis.session.SessionManager.$anonfun$getSessions$1(SessionManager.scala:29) at scala.collection.TraversableLike.$anonfun$map$1(TraversableLike.scala:238) at scala.collection.Iterator.foreach(Iterator.scala:941) at scala.collection.Iterator.foreach$(Iterator.scala:941) at scala.collection.AbstractIterator.foreach(Iterator.scala:1429) at scala.collection.IterableLike.foreach(IterableLike.scala:74) at scala.collection.IterableLike.foreach$(IterableLike.scala:73) at scala.collection.AbstractIterable.foreach(Iterable.scala:56) at scala.collection.TraversableLike.map(TraversableLike.scala:238) at scala.collection.TraversableLike.map$(TraversableLike.scala:231) at scala.collection.AbstractTraversable.map(Traversable.scala:108) at com.mendix.basis.session.SessionManager.getSessions(SessionManager.scala:29) at com.mendix.basis.component.InternalCoreBase.getActiveSessions(InternalCoreBase.java:418) at com.mendix.basis.component.InternalCoreBase.getActiveSession(InternalCoreBase.java:409) at com.mendix.core.Core.getActiveSession(Core.java:1714) at communitycommons.Misc.getSessionFor(Misc.java:306) at communitycommons.Misc.getContextFor(Misc.java:294) at communitycommons.Misc.executeMicroflowAsUser(Misc.java:358) at communitycommons.actions.executeMicroflowAsUser_1.executeAction(executeMicroflowAsUser_1.java Tried to reproduce this issue in local env, but no success. Different scenarios have been used to try to get this one and it is related to different java actions, not only from example.  Has anyone experienced something like this and has a clue why this is happening?    Thank you in advance,  Regards, David
asked
2 answers
1

It looks like you are using executeMicroflowAsUser_1 from Community Commons, but the user name you are passing in can’t be found on the system, so it can’t execute the microflow.

I suggest checking that the user being passed into this Java Action still exists in your system. It may have been removed or renamed.

Good luck!

answered
0

If the action is triggered by MxAdmin it can cause this behaviour since MxAdmin doesn’t have an account, he does his action as if he was the server itselfs.

Same behaviour if the action is used in a scheduled event.

answered