An error has occured - no stack trace.

4
Hi, We're experiencing issues in one of our applications, where the only "feedback" we're getting from Mendix is the message "An error has occured". When debugging, the microflow is not interrupted anywhere and successfully ends. After commit events are also triggered normally and do not return any errors. Still, the browser client returns the message "An error has occured". There's nothing else in the logs, browser network tab, stack trace or anywhere else that can point me in the general direction of whatever is going wrong. The microflows are triggered by asynchronous MF calls and the Mendix version is 7.7.1 Jan 22 16:27:38.706 - ERROR - Connector: An error has occurred while handling the request. [User 'MxAdmin' with session id '6cea24b1-07af-47fb-a172-4b8a429438c7' and roles 'MxAdmin'] Jan 22 16:27:38.706 - ERROR - Connector: (1/1) java.lang.ClassCastException: null Other than trying to reproduce the environment locally and removing activity by activity I don't know what else to check, so hopefully someone has an amazing idea for me. Browser console: Thanks in advance, [Edit: 24-01-2018 16:34] Restored the production database locally and get the following stack trace:   java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.Long at scala.runtime.BoxesRunTime.unboxToLong(BoxesRunTime.java:105) at com.mendix.basis.objectmanagement.JsonToMxObject$$anonfun$primitiveFromJson$1.apply(JsonToMxObject.scala:107) at scala.Option.map(Option.scala:146) at com.mendix.basis.objectmanagement.JsonToMxObject$.primitiveFromJson(JsonToMxObject.scala:105) at com.mendix.basis.objectmanagement.JsonToMxObject$.valueFromJson(JsonToMxObject.scala:93) at com.mendix.basis.objectmanagement.JsonToMxObject$.com$mendix$basis$objectmanagement$JsonToMxObject$$setObjectMember(JsonToMxObject.scala:79) at com.mendix.basis.objectmanagement.JsonToMxObject$$anonfun$toMxObject$1.apply(JsonToMxObject.scala:45) at com.mendix.basis.objectmanagement.JsonToMxObject$$anonfun$toMxObject$1.apply(JsonToMxObject.scala:44) at com.mendix.basis.objectmanagement.JsonToMxObject$JSONObjectExt$$anonfun$foreach$1.apply(JsonToMxObject.scala:128) at com.mendix.basis.objectmanagement.JsonToMxObject$JSONObjectExt$$anonfun$foreach$1.apply(JsonToMxObject.scala:127) at scala.collection.Iterator$class.foreach(Iterator.scala:893) at scala.collection.AbstractIterator.foreach(Iterator.scala:1336) at com.mendix.basis.objectmanagement.JsonToMxObject$JSONObjectExt.foreach(JsonToMxObject.scala:127) at com.mendix.basis.objectmanagement.JsonToMxObject$.toMxObject(JsonToMxObject.scala:44) at com.mendix.basis.actionmanagement.JsonToBackgroundJobResult$$anonfun$1.apply(JsonToBackgroundJobResult.scala:101) at com.mendix.basis.actionmanagement.JsonToBackgroundJobResult$$anonfun$1.apply(JsonToBackgroundJobResult.scala:101) at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:234) at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:234) at scala.collection.Iterator$class.foreach(Iterator.scala:893) at scala.collection.AbstractIterator.foreach(Iterator.scala:1336) at scala.collection.IterableLike$class.foreach(IterableLike.scala:72) at scala.collection.AbstractIterable.foreach(Iterable.scala:54) at scala.collection.TraversableLike$class.map(TraversableLike.scala:234) at scala.collection.AbstractTraversable.map(Traversable.scala:104) at com.mendix.basis.actionmanagement.JsonToBackgroundJobResult.getStateInfo(JsonToBackgroundJobResult.scala:101) at com.mendix.basis.actionmanagement.JsonToBackgroundJobResult.fromJson(JsonToBackgroundJobResult.scala:44) at com.mendix.basis.actionmanagement.BackgroundJobRegistry.com$mendix$basis$actionmanagement$BackgroundJobRegistry$$toJobState$1(BackgroundJobRegistry.scala:101) at com.mendix.basis.actionmanagement.BackgroundJobRegistry$$anonfun$determineStatusOf$1$$anonfun$apply$2.apply(BackgroundJobRegistry.scala:113) at com.mendix.basis.actionmanagement.BackgroundJobRegistry$$anonfun$determineStatusOf$1$$anonfun$apply$2.apply(BackgroundJobRegistry.scala:110) at com.mendix.basis.actionmanagement.BackgroundJobRegistry$$anonfun$withEntity$1.apply(BackgroundJobRegistry.scala:86) at com.mendix.basis.actionmanagement.BackgroundJobRegistry$$anonfun$withEntity$1.apply(BackgroundJobRegistry.scala:86) at scala.Option.map(Option.scala:146) at com.mendix.basis.actionmanagement.BackgroundJobRegistry.withEntity(BackgroundJobRegistry.scala:86) at com.mendix.basis.actionmanagement.BackgroundJobRegistry.determineStatusOf(BackgroundJobRegistry.scala:110) at com.mendix.webui.actions.client.PollBackgroundJobAction.execute(PollBackgroundJobAction.scala:15) at com.mendix.webui.requesthandling.ClientRequestHandler$$anonfun$handleRequest$1.apply$mcV$sp(ClientRequestHandler.scala:328) at com.mendix.webui.requesthandling.ClientRequestHandler$$anonfun$handleRequest$1.apply(ClientRequestHandler.scala:313) at com.mendix.webui.requesthandling.ClientRequestHandler$$anonfun$handleRequest$1.apply(ClientRequestHandler.scala:313) at com.mendix.basis.actionmanagement.IMonitoredAction$$anon$1.execute(IMonitoredAction.scala:47) at com.mendix.util.classloading.Runner.doRunUsingClassLoaderOf(Runner.java:33) at com.mendix.basis.actionmanagement.IMonitoredAction$class.monitor(IMonitoredAction.scala:49) at com.mendix.webui.requesthandling.ClientRequestHandler$ClientMonitoredAction.monitor(ClientRequestHandler.scala:431) at com.mendix.webui.requesthandling.ClientRequestHandler.handleRequest(ClientRequestHandler.scala:313) at com.mendix.webui.requesthandling.ClientRequestHandler.handleActionWithSessionRequired(ClientRequestHandler.scala:251) at com.mendix.webui.requesthandling.ClientRequestHandler.handleAction(ClientRequestHandler.scala:218) at com.mendix.webui.requesthandling.ClientRequestHandler.liftedTree1$1(ClientRequestHandler.scala:104) at com.mendix.webui.requesthandling.ClientRequestHandler.processRequest(ClientRequestHandler.scala:96) at com.mendix.externalinterface.connector.RequestHandler.doProcessRequest(RequestHandler.java:40) at com.mendix.external.connector.MxRuntimeConnector$1.execute(MxRuntimeConnector.java:70) at com.mendix.external.connector.MxRuntimeConnector$1.execute(MxRuntimeConnector.java:67) at com.mendix.util.classloading.Runner.doRunUsingClassLoaderOf(Runner.java:33) at com.mendix.external.connector.MxRuntimeConnector.processRequest(MxRuntimeConnector.java:73) at com.mendix.basis.impl.MxRuntimeImpl.processRequest(MxRuntimeImpl.java:858) at com.mendix.m2ee.appcontainer.server.handler.RuntimeHandler.handle(RuntimeHandler.java:41) at org.eclipse.jetty.server.handler.HandlerList.handle(HandlerList.java:52) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116) at org.eclipse.jetty.server.Server.handle(Server.java:368) at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:489) at org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpConnection.java:953) at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:1014) at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:861) at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:240) at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82) at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:628) at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:52) at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608) at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543) at java.lang.Thread.run(Thread.java:748) I've removed just about every element on the page, only keeping the dataview of the passed object and still get the same error. [Edit: 29-01-2018 10:24] Error even occurs when I empty any integer and long values in the "Medewerker" object (saving this object is one of the places this "java.lang.Integer cannot be cast to java.lang.Long" shows up). Switching the microflow call type from asynchronous to synchronous does solve the problem, but does not explain WHY it solves it (and is also not preferred actually). [Edit: 29-01-2018 11:20] Checked all JAR files, ended up removing quite a few unnecessary ones, but the problem still persists. Dennis Homberg Appronto Support        
asked
3 answers
1

