I work with an integration engine that is java based. All my scripting is javascripting and I've run into a problem that I can't find a solution to.

I am getting this error when I attempt to read from my database

Code:
Wrapped java.lang.ArrayIndexOutOfBoundsException: -1
Here is the actual code (the "logger.err or" lines tell Mirth to write the output to the dashboard)

Code:
if
...