Error messages on LIVE Play servers

Restarted taskman, play services and consolejs on each server already and still getting a ton of these
Time: 2018-05-22 18:10:24.376 UTC
Message: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0

Application ID: BC15C3B1-2D4C-C9F2-FFA0-12C7235B7B00

Internal Server Error ID: 5CC610A8-58A0-5D69-FFCB-F9A9B9DDF800

java.lang.RuntimeException: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
at com.backendless.datamodel.DefaultUserDataMapper.getDefaultUser(
at com.backendless.datamodel.DefaultUserDataMapper.getDefaultUserIdFromDB(
at com.backendless.datamodel.DefaultUserDataMapper.getDefaultUserId(
at com.backendless.PlayContext.getUserId(
at com.backendless.context.Context.getUserId(
at com.backendless.servercode.codeModel.ModelCodeExtender.updateRunnerContext(
at com.backendless.servercode.codeModel.ModelCodeExtender.getContext(
at controllers.Persistence.findById(
at router.Routes$$anonfun$routes$1$$anonfun$applyOrElse$423$$anonfun$apply$423.apply(Routes.scala:12340)
at router.Routes$$anonfun$routes$1$$anonfun$applyOrElse$423$$anonfun$apply$423.apply(Routes.scala:12340)
at play.core.routing.HandlerInvokerFactory$$anon$4.resultCall(HandlerInvoker.scala:157)
at play.core.routing.HandlerInvokerFactory$$anon$4.resultCall(HandlerInvoker.scala:156)
at play.core.routing.HandlerInvokerFactory$JavaActionInvokerFactory$$anon$14$$anon$3$$anon$1.invocation(HandlerInvoker.scala:136)
at play.core.j.JavaAction$$anon$
at play.http.HttpRequestHandler$
at play.core.j.JavaAction$$anonfun$7.apply(JavaAction.scala:108)
at play.core.j.JavaAction$$anonfun$7.apply(JavaAction.scala:108)
at scala.concurrent.impl.Future$PromiseCompletingRunnable.liftedTree1$1(Future.scala:24)
at scala.concurrent.impl.Future$
at play.core.j.HttpExecutionContext$$anon$
at play.api.libs.iteratee.Execution$trampoline$.execute(Execution.scala:70)
at play.core.j.HttpExecutionContext.execute(HttpExecutionContext.scala:48)
at scala.concurrent.impl.Future$.apply(Future.scala:31)
at scala.concurrent.Future$.apply(Future.scala:494)
at play.core.j.JavaAction.apply(JavaAction.scala:108)
at play.api.mvc.Action$$anonfun$apply$2$$anonfun$apply$5$$anonfun$apply$6.apply(Action.scala:112)
at play.api.mvc.Action$$anonfun$apply$2$$anonfun$apply$5$$anonfun$apply$6.apply(Action.scala:112)
at play.utils.Threads$.withContextClassLoader(Threads.scala:21)
at play.api.mvc.Action$$anonfun$apply$2$$anonfun$apply$5.apply(Action.scala:111)
at play.api.mvc.Action$$anonfun$apply$2$$anonfun$apply$5.apply(Action.scala:110)
at play.api.mvc.Action$$anonfun$apply$2.apply(Action.scala:110)
at play.api.mvc.Action$$anonfun$apply$2.apply(Action.scala:103)
at scala.concurrent.Future$$anonfun$flatMap$1.apply(Future.scala:253)
at scala.concurrent.Future$$anonfun$flatMap$1.apply(Future.scala:251)
at akka.dispatch.BatchingExecutor$AbstractBatch.processBatch(BatchingExecutor.scala:55)
at akka.dispatch.BatchingExecutor$BlockableBatch$$anonfun$run$1.apply$mcV$sp(BatchingExecutor.scala:91)
at akka.dispatch.BatchingExecutor$BlockableBatch$$anonfun$run$1.apply(BatchingExecutor.scala:91)
at akka.dispatch.BatchingExecutor$BlockableBatch$$anonfun$run$1.apply(BatchingExecutor.scala:91)
at scala.concurrent.BlockContext$.withBlockContext(BlockContext.scala:72)
at akka.dispatch.BatchingExecutor$
at java.util.concurrent.ThreadPoolExecutor.runWorker(
at java.util.concurrent.ThreadPoolExecutor$
Caused by: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
at java.util.ArrayList.rangeCheck(
at java.util.ArrayList.get(
at com.backendless.datamodel.DefaultUserDataMapper.getDefaultUser(
… 57 more

Were there any changes made in the system such as?:

    backup/restore adding new servers adding new code runners

restore of the database was done yesterday. All that was done today was a restart of services and thats when this error started

when attempting to open business logic in Console we get the Backendless encountered an issue and internal trouble ticket was created.

by looking at the stack trace the error could occur only if the system user (used internally) is deleted from a backendless system table.

Did you restart the system yesterday after the database restore had been performed?
Where does the backup of the database come from?

no didnt restart the system yesterday as everything was working up until I restart taskman, consolejs, and play services today.

The database backup came from a RDS mysqldump of the application ID database

It looks like it was not the restart that caused the problem, it was the problematic backup which took effect when the system got restarted.

Could you please check if the following query in the “User” table in the application’s database returns any results:
SELECT * FROM .User where default= 1;

Just to confirm, this is the database you have restored yesterday?


This is our LIVE application and all logins are now blocked as no API calls are working. I have invited you to the app.

i understand. Out of interest, what was the purpose of performing the database restore?

Please run the following and report the result to us (this is a view in the database)

SELECT * FROM DefaultUser;

During some automated tests, the automated tests were were accidentally pointed at this app. When the tests finished the data tables in the console appeared to be empty and were showing “0” when viewing through the console Data section.

Run against the app database or main_backendless?

the app database.

p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Monaco; color: #f4f4f4; background-color: #000000; background-color: rgba(0, 0, 0, 0.85)}
span.s1 {font-variant-ligatures: no-common-ligatures}

mysql> SELECT * FROM DefaultUser;

Empty set (0.01 sec)

This is very strange, as the view runs almost identical select query against the “User” table as you executed earlier (you can see the View definition).

Please open the view definition and execute the same query as you will see there directly against the app database.

How does one open the view definition from mysql CLI. There is no GUI access to this database instance

perhaps this will help?