Hi, Scott,
Could you please provide full exception message with stacktrace?
And also what actions do you keep in mind when saying “remove afterlogin servercode”?
Aug 10, 2015 2:30:47 PM com.backendless.coderunner.runtime.task.EventInvocationTask runImpl
SEVERE: com.backendless.BackendlessUser cannot be cast to java.util.HashMap
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at com.backendless.coderunner.runtime.task.EventInvocationTask.runImpl(EventInvocationTask.java:97)
at com.backendless.coderunner.runtime.concurrent.ExtendedRunnable.run(ExtendedRunnable.java:22)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.ClassCastException: com.backendless.BackendlessUser cannot be cast to java.util.HashMap
at com.backendless.bzzle.events.user_service.GenericUserEventHandler.afterLogin(GenericUserEventHandler.java:124)
Forget about “remove”, I just want to point out that a while ago, when I tested afterLogin, below line of code did not throw error.
HashMap user = result.getResult();
Thank you for your report, it helped us to discover a new bug.
So please note, that code above is only a temporal workaround. In the next upcoming release it will be fixed and you will receive HashMap instead of BackendlessUser as designed.
I wish all the best and hope that your service becomes stable and bugless.
There is one issue that I found today which I wan’t going to report.
I was unable to retrieve relation property for user.
Retrieving all user properties works without a problem, but if querying for relations property, then server responds with null to that property.
The issue can be reproduced from console.
I’ve attached files.
I am not sure what you are asking for, but I attached user table screenshot.
Above attachment shows that “photo” relation is loaded in “all” , but not in “relation”, both requesting from user with prop uid = ‘1000001’.
This issue can be easily reproduced from console, you can simply add user prop, relation to geoPoint from console and from console, run query like I did.
Thanks Sergey.
It’s just that I could have my code to retrieve all data to get relation prop, but some of the user props are private and shouldn’t be retrieved.