Starting Mendix Runtime failed

0
Hi All,    I have two Branch named:  Branch A and Branch B, Branch A  can run without errors, Branch B is copy of the latest revision of Branch A, My issue is Branch B get errors when running eventhough branch A has no error , I'm confused what causes the problem, please help.     Here is the Error message: An exception occurred while running the after-startup-action. -------- com.mendix.core.CoreRuntimeException: com.mendix.systemwideinterfaces.MendixRuntimeException: com.mendix.core.CoreRuntimeException: Exception occurred in action '{"current_activity":{"type":"End"},"name":"CommonUtils.AfterStartUp","type":"Microflow"}', all database changes executed by this action were rolled back    at com.mendix.basis.actionmanagement.ActionManager.executeSync(ActionManager.scala:110) Caused by: com.mendix.systemwideinterfaces.MendixRuntimeException: com.mendix.core.CoreRuntimeException: Exception occurred in action '{"current_activity":{"type":"End"},"name":"CommonUtils.AfterStartUp","type":"Microflow"}', all database changes executed by this action were rolled back    at com.mendix.util.classloading.Runner$.withContextClassLoader(Runner.scala:23) Caused by: com.mendix.core.CoreRuntimeException: Exception occurred in action '{"current_activity":{"type":"End"},"name":"CommonUtils.AfterStartUp","type":"Microflow"}', all database changes executed by this action were rolled back    at com.mendix.basis.actionmanagement.CoreActionHandlerImpl.processErrorState(CoreActionHandlerImpl.scala:153) Caused by: com.mendix.systemwideinterfaces.MendixRuntimeException: Autocommitted objects detected at end of transaction for system session for entities:  - EmailCustomTemplate.ProjectEmailTemplate: 9 instances    at com.mendix.basis.action.RequestScope.$anonfun$endTransaction$3(RequestScope.scala:163)    at scala.Option.foreach(Option.scala:437)    at com.mendix.basis.action.RequestScope.verifyNoAutoCommitsExist$1(RequestScope.scala:156)    at com.mendix.basis.action.RequestScope.$anonfun$endTransaction$7(RequestScope.scala:171)    at com.mendix.basis.action.RequestScope.$anonfun$endTransaction$7$adapted(RequestScope.scala:166)    at scala.Option.foreach(Option.scala:437)    at com.mendix.basis.action.RequestScope.endTransaction(RequestScope.scala:166)    at com.mendix.basis.action.ContextImpl.endTransaction(ContextImpl.scala:76)    at com.mendix.modules.microflowengine.microflow.impl.MicroflowImpl.executeAction(MicroflowImpl.scala:129)    at com.mendix.systemwideinterfaces.core.UserAction.execute(UserAction.java:58)    at com.mendix.basis.actionmanagement.CoreActionHandlerImpl.doCall(CoreActionHandlerImpl.scala:71)    at com.mendix.basis.actionmanagement.CoreActionHandlerImpl.call(CoreActionHandlerImpl.scala:48)    at com.mendix.core.actionmanagement.internal.InternalCoreAction.call(InternalCoreAction.java:57)    at com.mendix.basis.actionmanagement.CoreActionHandlerImpl.$anonfun$runMonitoredAction$1(CoreActionHandlerImpl.scala:59)    at com.mendix.basis.actionmanagement.ActionMonitoring$.$anonfun$monitor$1(ActionMonitoring.scala:52)    at com.mendix.util.classloading.Runner$.withContextClassLoader(Runner.scala:20)    at com.mendix.basis.actionmanagement.ActionMonitoring$.monitor(ActionMonitoring.scala:52)    at com.mendix.basis.actionmanagement.CoreActionHandlerImpl.runMonitoredAction(CoreActionHandlerImpl.scala:59)    at com.mendix.basis.actionmanagement.CoreActionHandlerImpl.call(CoreActionHandlerImpl.scala:46)    at com.mendix.core.actionmanagement.internal.InternalCoreAction.call(InternalCoreAction.java:57)    at com.mendix.basis.actionmanagement.ActionManager.$anonfun$executeSync$2(ActionManager.scala:106)    at com.mendix.util.classloading.Runner$.withContextClassLoader(Runner.scala:20)    at com.mendix.basis.actionmanagement.ActionManager.executeSync(ActionManager.scala:105)    at com.mendix.basis.actionmanagement.MicroflowCallBuilderImpl.execute(MicroflowCallBuilderImpl.scala:62)    at com.mendix.basis.impl.MxRuntimeImplBase.doFire(MxRuntimeImplBase.java:518)    at com.mendix.basis.impl.MxRuntimeImplBase.fireZeMissiles(MxRuntimeImplBase.java:476)    at com.mendix.basis.impl.MxRuntimeImplBase.start(MxRuntimeImplBase.java:260)    at com.mendix.m2ee.appcontainer.actions.StartAction.startRuntime(StartAction.scala:30)    at com.mendix.m2ee.appcontainer.actions.StartAction.execute(StartAction.scala:17)    at com.mendix.m2ee.appcontainer.server.handler.HttpAdminHandlerBase.service(HttpAdminHandlerBase.java:128)    at javax.servlet.http.HttpServlet.service(HttpServlet.java:750)    at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:764)    at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:529)    at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:221)    at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1385)    at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:176)    at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:484)    at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:174)    at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1307)    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:129)    at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:122)    at org.eclipse.jetty.server.Server.handle(Server.java:563)    at org.eclipse.jetty.server.HttpChannel.lambda$handle$0(HttpChannel.java:505)    at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:762)    at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:497)    at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:282)    at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:314)    at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:100)    at org.eclipse.jetty.io.SelectableChannelEndPoint$1.run(SelectableChannelEndPoint.java:53)    at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.runTask(AdaptiveExecutionStrategy.java:416)    at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.consumeTask(AdaptiveExecutionStrategy.java:385)    at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.tryProduce(AdaptiveExecutionStrategy.java:272)    at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.lambda$new$0(AdaptiveExecutionStrategy.java:140)    at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:411)    at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:936)    at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1080)    at java.base/java.lang.Thread.run(Thread.java:829)        
asked
2 answers
0

Hi Dale Dela Cruz!

 

It seems that your problem is due to autocommited objects:

Caused by: com.mendix.systemwideinterfaces.MendixRuntimeException: Autocommitted objects detected at end of transaction for system session for entities:  - EmailCustomTemplate.ProjectEmailTemplate: 9 instance

 

On these other questions you can see people with some similar issues and the explanation of the problem:

https://forum.mendix.com/link/space/microflows/questions/89025

https://forum.mendix.com/link/space/app-development/questions/121558

 

Here you have the documentation: https://docs.mendix.com/refguide/committing-objects/#autocommit-and-associated-objects

 

The weird part is that you say that Branch B is not working when it is a copy of Branch A that is correct. So probably this was a problem regarding the creation of the branch.

I don't know if you are able to add images of your after startup microflow or if you see some differences between the branches but if you can give us more info maybe we can find the reason of this issue.

 

Kind Regards,

Emilio

answered
0

Hi,

 

It looks like you have an after startup microflow that crashes. It probably reads templates. The solutionprocedure is this:

1. Disconnect the After Start up microflow in App/Setttings/Runtime

2. Start the app (should start know, if not, come back with the error message)

3. Start the microflow from a button

4. Solve the bugs

5. Reconnect the after startup microflow from step 1

answered