GWT compiles your java source into javascript using a restricted subset of allowed classes, and you cannot use anything built on non- compatible classes, tipically you cannot read classes with persistence- related annotatios.
Source code for your DTO must be accessible to thw GWT compiler. This is done adding a "source" entry in your gwt.xml file, as documented here: http://code.google.com/webtoolkit/doc/latest/tutorial/create.html#components In your case adding a <source path="com/foo"> should do. regards Lorenzo On Feb 20, 7:17 pm, Kayode Odeyemi <[email protected]> wrote: > I have resulted into using DTO to provide the client information about my > Entity. My DTO has the same getter and setter signatures just like it's > respective Entity. > > But still getting "No source code is available for type com.foo.UsersDTO; > did you forget to inherit a required module?" > > How do I then access persisted Entity objects from the client-side? > > > > On Sun, Feb 20, 2011 at 4:46 PM, Kayode Odeyemi <[email protected]> wrote: > > To provide more details, I am sending data to the server via GWT-RPC. On > > the server I'm returning an Entity class object mapped by JPA. So on the > > client, I requested for the object via the normal way (AsyncCallback). So > > when I compile the code, GWT reports a "No source code" error, meaning I'm > > referencing the server class on the client side. > > > Some of my findings report that I either create the Entity on the client > > side so that GWT can find it or create an implementation of the Entity on > > the client side overriding all the necessary methods. I am not sure about > > the former as I believe the Entity is meant to be on the server because it > > needs access to JPA. On the later, I have no idea of how to implement that > > as the Entity needs access to JPA (GWT can't compile server code on the > > client side!). > > > Any clues please. > > > On Sun, Feb 20, 2011 at 4:10 PM, Kayode Odeyemi <[email protected]> wrote: > > >> Hello, > > >> I will appreciate some guide as to where exactly to put JPA mapped Entity > >> classes. At the moment I have it > >> under "com.foo.server.domain". But whenever I compile the app, GWT > >> returns: > > >> No source code is available for type com.foo.server.domain.Users; did you > >> forget to inherit a required > >> module? > > >> -- > > > -- > > -- > Odeyemi 'Kayode O. > > B.Sc(Hons) Econs, Application Developer & Systems Engineer (Sun Certified > Professional), > Oracle Certified Associate, Solaris Systems Administrator, Drupal Developer > > Website:http://sinati.com<http://www.sinati.com> > Socialize with me:http://profile.to/charyorde,http://twitter.com/charyorde, > > http://www.google.com/profiles/dreyemi > Skype:drecute -- You received this message because you are subscribed to the Google Groups "Google App Engine" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
