Jetty warning - java.lang.ArrayIndexOutOfBoundsException

Since upgrading to Mendix 9, we have noticed a new warning that pops up seemingly at random. We have not found any trigger for it, but it seems that it happens more when more users are logged in. It also happens in the middle of the night though, when no users are logged in. It is a warning generated by Jetty. The message is always empty and the stacktrace is just this: java.lang.ArrayIndexOutOfBoundsException Sometimes it also includes more information in the stacktrace and it is this: java.lang.ArrayIndexOutOfBoundsException: Index 16 out of bounds for length 16 at org.eclipse.jetty.http.HttpFields$ at org.eclipse.jetty.http.HttpFields$ at org.eclipse.jetty.http.HttpFields.toString( at java.base/java.lang.String.valueOf(Unknown Source) at java.base/java.lang.StringBuilder.append(Unknown Source) at com.mendix.logging.impl.JettyLogger$1.toString( at apdagent.actions.StartRuntimeAgentInternalLogSubscriber$MendixLogSubscriber.processMessage( at com.mendix.logging.impl.LogNode.publish( at com.mendix.logging.impl.LogQueue.publish( at at java.base/ Source) It happens to some of the apps we have upgraded from Mendix 8 to Mendix 9, but also to some apps created in Mendix 9, though not all. I have not seen it in Mendix 8 apps, it seems to be related to Mendix 9. Does anybody recognize this or have any idea what module or library would create such a warning?
1 answers

Hi Casper,

APD subscribes to the lognodes on a TRACE level. But when you put the Jetty lognode on TRACE on some Mx9 apps, it sometimes (randomly?) throws this ArrayIndexOutOfBoundsException.
We could also reproduce this on a Mx9 app without APD and the loglevel for Jetty set to TRACE.

Workaround for APD is adding the following line to the advanced settings constant of APD: “excludenodes=Jetty:DEBUG”. This will make APD subscribe to the lognode on DEBUG level instead of TRACE and you should not get the warnings.