Mendix.Modeler.MicroFlows.Debugger.DebuggerException: java.lang.Long cannot be cast to java.lang.Integer

18
What is to be done in this Situation? The Dialogue Says: An error occured while retrieving information for object variable 'Person'. The rest of the details are here: at Mendix.Modeler.MicroFlows.Debugger.DebuggerResponse..ctor(String requestActionName, String responseText) in c:\cygwin\home\autobuild\build\Mendix-4\modeler\Modeler\MicroFlows\Debugger\DebuggerResponse.cs:line 27 at Mendix.Modeler.MicroFlows.Debugger.DebuggerClient.PerformRequest(DebuggerRequest request, Int32 timeout) in c:\cygwin\home\autobuild\build\Mendix-4\modeler\Modeler\MicroFlows\Debugger\DebuggerClient.cs:line 166 at Mendix.Modeler.MicroFlows.Debugger.DebuggerClient.GetObject(Guid debugId, String variableName) in c:\cygwin\home\autobuild\build\Mendix-4\modeler\Modeler\MicroFlows\Debugger\DebuggerClient.cs:line 125 at Mendix.Modeler.MicroFlows.Debugger.VariablesTreeModel.<>c__DisplayClassc.<GetChildren>b__1(DebuggerClient client) in c:\cygwin\home\autobuild\build\Mendix-4\modeler\Modeler\MicroFlows\Debugger\VariablesTreeModel.cs:line 38 at Mendix.Modeler.MicroFlows.Debugger.DebuggerControl.<>c__DisplayClass17.<>c__DisplayClass19.<ClientDoAsync>b__15(Object sender, DoWorkEventArgs args) in c:\cygwin\home\autobuild\build\Mendix-4\modeler\Modeler\MicroFlows\Debugger\DebuggerControl.cs:line 109 at System.ComponentModel.BackgroundWorker.OnDoWork(DoWorkEventArgs e) at System.ComponentModel.BackgroundWorker.WorkerThreadStart(Object argument)
asked
6 answers
2

Are you using a calculated value for a MendixInteger attribute? If so, this is a known bug and probably the cause. In a microflow we only use an Integer/Long type and don't make a distinction. If you use this as a calculated value for a MendixInteger attribute, all other things will work just fine but when debugging it will attempt to cast a long to an integer.

I filed a ticket for this myself a few weeks ago, the number is 20374. You could file a ticket too, to get this higher on the priority list.

answered
2

Had the same Problem and solved it by: * Change the Virtual Attribute (calculated values) of the type Integer to Long.

This will cause horrible error in the application when you try to put a count from aggregation of the type integer as a returning value. BIG BUG!

To work around the second bug you can force a cast happening in the system by adding + 0. The return value would something like: 0 + $count

answered
0

This is happening during debugging? I thought this was fixed in a earlier version. Anyway, could you file a ticket?

answered
0

Maybe this helps you.

answered
0

Clear your browser cache.

Edit: In certain circumstances after you ran a Mendix 3.x application and run 4.x you will get this error-message. But the above message has another cause.

answered
0

When debugging s simple entity with calculated values I get this error. I this an know issue

Mendix.Modeler.MicroFlows.Debugger.DebuggerException: java.lang.Long cannot be cast to java.lang.Integer at Mendix.Modeler.MicroFlows.Debugger.DebuggerResponse..ctor(String requestActionName, String responseText) in c:\jenkins\workspace\AppStudio-Core-Modeler\src\modeler\Modeler\MicroFlows\Debugger\DebuggerResponse.cs:line 27 at Mendix.Modeler.MicroFlows.Debugger.DebuggerClient.PerformRequest(DebuggerRequest request, Int32 timeout) in c:\jenkins\workspace\AppStudio-Core-Modeler\src\modeler\Modeler\MicroFlows\Debugger\DebuggerClient.cs:line 166 at Mendix.Modeler.MicroFlows.Debugger.DebuggerClient.GetObject(Guid debugId, String variableName) in c:\jenkins\workspace\AppStudio-Core-Modeler\src\modeler\Modeler\MicroFlows\Debugger\DebuggerClient.cs:line 125 at Mendix.Modeler.MicroFlows.Debugger.VariablesTreeModel.<>cDisplayClassc.<getchildren>b1(DebuggerClient client) in c:\jenkins\workspace\AppStudio-Core-Modeler\src\modeler\Modeler\MicroFlows\Debugger\VariablesTreeModel.cs:line 38 at Mendix.Modeler.MicroFlows.Debugger.DebuggerControl.<>cDisplayClass16.<clientdoasync>b14(Object sender, DoWorkEventArgs args) in c:\jenkins\workspace\AppStudio-Core-Modeler\src\modeler\Modeler\MicroFlows\Debugger\DebuggerControl.cs:line 120 at System.ComponentModel.BackgroundWorker.OnDoWork(DoWorkEventArgs e) at System.ComponentModel.BackgroundWorker.WorkerThreadStart(Object argument)

answered