java - Using Ref.create() on the client-side results in errors -



java - Using Ref.create() on the client-side results in errors -

i'm using objectify 5.0.5, objectify-gwt 1.2, gwt 2.6.1 , app engine sdk 1.9.10.

i'm trying basic stuff gae, gwt , objectify. i've done things in gae before , thought should see if can speed production bit using objectify i'm climbing hurdle after hurdle. i'm not sure if i'm doing wrong or if there's bug in library.

so here's problem in general: i'm trying utilize ref.create(someentity) on client-side in gwt fails , prints:

invalid type signature com.googlecode.objectify.impl.ref.deadref

i've got next entities/models:

@entity public class persistable implements serializable{ private static final long serialversionuid = 7733004846243513450l; @id long id; public persistable() {} public void setid(long id) { this.id = id; } public long getid() { homecoming id; } public void persist() { //this "remote service" , thing call: //ofy().save().entity(entity); ppservices.getbasicservice().persist(this, new asynccallback<void>() { @override public void onfailure(throwable caught) {} @override public void onsuccess(void result) {} }); } } @subclass public class event extends persistable{ private static final long serialversionuid = 1l; ref<ppuser> host = null; public event(){} public void sethost(ppuser participant) { host = ref.create(participant); } } @subclass public class ppuser extends persistable{ private static final long serialversionuid = 1l; public ppuser(){} }

and utilize them following:

public class entrystuff implements entrypoint{ public void onmoduleload() { final event event = new event(); final ppuser user1 = new ppuser(); event.sethost(user1); event.persist(); }

i can't see what's wrong. if manually give user1 id won't create difference @ all. forced set host-field on server-side or what? in jdo create new instance of ppuser , assign , persist/save entity (in case event) , (ppuser) created, isn't same possible here? :/

update: seek objectify-gwt-1.2.1; still can't utilize ref.create(pojo) client-side, ref<?>s should transit gwt-rpc correctly.

the gwt emulation datastore classes objectify provides decaying.

hi, i'm principal author of objectify. used work gwt lot, actively maintained objectify-gwt code. however, it's been multiple years since lastly used gwt. in mean time objectify has changed, gwt has changed, , build systems have changed (objectify-gwt split out separate jar because old approach caused problems gradle users).

something broken in emulation types (notably ref , key) under specific circumstances. not understand inner workings of gwt serialization plenty prepare it.

objectify-gwt needs help vested involvement in making sure works. absent that, perhaps avoid trying utilize ref client-side?

java google-app-engine gwt objectify

Comments

Popular posts from this blog

Delphi change the assembly code of a running process -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -

C++ 11 "class" keyword -