How do i fix this...Invalid JSONRequest JSONArray[0] not a string

1
Hi All   Im getting this   Invalid JSONRequest JSONArray[0] not a string. [User 'blandianamaria@yahoo.com' with session id 'aedd7e6e-df51-4a0b-963e-491a1143cf50' and roles '   It does say were it is happing. here is the complete stack trace. com.mendix.thirdparty.org.json.JSONException: JSONArray[0] not a string. at com.mendix.thirdparty.org.json.JSONArray.getString(JSONArray.java:319) at com.mendix.webui.requesthandling.ClientRequestHandler.setCurrentIdentifier(ClientRequestHandler.scala:227) at com.mendix.webui.requesthandling.ClientRequestHandler.$anonfun$handleRequest$1(ClientRequestHandler.scala:168) at com.mendix.webui.requesthandling.ClientRequestHandler.$anonfun$handleRequest$1$adapted(ClientRequestHandler.scala:165) at com.mendix.webui.requesthandling.helpers.ContextHandling.$anonfun$inContext$4(ContextHandling.scala:41) at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:12) at com.mendix.basis.actionmanagement.IMonitoredAction$$anon$1.execute(IMonitoredAction.scala:47) at com.mendix.util.classloading.Runner.doRunUsingClassLoaderOf(Runner.java:32) at com.mendix.basis.actionmanagement.IMonitoredAction.monitor(IMonitoredAction.scala:49) at com.mendix.basis.actionmanagement.IMonitoredAction.monitor$(IMonitoredAction.scala:25) at com.mendix.webui.requesthandling.helpers.ContextHandling$ClientMonitoredAction.monitor(ContextHandling.scala:49) at com.mendix.webui.requesthandling.helpers.ContextHandling.inContext(ContextHandling.scala:41) at com.mendix.webui.requesthandling.helpers.ContextHandling.inContext$(ContextHandling.scala:27) at com.mendix.webui.requesthandling.ClientRequestHandler.inContext(ClientRequestHandler.scala:29) at com.mendix.webui.requesthandling.helpers.ContextHandling.inContext(ContextHandling.scala:24) at com.mendix.webui.requesthandling.helpers.ContextHandling.inContext$(ContextHandling.scala:19) at com.mendix.webui.requesthandling.ClientRequestHandler.inContext(ClientRequestHandler.scala:29) at com.mendix.webui.requesthandling.ClientRequestHandler.handleRequest(ClientRequestHandler.scala:165) at com.mendix.webui.requesthandling.ClientRequestHandler.$anonfun$handleAction$1(ClientRequestHandler.scala:136) at com.mendix.webui.requesthandling.helpers.ProfileHandling.profileRequest(ProfileHandling.scala:14) at com.mendix.webui.requesthandling.helpers.ProfileHandling.profileRequest$(ProfileHandling.scala:10) at com.mendix.webui.requesthandling.ClientRequestHandler.profileRequest(ClientRequestHandler.scala:29) at com.mendix.webui.requesthandling.ClientRequestHandler.handleAction(ClientRequestHandler.scala:136) at com.mendix.webui.requesthandling.ClientRequestHandler.processRequest(ClientRequestHandler.scala:99) at com.mendix.externalinterface.connector.RequestHandler.doProcessRequest(RequestHandler.java:40) at com.mendix.external.connector.MxRuntimeConnector$1.execute(MxRuntimeConnector.java:72) at com.mendix.external.connector.MxRuntimeConnector$1.execute(MxRuntimeConnector.java:69) at com.mendix.util.classloading.Runner.doRunUsingClassLoaderOf(Runner.java:32) at com.mendix.external.connector.MxRuntimeConnector.processRequest(MxRuntimeConnector.java:75) at com.mendix.basis.impl.MxRuntimeImpl.processRequest(MxRuntimeImpl.java:870) at com.mendix.m2ee.appcontainer.server.handler.RuntimeHandler.service(RuntimeHandler.java:42) at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:841) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:535) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:188) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1595) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:188) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1253) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:168) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:473) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1564) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:166) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1155) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) at org.eclipse.jetty.server.Server.handle(Server.java:561) at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:334) at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:251) at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:279) at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:104) at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:124) at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:247) at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.produce(EatWhatYouKill.java:140) at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:131) at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:243) at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:679) at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:597) at java.lang.Thread.run(Thread.java:748)  Close
asked
2 answers
0

Hi Patrick,

I had a similar error a while ago, but I don't know if it was the exact same. It was caused by a import mapping that contained convert to microflow where text ('true' or 'false') was translated to a boolean.

Maybe this helps...

Regards,

Micha Friede

answered
0

See this stackoverflow: https://stackoverflow.com/questions/36036700/org-json-jsonexception-jsonarray0-not-a-string

Either the JSON is not correct or there is a bug in the parsing of the JSON.

Regards,

Ronald

 

answered