Dennis

Did you look at the browser console?  I think you'll see some errors there.

Mike

<EDIT>

Just looked at your edits. Seems like there are a couple of errors logged in the Modeler console - am I understanding that correctly?  If so, the ClassCastException gives a starting point, I think (a bit of info about that can be found here: https://airbrake.io/blog/java-exception-handling/classcastexception).  I would guess that you have a data type mismatch between an attribute value and a page widget.  You could make a backup copy of your page, and start by removing widgets to see where the error is occuring on the page.  In your browser console, drilling into the javascript location *may* be helpful (i.e. might show you that its a custom widget....or might not).  Does this error occur on your local instance also?  Or only in a cloud instance?

answered
1

I've submitted the issue to Mendix support, this is their response:

Hello Dennis,

our R&D team is currently looking into another issue with the same cause.

The problem is dat while deserializing the state from the database to Mendix objects for background jobs, date values are parsed to an Integer instead of a Long. This happens when the number is small enough to fit into an Integer. However, because this is a Date we always expect it to be a Long, which causes the error.

I've linked your ticket to this issue.

It would explain why the error doesn't occur with every "Medewerker" object. I've also managed to fix it locally by changing the date of birth from 13-01-1970 to another date and the error no longer occurred. At least now we now how it's caused, let's hope they can fix this soon :)

 

[Edit: 07-02-2018 14:55]

Looks like the bug will be fixed in the upcoming Mendix release at the end of this month.

We are happy to inform you that your request has been nominated for implementation in an upcoming release. If all goes as expected, it will be released in version 7.12.0. Do note that unforeseen circumstances can impact the planning.


 

answered
0

Version 7.12.0 is out today. Has the issue been fixed? I don't seem to find a reference to it in the release notes.

answered