JSON is incorrect

0
An error has occurred while handling the request. [User 'Anonymous_fdadf6c6-ecbb-4d9b-a1af-3573cb3c864e' with roles 'Administrator'] com.mendix.core.CoreRuntimeException: An error occurred while executing the action 'MyFirstModule.calculateage' at ij.getValue(SourceFile:204) Caused by: lg: Failed to evaluate expression, error occurred on line 1, character 1 substring($Variable1,5,2) ^ at MyFirstModule.calculateage (ChangeVariable : 'Change variable Variable1') Advanced stacktrace: at jJ.a(SourceFile:20) Caused by: jC: java.lang.StringIndexOutOfBoundsException: String index out of range: 7 at jB.b(SourceFile:38) Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range: 7 at java.lang.String.substring(String.java:1934) at jD.a(SourceFile:390) at jD.a(SourceFile:81) at jB.b(SourceFile:30) at jJ.a(SourceFile:16) at lT.a(SourceFile:33) at mt.a(SourceFile:77) at ms.a(SourceFile:151) at ms.executeAction(SourceFile:98) at com.mendix.systemwideinterfaces.core.UserAction.execute(SourceFile:57) at com.mendix.core.actionmanagement.CoreAction.call(SourceFile:457) at hC.b(SourceFile:207) at com.mendix.core.Core.execute(SourceFile:226) at ij.getValue(SourceFile:200) at ij.parseValueToString(SourceFile:269) at jl.a(SourceFile:322) at jl.a(SourceFile:276) at jl.a(SourceFile:255) at jl.a(SourceFile:220) at jl.a(SourceFile:205) at jl.a(SourceFile:143) at jl.a(SourceFile:84) at jf.a(SourceFile:48) at jd.a(SourceFile:321) at com.mendix.externalinterface.connector.RequestDispatching$Worker.a(SourceFile:170) at com.mendix.externalinterface.connector.RequestDispatching$Worker$a.a(SourceFile:161) at com.mendix.externalinterface.connector.RequestDispatching$Worker$a.apply(SourceFile:160) at akka.actor.Actor$class.apply(Actor.scala:545) at com.mendix.externalinterface.connector.RequestDispatching$Worker.apply(SourceFile:156) at akka.actor.LocalActorRef.invoke(ActorRef.scala:910) at akka.dispatch.MessageInvocation.invoke(MessageHandling.scala:25) at akka.dispatch.ExecutableMailbox$class.processMailbox(ExecutorBasedEventDrivenDispatcher.scala:223) at akka.dispatch.ExecutorBasedEventDrivenDispatcher$$anon$4.processMailbox(ExecutorBasedEventDrivenDispatcher.scala:123) at akka.dispatch.ExecutableMailbox$class.run(ExecutorBasedEventDrivenDispatcher.scala:195) at akka.dispatch.ExecutorBasedEventDrivenDispatcher$$anon$4.run(ExecutorBasedEventDrivenDispatcher.scala:123) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:662) at akka.dispatch.MonitorableThread.run(ThreadPoolBuilder.scala:192) CAN YOU TELL ME WHAT IS THE PROBLEM??
asked
1 answers
1

String index out of range. your substring action can't be executed on your variable 1, because startindex 5 in combination with length 2 is outside the length of your string.

answered