RequestFactory , ServiceLocator and Generic Dao class , NoSuchMethodFound

142 views
Skip to first unread message

Yucong Sun (叶雨飞)

unread,
Jan 30, 2012, 2:50:15 PM1/30/12
to google-we...@googlegroups.com
Hi,

I'm trying out GWT RequestFactory but hit a problem, my entity is an
JPA(Hibernate) and I have a Dao class like this

public abstract class GenericDao<K, E> () {
List<E> list() {
some code to return a list.
}
void persist(E entity) {
entityManager.persist(entity);
}
}

public class MyDao extends GenericDao<String, MyDao> {
}

And I have a service locator as this

public class DaoServiceLocator extends ServiceLcator<xxxx> {
public xxxxx {
return new MyDao();
}
}

All these works fine , the list() method works perfectly, but not
persist method, it throws java.lang.NoSuchMethodError when I am
calling factory.myEntityRequest().persist(entityProxy) , any ideas?

Thomas Broyer

unread,
Jan 31, 2012, 6:57:11 AM1/31/12
to google-we...@googlegroups.com
Can you look in the Deobfuscator.Builder generated by the RF ValidationTool (if you configured annotation processing in Eclipse, it should be in a .apt_generated folder unless you changed it; and note that if you ValidationTool from the command line, it won't output the Java code, only the compiled class, so don't use it here), what are the lines related to the 'persist' method from your RequestContext?

(I mean, it might very well be a bug in the ValidationTool)

Alex

unread,
Sep 6, 2012, 1:36:41 AM9/6/12
to Google-We...@googlegroups.com
Hi Yucong, I struggle with the very same problem. Have you solved it? Pleace let
me know!

Reply all
Reply to author
Forward
0 new messages