Backendless Support
 
Assigned to Dev

Event Handlers not working

Hi

I m trying to handle changes of value data table throught Rest API (PUT request) but Event Handler doesnt call any method like "beforeUpdate" , logs like System.out.println("beforeUpdate") and debugger breakpoints not calls also , just Waiting for events...

  1. @Asset("User")

    public class UserTableEventHandler extends com.backendless.servercode.extension.PersistenceExtender<User> {

    @Override

    public void beforeUpdate(RunnerContext context, User user) throws Exception {

    System.out.println("update ");

    }

Best Answer
photo

Seems to be like a caching issue, should be fine now. There is a probability that this problem may occur again, if so - please contact us here ASAP. For now I've scheduled an internal task to investigate and fix the problem (ticket Id: BKNDLSS-16628)

Anton

Leave a Comment

Comments (16)

photo
1

Hi, Alex.

What is your appId ?

photo
1

4D267860-480C-DA5A-FFAF-9D5D7F4D0F00

photo
photo
1

I see in your app only js handlers, and the code posted above is for java coderunner.

Howbeit, if you want to intercept operations with users (from system "Users" table), try use Category:Users when your are creating handlers.

https://screenshots.firefox.com/gnjOIysZQabblZQR/backendless-dev.local

photo
1

-> I see in your app only js handlers

Very strange

http://joxi.ru/v29OOeEcGoGXqr

and

http://joxi.ru/Q2Keedyh9x9MBr

photo
2

Ok, it's really very strange, cause i saw it like js.

Now i've seen your custom "User" table and try with it.

photo
photo
1

Please, try again, now it should work.

photo
2

I m trying to check it on debug mode throught REST API and I still dont see any logs nor debug events(

photo
photo
1

Hi Alex,

I was not able to reproduce the problem in my application. Do you mind if I try to create a beforeUpdate handler in your app and will make some tests there?

Anton

photo
1

yes ofc

photo
photo
1

Seems to be like a caching issue, should be fine now. There is a probability that this problem may occur again, if so - please contact us here ASAP. For now I've scheduled an internal task to investigate and fix the problem (ticket Id: BKNDLSS-16628)

Anton

photo
1

Event handler for User table doesnt fire any events again :-(

photo
1

I've tried to fix this problem manually. Please, try once again. Sorry for inconvenience.

The work on this issue is still in progress and expected to be finished on the next week.

photo
1

pls, notify me when this issue will be fixed

photo
1

Sure

photo
photo
1

Now I m get {"code":14021,"message":"Debugging utility is disconnected","errorData":{}} on PUT requests

photo
1

Debug session lasts for 2 hours, you need to redeploy your business logic.

Anton