Backendless Support

Business Logic on Standlone Backendless


I would like to know if Business Logic is supposed to work with standalone Backendless?

I'm trying to make something work, but nothing seems to be called.

I successfully upload the compiled java code to my server, but nothing really works, even Timers.

This is the (I edited sensible informations like keys and IP of my server)

  1. # This is main configuration file for Code Runner
  2. # Application id
  3. = D58FD012-****-B9C6-****-CD8555A33C00
  4. # Code Runner ID assigned by Backendless Console.
  5. application.secretKey = AE211FA6-****-6A48-****-F48E0D3BE900
  6. # Application version name
  7. # Default: v1
  8. application.version = v1
  9. # Optional argument. Search path for classes which will be used for debugging or publishing.
  10. # By default Code Runner looks for the ./build/classes directory located in the current directory
  11. location.classes = ../classes/
  12. # Optional argument. Search path for jar files which are the dependencies for the code which is debugged or published.
  13. # By default Code Runner looks for the ./build/libs directory located in the current directory.
  14. location.jar = ../libs/
  15. # System properties
  16. # Don't touch, if you do not really understand this
  17. system.server.url = http://51.*.*.114/api
  18. =
  19. system.redis.master.port = 6379
  20. system.pool.core = 20
  21. system.type = LOCAL
  22. system.repo.path = ../repo/
  23. enterprise.allowedHosts =,\
  25. localhost,\
  26. localhost:9000,\
  28. 51.*.*.114

The Timers and events are visible in the dashboard of the server, under business logic. I can even run the timers and a green popup informs me that it was a success. But nothing is saved in the DB. Here is an example of a timer (Task being a custom table):

  1. public class TestTimerTimer extends TimerExtender
  2. {
  3. @Override
  4. public void execute( String appVersionId ) throws Exception
  5. {
  6. Task task = new Task();
  7. task.setTitle("PRETTY PLEASE");
  8. Backendless.Persistence.of(Task.class).save(task);
  9. }
  10. }

BeforeCreate, AfterCreate, BeforeRemove, AfterRemove, Timers, absolutely nothing works.

I'm starting to wonder if it can even works or if it's a limitation of the Standalone Backendless.

Hope you can help me,

Thanks in advance.

Leave a Comment

Comments (12)


Hi Dylan,

Change the following line to use your IP address: = 51.*.*.114

Please let me know if it works.




Thanks for your quick reply.

