Service invocation failed: null in ClassCastException

I have this simple TestService:

public class TestService implements IBackendlessService {
public Player getPlayer() {
return new Player();
}
}

Where “Player” is the code generated by Backendless.
When I run this using CodeRunner 3.0.17 and access the API over the console, I get:

{
"code": 14004,
"message": "Service invocation failed: null in ClassCastException"
}

When using the backendless 3.0.17.1 JAR from maven central, I get:

{
"code": 14004,
"message": "Service invocation failed: [Ljava.util.HashMap; cannot be cast to com.backendless.coderunner.commons.protocol.InvocationResult in ClassCastException"
}

But if I deploy it to production, I get the expected response.
I therefore assume this is a bug in CodeRunner or Backendless.

Hi Michel,

Could you please provide you application id.

Regards,

Denys

Hi Denys

It’s BCB142A0-18F1-FBF7-FF11-62C0FB401500

Hi Michel,

We just updated Java CodeRunner on our site. Please download version 3.0.19 and try again. (to update your project with the latest coderunner, you need to update the “bin” and “libs” directories.

Regards,
Mark

Hi Mark, thank you, 3.0.19 fixed it!