Thanks once again Jeff. I tried Objectify with a small project. Works fine. But nonetheless, I'm still keen on getting my initial try with GWT/JPA/GAE compile and run successfully. At the moment, I have no external library that requires inclusion.
I see some GWT/JPA samples from the book Google Web Toolkit 2 Application Development Cookbook (http://www.packtpub.com/article/working-entities-google-web-toolkit). Let me see what I can get from it. Thanks On 2/21/11, Jeff Schwartz <[email protected]> wrote: > Did you inherit the needed libs as well? For instance, I use Objectify so I > import the Objectify lib as: > > <inherits name="com.googlecode.objectify.Objectify"/> > > You would need to do similarly for any other libs you are using. > > Jeff > > > > On Mon, Feb 21, 2011 at 7:22 AM, Kayode Odeyemi <[email protected]> wrote: > >> Thanks Lorenzo >> >> Could this be a reason why my Persistence-aware Entities cannot be >> compiled even after placing them under client package? I did relocate >> the Entities, placed my DTOs in shared package as well as added to my >> module file this: >> <!-- Specify the paths for translatable code --> >> <source path='client'/> >> <source path='shared'/> >> >> or does it have to be: >> >> <source path='com/foo/client' /> >> <source path='com/foo/shared' /> >> >> But in as much as compile was successful, I still get the errors: >> >> The import javax.persistence cannot be resolved >> [ERROR] Line 10: The import javax.persistence cannot be resolved >> [ERROR] Line 18: Entity cannot be resolved to a type >> [ERROR] Line 21: Id cannot be resolved to a type >> [ERROR] Line 22: GeneratedValue cannot be resolved to a type >> [ERROR] Line 22: The attribute strategy is undefined for the >> annotation type GeneratedValue >> [ERROR] Line 22: GenerationType cannot be resolved >> [ERROR] Line 25: Table cannot be resolved to a type >> [ERROR] Line 25: The attribute name is undefined for the >> annotation type Table >> [ERROR] Line 26: NamedQueries cannot be resolved to a type >> >> >> On 2/21/11, l.denardo <[email protected]> wrote: >> > 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. >> > >> > >> >> >> -- >> 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. >> >> > > > -- > *Jeff Schwartz* > http://jefftschwartz.appspot.com/ > follow me on twitter: @jefftschwartz > > -- > 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. > > -- 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.
