Rest service failing on start up

1
I'm following the rest tutorial here for publishing restful services. When I try to compile and run I get core exception. The strange thing is that the start up Microflow actually runs successfully on the first call. The above core exception is thrown later on in the compile/startup cycle when running locally. Infact the log line just before this core exception is thrown says "Starting restful module... DONE". Any idea's about the source of my problem are welcome. Here is the full stack trace An exception occurred while running the after-startup-action. com.mendix.modules.microflowengine.MicroflowException: com.mendix.core.CoreRuntimeException: java.lang.ArrayIndexOutOfBoundsException: 1 at RestServices.CreateMicroflowServiceWithPath (JavaAction : 'Call 'StartMicroflowServiceJava'') at RestServices.CreateMicroflowService (SubMicroflow : 'Call 'CreateMicroflowServiceWithPath'') at Rest.StartUpMicroflow (SubMicroflow : 'Create Policy Service') Advanced stacktrace: at com.mendix.modules.microflowengine.MicroflowUtil.processException(SourceFile:158) Caused by: com.mendix.core.CoreException: com.mendix.core.CoreRuntimeException: java.lang.ArrayIndexOutOfBoundsException: 1 at com.mendix.core.component.InternalCore.execute(SourceFile:272) Caused by: com.mendix.core.CoreRuntimeException: java.lang.ArrayIndexOutOfBoundsException: 1 at com.mendix.core.actionmanagement.ActionManager.executeSync(SourceFile:216) Caused by: java.lang.ArrayIndexOutOfBoundsException: 1 at restservices.publish.MicroflowService.<init>(MicroflowService.java:80) at restservices.actions.StartMicroflowServiceJava.executeAction(StartMicroflowServiceJava.java:41) at restservices.actions.StartMicroflowServiceJava.executeAction(StartMicroflowServiceJava.java:19) at com.mendix.systemwideinterfaces.core.UserAction.execute(SourceFile:53) at com.mendix.core.actionmanagement.CoreAction.doCall(SourceFile:291) at com.mendix.core.actionmanagement.CoreAction.call(SourceFile:276) at com.mendix.core.actionmanagement.ActionManager.executeSync(SourceFile:205) at com.mendix.core.component.InternalCore.execute(SourceFile:260) at com.mendix.hm.execute(SourceFile:42) at com.mendix.hV.a(SourceFile:47) at com.mendix.hU.a(SourceFile:193) at com.mendix.hU.executeAction(SourceFile:148) at com.mendix.systemwideinterfaces.core.UserAction.execute(SourceFile:53) at com.mendix.core.actionmanagement.CoreAction.doCall(SourceFile:291) at com.mendix.core.actionmanagement.CoreAction.call(SourceFile:276) at com.mendix.core.actionmanagement.ActionManager.executeSync(SourceFile:205) at com.mendix.core.component.InternalCore.executeSync(SourceFile:233) at com.mendix.modules.microflowengine.actions.SubMicroflowAction.execute(SourceFile:33) at com.mendix.hV.a(SourceFile:47) at com.mendix.hU.a(SourceFile:193) at com.mendix.hU.executeAction(SourceFile:148) at com.mendix.systemwideinterfaces.core.UserAction.execute(SourceFile:53) at com.mendix.core.actionmanagement.CoreAction.doCall(SourceFile:291) at com.mendix.core.actionmanagement.CoreAction.call(SourceFile:276) at com.mendix.core.actionmanagement.ActionManager.executeSync(SourceFile:205) at com.mendix.core.component.InternalCore.executeSync(SourceFile:233) at com.mendix.modules.microflowengine.actions.SubMicroflowAction.execute(SourceFile:33) at com.mendix.hV.a(SourceFile:47) at com.mendix.hU.a(SourceFile:193) at com.mendix.hU.executeAction(SourceFile:148) at com.mendix.systemwideinterfaces.core.UserAction.execute(SourceFile:53) at com.mendix.core.actionmanagement.CoreAction.doCall(SourceFile:291) at com.mendix.core.actionmanagement.CoreAction.call(SourceFile:276) at com.mendix.core.actionmanagement.CustomActionMonitorImpl$$anonfun$run$1.apply(SourceFile:17) at com.mendix.core.session.Worker$$anonfun$receive$3$$anonfun$2.apply(SourceFile:155) at scala.util.Try$.apply(Try.scala:161) at com.mendix.core.session.Worker$$anonfun$receive$3.applyOrElse(SourceFile:153) at akka.actor.ActorCell.receiveMessage(ActorCell.scala:498) at akka.actor.ActorCell.invoke(ActorCell.scala:456) at akka.dispatch.Mailbox.processMailbox(Mailbox.scala:237) at akka.dispatch.Mailbox.run(Mailbox.scala:219) at akka.dispatch.ForkJoinExecutorConfigurator$AkkaForkJoinTask.exec(AbstractDispatcher.scala:386) at scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260) at scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339) at scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979) at scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107)
asked
1 answers
1

Hi Derek,

I suspect the issue is that you didn't specify the microflow name in a fully qualified manner when calling StartMicroflowServiceJava, e.g: 'MyMicroflow' instead of MyModule.MyMicroflown. Can that be the case (or did you swap some arguments accidentally)?

answered