mendix / RestServices

REST service module for Mendix. Supports consuming and publishing REST based services and real-time data synchronization. Supports JSON, form-encoded, multipart and binary data transport.
Apache License 2.0
31 stars 46 forks source link

Data service: GET for a specific instance resulting in error #81

Closed dominiklanger closed 8 years ago

dominiklanger commented 8 years ago

My data service is resulting in a Java error when call the GET for a specific instance: http://localhost:8080/rest/customers/1

Any idea what the problem could be?

Here's the corresponding log entry:

Message: Failed to serve GET customers/1: Exception occurred in action '{}', all database changes executed by this action were rolled back

Stack trace: _com.mendix.core.CoreRuntimeException: Exception occurred in action '{}', all database changes executed by this action were rolled back at com.mendix.core.actionmanagement.CoreAction.processErrorState(CoreAction.java:303)

Caused by: java.lang.IllegalArgumentException: Action should not be null at com.mendix.core.component.InternalCore.execute(InternalCore.java:369) at com.mendix.core.Core.execute(Core.java:161) at restservices.publish.DataService.convertSourceToView(DataService.java:453) at restservices.publish.DataService.serializeToJson(DataService.java:460) at restservices.publish.DataService.serveGetFromDB(DataService.java:261) at restservices.publish.DataService.serveGet(DataService.java:236) at restservices.publish.DataService$4.execute(DataService.java:571) at restservices.publish.RestServiceHandler$3.apply(RestServiceHandler.java:225) at restservices.publish.RestServiceHandler$3.apply(RestServiceHandler.java:221) at restservices.util.Utils$1.executeAction(Utils.java:209) at com.mendix.systemwideinterfaces.core.UserAction.execute(UserAction.java:49) at com.mendix.core.actionmanagement.CoreAction.doCall(CoreAction.java:260) at com.mendix.core.actionmanagement.CoreAction.call(CoreAction.java:248) at com.mendix.core.actionmanagement.CustomActionMonitorImpl$$anonfun$run$1.apply(CustomMonitoredAction.scala:14) at com.mendix.core.session.Worker$$anonfun$receive$3$$anonfun$2$$anon$1.execute(ActionDispatching.scala:144) at com.mendix.util.classloading.Runner.doRunUsingClassLoaderOf(Runner.java:32) at com.mendix.core.session.Worker$$anonfun$receive$3$$anonfun$2.apply(ActionDispatching.scala:146) at scala.util.Try$.apply(Try.scala:192) at com.mendix.core.session.Worker$$anonfun$receive$3.applyOrElse(ActionDispatching.scala:140) at akka.actor.Actor$class.aroundReceive(Actor.scala:465) at com.mendix.core.session.Worker.aroundReceive(ActionDispatching.scala:136) at akka.actor.ActorCell.receiveMessage(ActorCell.scala:516) at akka.actor.ActorCell.invoke(ActorCell.scala:487) at akka.dispatch.Mailbox.processMailbox(Mailbox.scala:238) at akka.dispatch.Mailbox.run(Mailbox.scala:220)_

dominiklanger commented 8 years ago

Problem solved. I hadn't defined the On Publish Microflow. Now it works.