Event handler not working

I’ve been scratching my head for several nights now over this. Hopefully you can come with some useful advice.
-I’ve downloaded generated code from business logic, connected to Data Table and a specific table.
-Added my own code and compiled.
-started runner.sh from bin folder, with secret key.
-running debug from intelliJ.
-Handler gets added to debug i business logic.
And here’s the issue, nothing happens when I add data to table from client.
I’m trying to send push notification when data is added. It works fine if I send a push from Backendless console.
I’ve attached some screen dumps.
Best regards Emil

Hi Emil,

There are no screenshots attached…

A couple of questions:

    Do you see your event handlers in console in the Debug tab? Have you tried setting a breakpoint in your code while it is in Debug to make sure the code execution gets there?
Regards, Mark





Thanks, Emil. How do you trigger the event? Do you create a new object in the MyEvents table from code using the API or in console?

From code using API.
The event gets added to the table, but nothing happens in business logic.

Have you tried attaching your debugger to the local CodeRunner process and see if the code execution gets into your class?

Not shure how to do that. (xcode is my thing)
If I try and RUN from intelliJ I get the error: Can’t find runner for…

But if I deploy to production in backendless then, would that help me find out if it’s working or would that not make any difference?

You can try deploying to production. The only way you can gauge if the code has executed is by checking if the notification is published.

If you use IntelliJ IDEA, the documentation describes the debugging process here:


Hmm. Can’t deploy to backendless either. I get this in terminal: Can’t find or load com.backendless.coderunner.CodeRunnerLoader
If I download generated code from business logic using PHP, I get allot more files vs. java, but maybe that’s fine. But with PHP the file that’s missing, CodeRunnerLoader, exists. ?

Can you describe how you structured the Java project?
Where are the class files compiled to? Have you made any changes to the bin/runner.properties file?

How do you run the deploy process? (what directory do you run it from?)

Do you have a place where I can upload my files? think that would be easier.

Compile to classes folder. No changes to runner.properties. Deploy.sh running from same bin-folder as coderunner.sh.

Can you show the API you use to trigger the event?

To upload the files you put them either into google drive or dropbox and send a link to support@backendless.com

I’ve sent you a link just now.

About the client API, do I need to do both? that is:
Save new data to table AND trigger server code?
Doesn’t the business logic listen for new events in data table?
API call code is sent to you via link also.

The business logic is trigged only when you execute the Backendless API call to create a new object.

sorry, sent you the wrong API code, it’s updated now in the shared folder.

The “event” object the code saves, is it a new object (which has never been saved before) or one that has objectId assigned to it already?

It’s a new object. Has never been saved before.

Are the “Who” and “AssignedTo” fields populated? Please provide these classes as well as we can try reproducing the problem.

dropbox updated and yes they are populated.

Thanks I was able to reproduce the problem. Try changing the client side to use the following API instead, it will trigger the event handler.