Integrating RequestFactory into an eclipse project

413 views
Skip to first unread message

Spundun

unread,
Aug 17, 2011, 2:49:57 AM8/17/11
to Google Web Toolkit
Hi all,

I'm trying to add RequestFactory and objectify to my existing eclipse
project that uses GPE and GAE.

The page http://code.google.com/webtoolkit/doc/latest/DevGuideRequestFactory.html

has the following instructions in the sectioin titled "wiring"

Add the following jars to your WEB-INF/lib directory:

requestfactory-server.jar
javax/validation/validator-api-1.0.0.GA.jar
A JSR 303 Validator of your choice, such as hibernate-validator


my question is, where do I find the requestfactory-server.jar file?
What do I use as a "validator of my choice" that I can use with GAE
and which is easily gettable?

Also, this process feels very clunky compared to the rest of the GPE
experience, is there any plan to integrate it into GPE?

p.s.: I haven't been able to do anything through maven yet. THe
closest I got was when Run As-> Maven install failed with error "You
must use a 32-bit Java runtime to run GWT Hosted Mode." I'm on mac.

Nick Chalko

unread,
Aug 17, 2011, 1:16:03 PM8/17/11
to google-we...@googlegroups.com
What do I use as a "validator of my choice" that I can use with GAE
and which is easily gettable?


Thomas Broyer

unread,
Aug 18, 2011, 2:34:47 PM8/18/11
to google-we...@googlegroups.com
The docs have actually already be updated for GWT 2.4! With GWT 2.3 (and it'll still work with future versions if you need more than just requestfactory on the server-side), you'll use gwt-servlet.jar.

David Chandler

unread,
Aug 19, 2011, 1:45:10 PM8/19/11
to google-we...@googlegroups.com
See also http://code.google.com/p/listwidget/

HTH,
/dmc


--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-we...@googlegroups.com.
To unsubscribe from this group, send email to google-web-tool...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.




--
David Chandler
Developer Programs Engineer, GWT+GAE
w: http://code.google.com/

Spundun

unread,
Aug 20, 2011, 3:24:38 AM8/20/11
to Google Web Toolkit
Thanks all for the help,

I ended up doing a tedious comparison of my project with DynaTableRf
sample and copied the hibernate validator and gwt-servlet.jar from
there.

After a very frustrating 5 days, I have a working RequestFactory
setup, now I can focus on actually implementing the server end.

Question:
Part of the problem I faced was Uncaught Exceptions with very
unhelpful stack traces. The errors ended up being things like, I had
an inconsistency in id type between getid and findClazz(id), un-
initialized version field, etc. There were no hints whatsoever on the
console, I did an extremely tedious comparison of my project with
DynaTableRf as I said above to fix this.

I'm wondering if this is because I'm missing a configuration that
would automatically point out this inconsistencies. Or is there any
other approach to hunting the problem? A strategically placed break
point on client/server side?

Again, thanks for the responses.
Spundun

On Aug 19, 10:45 am, David Chandler <drfibona...@google.com> wrote:
> See alsohttp://code.google.com/p/listwidget/

Jeff Larsen

unread,
Aug 20, 2011, 1:18:09 PM8/20/11
to google-we...@googlegroups.com
If you pulled down trunk, you could use the client side requestfactory-apt.jar. That does compile time validation on your objects, so you'd probably be able to get the red squiggilies to tell when you're doing something wrong. 

Thomas Broyer

unread,
Aug 20, 2011, 3:24:52 PM8/20/11
to google-we...@googlegroups.com
You can also download the JAR from SVN, and you can also run ValidationTool to post-process your classes. See http://code.google.com/p/google-web-toolkit/wiki/RequestFactoryInterfaceValidation

Spundun

unread,
Aug 21, 2011, 5:29:39 PM8/21/11
to Google Web Toolkit
Ah!! I did that already but turns out I missed "enabling annotation
processing" I thought it must be On globally. Now I feel a lot more
confident that I can pull through the RequestFactory approach.

Thanks all.

On Aug 20, 12:24 pm, Thomas Broyer <t.bro...@gmail.com> wrote:
> You can also download the JAR from SVN, and you can also run ValidationTool
> to post-process your classes. Seehttp://code.google.com/p/google-web-toolkit/wiki/RequestFactoryInterf...

Spundun

unread,
Aug 21, 2011, 5:31:58 PM8/21/11
to Google Web Toolkit
Thanks David,

I had already Bookmarked your project. But I decided to first
implement this on my own and *then* compare with your example. That
way I wouldn't follow someone else's example blindly.

Thanks
Spundun.
Reply all
Reply to author
Forward
0 new messages