Unfortunately, it doesn't work. When I try to deploy with my IP as the redis host, it gives me this exception:

  1. [INFO] CodeRunner session is running for 2 hour and will be terminated on 00:07:24.705[UTC]

    Exception in thread "main" java.lang.ExceptionInInitializerError

    at com.backendless.coderunner.CodeRunnerLoader.main(

    Caused by: redis.clients.jedis.exceptions.JedisConnectionException: Could not get a resource from the pool

    at redis.clients.util.Pool.getResource(

    at redis.clients.jedis.JedisPool.getResource(

    at com.backendless.redis.JedisManager.getJedis(

    at com.backendless.redis.JedisManager.execute(

    at com.backendless.redis.JedisManager.create(

    at com.backendless.redis.JedisManager.create(

    at com.backendless.coderunner.redis.RedisPoolManager.<init>(

    at com.backendless.coderunner.redis.RedisPoolManager.<clinit>(

    ... 1 more

    Caused by: redis.clients.jedis.exceptions.JedisConnectionException: Connection refused

    at redis.clients.jedis.Connection.connect(

    at redis.clients.jedis.BinaryClient.connect(

    at redis.clients.jedis.BinaryJedis.connect(

    at redis.clients.jedis.JedisFactory.makeObject(

    at org.apache.commons.pool2.impl.GenericObjectPool.create(

    at org.apache.commons.pool2.impl.GenericObjectPool.borrowObject(

    at org.apache.commons.pool2.impl.GenericObjectPool.borrowObject(

    at redis.clients.util.Pool.getResource(

    ... 8 more

    Caused by: Connection refused

    at Method)






    at redis.clients.jedis.Connection.connect(

    ... 15 more

Same with CodeRunner. I also tried with, but it's not effective either.


Hi Dylan,

I apologize, I hoped it would be a quick fix. I opened an internal ticket. If you need to check the status, ask about BKNDLSS-11640.




Hi Mark,

After searching for the problem with a colleague. It appears that our Redis host doesn't use the default port 6379. But use the 7738 port.

I updated the to be my ip as the redis host and the port 7738 as the redis port.

And the deploying works! But nothing happens beyond that. BeforeCreate, Find, AfterCreate, BeforeRemove, etc. nothing seems to work.

On the other hand, I tried to run it with CodeRunner, to see if something happens. And surprise, there is a stimuli.

I created a BeforeCreate logic for the "Task" (custom) class that just Sysout "Hello" in the console.

And when I create a task, the coderunner displays an exception:

  1. [INFO] Waiting for events...

    févr. 08, 2016 8:00:25 AM com.backendless.coderunner.runtime.task.EventInvocationTask runImpl

    GRAVE: argument type mismatch

    java.lang.IllegalArgumentException: argument type mismatch

    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

    at sun.reflect.NativeMethodAccessorImpl.invoke(

    at sun.reflect.DelegatingMethodAccessorImpl.invoke(

    at java.lang.reflect.Method.invoke(

    at com.backendless.coderunner.runtime.task.EventInvocationTask.runImpl(



Hope this helps. Thanks a lot for your help.


Hi Dylan,

Please try to download CodeRunner here:

Then replace all files except inside the bin folder and try running it again.



I deleted everything and retried with the new 3.0.0-16.

Here is my

  1. # Application id
  2. = 3BE87088-27B7-D23E-****-8200EF221E00
  3. # Code Runner ID assigned by Backendless Console.
  4. application.secretKey = 33F6332E-E736-8CE6-****-61C2A5D43300
  5. # Application version name
  6. # Default: v1
  7. application.version = v1
  8. # Optional argument. Search path for classes which will be used for debugging or publishing.
  9. # By default Code Runner looks for the ./build/classes directory located in the current directory
  10. location.classes = ../classes/
  11. # Optional argument. Search path for jar files which are the dependencies for the code which is debugged or published.
  12. # By default Code Runner looks for the ./build/libs directory located in the current directory.
  13. location.jar = ../libs/
  14. # System properties
  15. # Don't touch, if you do not really understand this
  16. system.server.url = http://vps******
  17. = vps******
  18. system.redis.master.port = 7738
  19. system.pool.core = 20
  20. system.type = LOCAL
  21. system.repo.path = ../repo/
  22. enterprise.allowedHosts =,\
  24. localhost,\
  25. localhost:9000,\
  27. vps******

I made a beforeCreate that set the price to 5.

I make a REST call to create an object, without setting it's price.

If I run

It works. The object is created. The price is set to 5.

If I run

The deploy returns no errors, and says "Thank you".

BUT, when I create an object, the price is never set.

It's a good start, but still not perfect.


Could you please check the Production tab on the Business Logic screen and make sure the event handler is listed there?


Yep, it is listed there. =/



Do you use CodeRunner downloaded from console or from our website?

So your problem is that when deploying your custom code, the handlers aren't invoked?


I use the one downloaded from your website.

And yes, that is exactly what happens. With the CodeRunners, handlers are called. But not when Deployed.


Hi Dylan,

We've finally found a problem.

Go to installdir/apps/backendless/htdocs/conf/ and change

  1. = 2147483647
  2. EXECUTION_TIME.limit.level1 = 20

to this

  1. = 2000000
  2. EXECUTION_TIME.limit.level1 = 2000000

(the value should be 2 million)


It works dude. Thanks a lot!