Re: GWT RPC Hibernate - again and again

2009-09-14 Thread David Durham

On Fri, Sep 11, 2009 at 6:29 AM, Ed post2edb...@hotmail.com wrote:

 He David,
 Gilead.  I just used the underlying beanlib replicators to undo the
 cglib or javassist stuff before serializing to client.

 Which beanlib replicators are you using?

Believe it was called Hibernate3BeanReplicator .. there's also a lazy
transformer of some kind that just converts lazy stuff to null instead
of throwing a lazy instantiation except or trying to load the
property.

To deal with updates of existing data, where for instance collection
is involved, the hibernate merge operation comes in handy.  I did not
get into Gilead because I could not get the Gilead dynamic proxy stuff
to work out, and in the end, I didn't need it anyway.

-Dave

--~--~-~--~~~---~--~~
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-web-toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en
-~--~~~~--~~--~--~---



Re: GWT RPC Hibernate - again and again

2009-09-14 Thread Alexandros Papadakis
The latest I guess (depending on the version of GWT you use???). There is a
forum (there was at least one for h4gwt) where the author can help you...
You should be carefull though which version of the gwt-servlet.jar you use.
I spend a whole day
trying to figure out why an older version of this jar refused to serialize
my objects after an upgrade...




On Fri, Sep 11, 2009 at 2:23 PM, Bruno Nandolpho
brunonandol...@gmail.comwrote:


 What version of gilead is the better? I´ m using 1.2.0.29..when i
 tryed to update to a new version, i cant serialize my objects...any
 help?

 On Sep 10, 5:50 pm, Alexandros Papadakis alpa...@gmail.com wrote:
  Download hibernate4gwt. It is the predecessor of Gilead. There are
 samples
  there on how to use Spring + JPA.
  Try the samples, understand how it works, and then move to Gilead. It is
  just a matter of changing a few definitions.
 
  If you cant find it, mail me and I will send you the samples.
 
  Alex
 
  On Tue, Sep 8, 2009 at 11:17 PM, Thomas Holmes 
 thomas.j.hol...@gmail.comwrote:
 
 
 
 
 
   Would you have some sample code that I could see ... or a link to
   some.
 
   I'm going to continue looking through my book, and use their example
   that uses the Command Pattern.
 
   I am getting tons of errors because my DAO's and POJO's are in another
   package, so I was working with GWT Modules to try and make that work.
   I finally gave that up and tried to move that code closer to the
   Client directory ... and there a still a ton of errors.
 
   The most bothersome was in my UserDaoImpl where I have a
   getHibernateTemplate method, and it says that the source code isn't
   there.
 
   So ... it is driving me crazy ...
 
   Thanks!
  Tom
 
   On Sep 8, 4:04 pm, David Durham david.durham...@gmail.com wrote:
 After research in this group, and on Google in general, I have
 found
 that I should look at Gilead.
 So, I downloaded the latest jars and the latest sample (using GWT
 1.6)
 and sure enough, AGAIN, the sample uses hibernate.cfg.xml and
 Object.hbm.xml files 
 
I was able to make GWT and Hiberate (JPA annotations) work without
Gilead.  I just used the underlying beanlib replicators to undo the
cglib or javassist stuff before serializing to client.
 
-Dave

 


--~--~-~--~~~---~--~~
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-web-toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en
-~--~~~~--~~--~--~---



Re: GWT RPC Hibernate - again and again

2009-09-11 Thread Ed

Thomas,

Did you look at ?:
http://code.google.com/webtoolkit/articles/using_gwt_with_hibernate.html

If not, try it out, it will give you a good understanding of how
hibernate/gwt works together.




--~--~-~--~~~---~--~~
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-web-toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en
-~--~~~~--~~--~--~---



Re: GWT RPC Hibernate - again and again

2009-09-11 Thread Ed

He David,
 Gilead.  I just used the underlying beanlib replicators to undo the
 cglib or javassist stuff before serializing to client.

Which beanlib replicators are you using?

--~--~-~--~~~---~--~~
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-web-toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en
-~--~~~~--~~--~--~---



Re: GWT RPC Hibernate - again and again

2009-09-11 Thread Bruno Nandolpho

What version of gilead is the better? I´ m using 1.2.0.29..when i
tryed to update to a new version, i cant serialize my objects...any
help?

On Sep 10, 5:50 pm, Alexandros Papadakis alpa...@gmail.com wrote:
 Download hibernate4gwt. It is the predecessor of Gilead. There are samples
 there on how to use Spring + JPA.
 Try the samples, understand how it works, and then move to Gilead. It is
 just a matter of changing a few definitions.

 If you cant find it, mail me and I will send you the samples.

 Alex

 On Tue, Sep 8, 2009 at 11:17 PM, Thomas Holmes 
 thomas.j.hol...@gmail.comwrote:





  Would you have some sample code that I could see ... or a link to
  some.

  I'm going to continue looking through my book, and use their example
  that uses the Command Pattern.

  I am getting tons of errors because my DAO's and POJO's are in another
  package, so I was working with GWT Modules to try and make that work.
  I finally gave that up and tried to move that code closer to the
  Client directory ... and there a still a ton of errors.

  The most bothersome was in my UserDaoImpl where I have a
  getHibernateTemplate method, and it says that the source code isn't
  there.

  So ... it is driving me crazy ...

  Thanks!
                             Tom

  On Sep 8, 4:04 pm, David Durham david.durham...@gmail.com wrote:
After research in this group, and on Google in general, I have found
that I should look at Gilead.
So, I downloaded the latest jars and the latest sample (using GWT 1.6)
and sure enough, AGAIN, the sample uses hibernate.cfg.xml and
Object.hbm.xml files 

   I was able to make GWT and Hiberate (JPA annotations) work without
   Gilead.  I just used the underlying beanlib replicators to undo the
   cglib or javassist stuff before serializing to client.

   -Dave

--~--~-~--~~~---~--~~
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-web-toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en
-~--~~~~--~~--~--~---



Re: GWT RPC Hibernate - again and again

2009-09-11 Thread Thomas Holmes
Damn .. you are the man hat solved my problem.

I started with the StockWatcher application, and then added my Hibernate
POJO's and DAO;s.
However, I had the DAO's under the client directory, when I managed to move
those DAO's to the /server section, then it worked.

I am now able to get my data from the database, and it did show up on my UI.

So ... there are a number of issues I am working through ... but I've gotten
past this log jam.

Thanks very much for the help!
   Tom

On Thu, Sep 10, 2009 at 11:59 AM, jdwy jdw...@gmail.com wrote:


 Hey Thomas,

 A little late to the conversation, but I just want to say that I don't
 think the ToCollege code (or structure) should require a
 hibernate.cfg.xml. It should be ok to annotate the models that live in
 your client directory. That wasn't the case with earlier GWT because
 the annotations broke if it couldn't find the annotation package
 within client/, but I believe that's fixed.

 I just want to make sure that your UserDaoImpl and getHibernateTemplate
 () methods are not in the client package. That's definitely not what
 you want. Those should all be in the server/ package. inherits
 name='org.springframework.orm.hibernate3.support.HibernateDaoSupport'/
  is definitely not going to work.

 Rather than bring hibernate the pattern that the book espouses is to
 leave all of that on the server and communicate solely via commands.

 Annotated Domain objects  commands in the client package. DAOs 
 CommandProcessing classes in the server package.

 gl

 -Jeff Dwyer

 On Sep 10, 11:15 am, Robnauticus- robnauti...@gmail.com wrote:
  Another thing to look at is GWT-SL it has Spring, hibernate, Gilead
  and many other tools for integration.
 
  Rob
 
  On Sep 9, 12:29 pm, Thomas Holmes thomas.j.hol...@gmail.com wrote:
 
 
 
   Yes, absolutely 100% I do have Hibernate working with Annotations!
   The Hibernate DAO's and POJO's have all been Unit Tested and work
   perfectly 100%.
   And we are using Spring with the DAO's and POJO's defined in the
   applicationContext.xml file.
   There are NO hibernate.cfg.xml and Object.hm.xml files defined, and we
   don't seem to need them since all that is defined within the
   applicationContext.xml file.
 
   Yes, I have learned that I can't call Spring classes from within GWT.
 
   I agree with you, I need to create some DTO classes that handle the
   wire transfer between the UI and the database.
   I gather from reading that the DTO custom classes have to implement
   isSerializable and collections are ArrayList, String array, Vector,
   HashMap, and HashSet.
 
   So, I'm looking now for examples on when exactly the Service calls the
   backend database ...
   The GWT-RPC Service at some point either has to call the DAO's to
   create, retrieve/fetch, update, delete data.
   Where and how that happens I am looking for.
 
   I looked at Gilead and the samples, and they use Hibernate.cfg.xml and
   the Object.hbm.xml ... which I don't have in this application.
   So, if I found an example of Gilead with Spring, that would help.
 
   Thanks for the help, I do appreciate it!   :-)
 
   Tom
 
   On Sep 9, 1:38 pm, Robnauticus- robnauti...@gmail.com wrote:
 
Hello Thomas,
 
Do you have Hibernate working with annotations?  If you don't have an
cfg.xml file set up and mapping files, Hibernate will not work.  You
are also attempting to call spring classes inside of GWT which will
not work.
 
I created a Domain package that serves as the in-between for your
shared client/server data classes that are passed via RPC.
 
In your .gwt.xml file for your project you need to add source
path=domain / to the file to tell GWT that it can use those
 classes
as well as the client package.
 
Now you have the problem with serializing Hibernate object from
 client/
server.  Gilead is what I am using, there are other ways to do this
but Bruno did a great job creating the lib.  Basically the Hibernate
objects that are generated are too complex to be converted to js
objects so Gilead takes the nasty work out of the conversion.
 
Take a look at which core java libraries can be converted to js by
GWT.  Anything else will fail for the most part so don't try to
include it in your client code.  The server package will allow you to
do anything you want java-wise.
 
HTH,
Rob
 
On Sep 9, 8:35 am, Thomas Holmes thomas.j.hol...@gmail.com wrote:
 
 I get the idea that ouside packages need to be include in the
 module ...
 but of course I am going to include code from outside packages 
 Hibernate and Spring jars are outside ... and there is no source
 code:
 
 so, here are some errors;
 [ERROR] Line 5: The import org.springframework.orm cannot be
 resolved
 [ERROR] Line 10: HibernateDaoSupport cannot be resolved to a type
 [ERROR] Line 14: The method getHibernateTemplate() is undefined for
 the 

Re: GWT RPC Hibernate - again and again

2009-09-10 Thread Kango_V

fyi:  I have posted a feature request into Hibernates Jira asking for
a new entity mode be added.

Current Hibernate supports the current entity modes.

XML
POJO
MAP

This means that entities can be retrieved and updated again in these
formats.  Now, if we could just add JSON to this list.
Having JSON would mean you would be able to get an object graph out of
hibernate as JSON, send it down using GWT, update it and send it back
to Hibernate.

This would solve many, many issues.  I think it requires a new
Tuplizer implementation for Hibernate.  I meight even have a go at
this when I have time.

What do you all think?

Here's the Jira issue.  Go vote

http://opensource.atlassian.com/projects/hibernate/browse/HHH-4040

--
Darren.



On Sep 9, 8:29 pm, Thomas Holmes thomas.j.hol...@gmail.com wrote:
 Yes, absolutely 100% I do have Hibernate working with Annotations!
 The Hibernate DAO's and POJO's have all been Unit Tested and work
 perfectly 100%.
 And we are using Spring with the DAO's and POJO's defined in the
 applicationContext.xml file.
 There are NO hibernate.cfg.xml and Object.hm.xml files defined, and we
 don't seem to need them since all that is defined within the
 applicationContext.xml file.

 Yes, I have learned that I can't call Spring classes from within GWT.

 I agree with you, I need to create some DTO classes that handle the
 wire transfer between the UI and the database.
 I gather from reading that the DTO custom classes have to implement
 isSerializable and collections are ArrayList, String array, Vector,
 HashMap, and HashSet.

 So, I'm looking now for examples on when exactly the Service calls the
 backend database ...
 The GWT-RPC Service at some point either has to call the DAO's to
 create, retrieve/fetch, update, delete data.
 Where and how that happens I am looking for.

 I looked at Gilead and the samples, and they use Hibernate.cfg.xml and
 the Object.hbm.xml ... which I don't have in this application.
 So, if I found an example of Gilead with Spring, that would help.

 Thanks for the help, I do appreciate it!   :-)

 Tom

 On Sep 9, 1:38 pm, Robnauticus- robnauti...@gmail.com wrote:



  Hello Thomas,

  Do you have Hibernate working with annotations?  If you don't have an
  cfg.xml file set up and mapping files, Hibernate will not work.  You
  are also attempting to call spring classes inside of GWT which will
  not work.

  I created a Domain package that serves as the in-between for your
  shared client/server data classes that are passed via RPC.

  In your .gwt.xml file for your project you need to add source
  path=domain / to the file to tell GWT that it can use those classes
  as well as the client package.

  Now you have the problem with serializing Hibernate object from client/
  server.  Gilead is what I am using, there are other ways to do this
  but Bruno did a great job creating the lib.  Basically the Hibernate
  objects that are generated are too complex to be converted to js
  objects so Gilead takes the nasty work out of the conversion.

  Take a look at which core java libraries can be converted to js by
  GWT.  Anything else will fail for the most part so don't try to
  include it in your client code.  The server package will allow you to
  do anything you want java-wise.

  HTH,
  Rob

  On Sep 9, 8:35 am, Thomas Holmes thomas.j.hol...@gmail.com wrote:

   I get the idea that ouside packages need to be include in the module ...
   but of course I am going to include code from outside packages 
   Hibernate and Spring jars are outside ... and there is no source code:

   so, here are some errors;
   [ERROR] Line 5: The import org.springframework.orm cannot be resolved
   [ERROR] Line 10: HibernateDaoSupport cannot be resolved to a type
   [ERROR] Line 14: The method getHibernateTemplate() is undefined for the 
   type
   TestDaoImpl

   So, I added this to my StockWatcher.gwt.xml:
    !-- Other module inherits      --
     inherits
   name='org.springframework.orm.hibernate3.support.HibernateDaoSupport'/

   But now I get:
   [TRACE] Loading inherited module
   'org.springframework.orm.hibernate3.support.HibernateDaoSupport'
   [ERROR] Unable to find
   'org/springframework/orm/hibernate3/support/HibernateDaoSupport.gwt.xml' 
   on
   your classpath;
   could be a typo, or maybe you forgot to include a classpath entry for
   source?

   And then the application won't run at all ..

   On Wed, Sep 9, 2009 at 6:49 AM, Raphael André Bauer 

   raphael.andre.ba...@gmail.com wrote:

On Tue, Sep 8, 2009 at 10:17 PM, Thomas 
Holmesthomas.j.hol...@gmail.com
wrote:

 Would you have some sample code that I could see ... or a link to
 some.

 I'm going to continue looking through my book, and use their example
 that uses the Command Pattern.

 I am getting tons of errors because my DAO's and POJO's are in another
 package, so I was working with GWT Modules to try and make that work.
 I finally gave that up and tried to move 

Re: GWT RPC Hibernate - again and again

2009-09-10 Thread Robnauticus-

Another thing to look at is GWT-SL it has Spring, hibernate, Gilead
and many other tools for integration.


Rob

On Sep 9, 12:29 pm, Thomas Holmes thomas.j.hol...@gmail.com wrote:
 Yes, absolutely 100% I do have Hibernate working with Annotations!
 The Hibernate DAO's and POJO's have all been Unit Tested and work
 perfectly 100%.
 And we are using Spring with the DAO's and POJO's defined in the
 applicationContext.xml file.
 There are NO hibernate.cfg.xml and Object.hm.xml files defined, and we
 don't seem to need them since all that is defined within the
 applicationContext.xml file.

 Yes, I have learned that I can't call Spring classes from within GWT.

 I agree with you, I need to create some DTO classes that handle the
 wire transfer between the UI and the database.
 I gather from reading that the DTO custom classes have to implement
 isSerializable and collections are ArrayList, String array, Vector,
 HashMap, and HashSet.

 So, I'm looking now for examples on when exactly the Service calls the
 backend database ...
 The GWT-RPC Service at some point either has to call the DAO's to
 create, retrieve/fetch, update, delete data.
 Where and how that happens I am looking for.

 I looked at Gilead and the samples, and they use Hibernate.cfg.xml and
 the Object.hbm.xml ... which I don't have in this application.
 So, if I found an example of Gilead with Spring, that would help.

 Thanks for the help, I do appreciate it!   :-)

 Tom

 On Sep 9, 1:38 pm, Robnauticus- robnauti...@gmail.com wrote:



  Hello Thomas,

  Do you have Hibernate working with annotations?  If you don't have an
  cfg.xml file set up and mapping files, Hibernate will not work.  You
  are also attempting to call spring classes inside of GWT which will
  not work.

  I created a Domain package that serves as the in-between for your
  shared client/server data classes that are passed via RPC.

  In your .gwt.xml file for your project you need to add source
  path=domain / to the file to tell GWT that it can use those classes
  as well as the client package.

  Now you have the problem with serializing Hibernate object from client/
  server.  Gilead is what I am using, there are other ways to do this
  but Bruno did a great job creating the lib.  Basically the Hibernate
  objects that are generated are too complex to be converted to js
  objects so Gilead takes the nasty work out of the conversion.

  Take a look at which core java libraries can be converted to js by
  GWT.  Anything else will fail for the most part so don't try to
  include it in your client code.  The server package will allow you to
  do anything you want java-wise.

  HTH,
  Rob

  On Sep 9, 8:35 am, Thomas Holmes thomas.j.hol...@gmail.com wrote:

   I get the idea that ouside packages need to be include in the module ...
   but of course I am going to include code from outside packages 
   Hibernate and Spring jars are outside ... and there is no source code:

   so, here are some errors;
   [ERROR] Line 5: The import org.springframework.orm cannot be resolved
   [ERROR] Line 10: HibernateDaoSupport cannot be resolved to a type
   [ERROR] Line 14: The method getHibernateTemplate() is undefined for the 
   type
   TestDaoImpl

   So, I added this to my StockWatcher.gwt.xml:
    !-- Other module inherits      --
     inherits
   name='org.springframework.orm.hibernate3.support.HibernateDaoSupport'/

   But now I get:
   [TRACE] Loading inherited module
   'org.springframework.orm.hibernate3.support.HibernateDaoSupport'
   [ERROR] Unable to find
   'org/springframework/orm/hibernate3/support/HibernateDaoSupport.gwt.xml' 
   on
   your classpath;
   could be a typo, or maybe you forgot to include a classpath entry for
   source?

   And then the application won't run at all ..

   On Wed, Sep 9, 2009 at 6:49 AM, Raphael André Bauer 

   raphael.andre.ba...@gmail.com wrote:

On Tue, Sep 8, 2009 at 10:17 PM, Thomas 
Holmesthomas.j.hol...@gmail.com
wrote:

 Would you have some sample code that I could see ... or a link to
 some.

 I'm going to continue looking through my book, and use their example
 that uses the Command Pattern.

 I am getting tons of errors because my DAO's and POJO's are in another
 package, so I was working with GWT Modules to try and make that work.
 I finally gave that up and tried to move that code closer to the
 Client directory ... and there a still a ton of errors.

 The most bothersome was in my UserDaoImpl where I have a
 getHibernateTemplate method, and it says that the source code isn't
 there.
most likely this code is referenced by a module. some ideas:
- check by which module it is referenced (if you have more than one)
and make sure it is inherited by that module.
- make sure it is under the /client/ directory, so that the gwt
crosscompiler can find the sourcecode.
- make sure the file has no external references (import xyz) that are
not in the client 

Re: GWT RPC Hibernate - again and again

2009-09-10 Thread jdwy

Hey Thomas,

A little late to the conversation, but I just want to say that I don't
think the ToCollege code (or structure) should require a
hibernate.cfg.xml. It should be ok to annotate the models that live in
your client directory. That wasn't the case with earlier GWT because
the annotations broke if it couldn't find the annotation package
within client/, but I believe that's fixed.

I just want to make sure that your UserDaoImpl and getHibernateTemplate
() methods are not in the client package. That's definitely not what
you want. Those should all be in the server/ package. inherits
name='org.springframework.orm.hibernate3.support.HibernateDaoSupport'/
 is definitely not going to work.

Rather than bring hibernate the pattern that the book espouses is to
leave all of that on the server and communicate solely via commands.

Annotated Domain objects  commands in the client package. DAOs 
CommandProcessing classes in the server package.

gl

-Jeff Dwyer

On Sep 10, 11:15 am, Robnauticus- robnauti...@gmail.com wrote:
 Another thing to look at is GWT-SL it has Spring, hibernate, Gilead
 and many other tools for integration.

 Rob

 On Sep 9, 12:29 pm, Thomas Holmes thomas.j.hol...@gmail.com wrote:



  Yes, absolutely 100% I do have Hibernate working with Annotations!
  The Hibernate DAO's and POJO's have all been Unit Tested and work
  perfectly 100%.
  And we are using Spring with the DAO's and POJO's defined in the
  applicationContext.xml file.
  There are NO hibernate.cfg.xml and Object.hm.xml files defined, and we
  don't seem to need them since all that is defined within the
  applicationContext.xml file.

  Yes, I have learned that I can't call Spring classes from within GWT.

  I agree with you, I need to create some DTO classes that handle the
  wire transfer between the UI and the database.
  I gather from reading that the DTO custom classes have to implement
  isSerializable and collections are ArrayList, String array, Vector,
  HashMap, and HashSet.

  So, I'm looking now for examples on when exactly the Service calls the
  backend database ...
  The GWT-RPC Service at some point either has to call the DAO's to
  create, retrieve/fetch, update, delete data.
  Where and how that happens I am looking for.

  I looked at Gilead and the samples, and they use Hibernate.cfg.xml and
  the Object.hbm.xml ... which I don't have in this application.
  So, if I found an example of Gilead with Spring, that would help.

  Thanks for the help, I do appreciate it!   :-)

  Tom

  On Sep 9, 1:38 pm, Robnauticus- robnauti...@gmail.com wrote:

   Hello Thomas,

   Do you have Hibernate working with annotations?  If you don't have an
   cfg.xml file set up and mapping files, Hibernate will not work.  You
   are also attempting to call spring classes inside of GWT which will
   not work.

   I created a Domain package that serves as the in-between for your
   shared client/server data classes that are passed via RPC.

   In your .gwt.xml file for your project you need to add source
   path=domain / to the file to tell GWT that it can use those classes
   as well as the client package.

   Now you have the problem with serializing Hibernate object from client/
   server.  Gilead is what I am using, there are other ways to do this
   but Bruno did a great job creating the lib.  Basically the Hibernate
   objects that are generated are too complex to be converted to js
   objects so Gilead takes the nasty work out of the conversion.

   Take a look at which core java libraries can be converted to js by
   GWT.  Anything else will fail for the most part so don't try to
   include it in your client code.  The server package will allow you to
   do anything you want java-wise.

   HTH,
   Rob

   On Sep 9, 8:35 am, Thomas Holmes thomas.j.hol...@gmail.com wrote:

I get the idea that ouside packages need to be include in the module ...
but of course I am going to include code from outside packages 
Hibernate and Spring jars are outside ... and there is no source code:

so, here are some errors;
[ERROR] Line 5: The import org.springframework.orm cannot be resolved
[ERROR] Line 10: HibernateDaoSupport cannot be resolved to a type
[ERROR] Line 14: The method getHibernateTemplate() is undefined for the 
type
TestDaoImpl

So, I added this to my StockWatcher.gwt.xml:
 !-- Other module inherits      --
  inherits
name='org.springframework.orm.hibernate3.support.HibernateDaoSupport'/

But now I get:
[TRACE] Loading inherited module
'org.springframework.orm.hibernate3.support.HibernateDaoSupport'
[ERROR] Unable to find
'org/springframework/orm/hibernate3/support/HibernateDaoSupport.gwt.xml'
 on
your classpath;
could be a typo, or maybe you forgot to include a classpath entry for
source?

And then the application won't run at all ..

On Wed, Sep 9, 2009 at 6:49 AM, Raphael André Bauer 

raphael.andre.ba...@gmail.com wrote:

   

Re: GWT RPC Hibernate - again and again

2009-09-10 Thread Alexandros Papadakis
Download hibernate4gwt. It is the predecessor of Gilead. There are samples
there on how to use Spring + JPA.
Try the samples, understand how it works, and then move to Gilead. It is
just a matter of changing a few definitions.


If you cant find it, mail me and I will send you the samples.

Alex


On Tue, Sep 8, 2009 at 11:17 PM, Thomas Holmes thomas.j.hol...@gmail.comwrote:


 Would you have some sample code that I could see ... or a link to
 some.

 I'm going to continue looking through my book, and use their example
 that uses the Command Pattern.

 I am getting tons of errors because my DAO's and POJO's are in another
 package, so I was working with GWT Modules to try and make that work.
 I finally gave that up and tried to move that code closer to the
 Client directory ... and there a still a ton of errors.

 The most bothersome was in my UserDaoImpl where I have a
 getHibernateTemplate method, and it says that the source code isn't
 there.

 So ... it is driving me crazy ...

 Thanks!
Tom

 On Sep 8, 4:04 pm, David Durham david.durham...@gmail.com wrote:
   After research in this group, and on Google in general, I have found
   that I should look at Gilead.
   So, I downloaded the latest jars and the latest sample (using GWT 1.6)
   and sure enough, AGAIN, the sample uses hibernate.cfg.xml and
   Object.hbm.xml files 
 
  I was able to make GWT and Hiberate (JPA annotations) work without
  Gilead.  I just used the underlying beanlib replicators to undo the
  cglib or javassist stuff before serializing to client.
 
  -Dave
 


--~--~-~--~~~---~--~~
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-web-toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en
-~--~~~~--~~--~--~---



Re: GWT RPC Hibernate - again and again

2009-09-09 Thread Raphael André Bauer

On Tue, Sep 8, 2009 at 10:17 PM, Thomas Holmesthomas.j.hol...@gmail.com wrote:

 Would you have some sample code that I could see ... or a link to
 some.

 I'm going to continue looking through my book, and use their example
 that uses the Command Pattern.

 I am getting tons of errors because my DAO's and POJO's are in another
 package, so I was working with GWT Modules to try and make that work.
 I finally gave that up and tried to move that code closer to the
 Client directory ... and there a still a ton of errors.

 The most bothersome was in my UserDaoImpl where I have a
 getHibernateTemplate method, and it says that the source code isn't
 there.
most likely this code is referenced by a module. some ideas:
- check by which module it is referenced (if you have more than one)
and make sure it is inherited by that module.
- make sure it is under the /client/ directory, so that the gwt
crosscompiler can find the sourcecode.
- make sure the file has no external references (import xyz) that are
not in the client directory

this should make that part work... hope that helps...

r






 So ... it is driving me crazy ...

 Thanks!
                            Tom

 On Sep 8, 4:04 pm, David Durham david.durham...@gmail.com wrote:
  After research in this group, and on Google in general, I have found
  that I should look at Gilead.
  So, I downloaded the latest jars and the latest sample (using GWT 1.6)
  and sure enough, AGAIN, the sample uses hibernate.cfg.xml and
  Object.hbm.xml files 

 I was able to make GWT and Hiberate (JPA annotations) work without
 Gilead.  I just used the underlying beanlib replicators to undo the
 cglib or javassist stuff before serializing to client.

 -Dave
 


--~--~-~--~~~---~--~~
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-web-toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en
-~--~~~~--~~--~--~---



Re: GWT RPC Hibernate - again and again

2009-09-09 Thread Thomas Holmes
I get the idea that ouside packages need to be include in the module ...
but of course I am going to include code from outside packages 
Hibernate and Spring jars are outside ... and there is no source code:

so, here are some errors;
[ERROR] Line 5: The import org.springframework.orm cannot be resolved
[ERROR] Line 10: HibernateDaoSupport cannot be resolved to a type
[ERROR] Line 14: The method getHibernateTemplate() is undefined for the type
TestDaoImpl

So, I added this to my StockWatcher.gwt.xml:
 !-- Other module inherits  --
  inherits
name='org.springframework.orm.hibernate3.support.HibernateDaoSupport'/

But now I get:
[TRACE] Loading inherited module
'org.springframework.orm.hibernate3.support.HibernateDaoSupport'
[ERROR] Unable to find
'org/springframework/orm/hibernate3/support/HibernateDaoSupport.gwt.xml' on
your classpath;
could be a typo, or maybe you forgot to include a classpath entry for
source?

And then the application won't run at all ..

On Wed, Sep 9, 2009 at 6:49 AM, Raphael André Bauer 
raphael.andre.ba...@gmail.com wrote:


 On Tue, Sep 8, 2009 at 10:17 PM, Thomas Holmesthomas.j.hol...@gmail.com
 wrote:
 
  Would you have some sample code that I could see ... or a link to
  some.
 
  I'm going to continue looking through my book, and use their example
  that uses the Command Pattern.
 
  I am getting tons of errors because my DAO's and POJO's are in another
  package, so I was working with GWT Modules to try and make that work.
  I finally gave that up and tried to move that code closer to the
  Client directory ... and there a still a ton of errors.
 
  The most bothersome was in my UserDaoImpl where I have a
  getHibernateTemplate method, and it says that the source code isn't
  there.
 most likely this code is referenced by a module. some ideas:
 - check by which module it is referenced (if you have more than one)
 and make sure it is inherited by that module.
 - make sure it is under the /client/ directory, so that the gwt
 crosscompiler can find the sourcecode.
 - make sure the file has no external references (import xyz) that are
 not in the client directory

 this should make that part work... hope that helps...

 r





 
  So ... it is driving me crazy ...
 
  Thanks!
 Tom
 
  On Sep 8, 4:04 pm, David Durham david.durham...@gmail.com wrote:
   After research in this group, and on Google in general, I have found
   that I should look at Gilead.
   So, I downloaded the latest jars and the latest sample (using GWT 1.6)
   and sure enough, AGAIN, the sample uses hibernate.cfg.xml and
   Object.hbm.xml files 
 
  I was able to make GWT and Hiberate (JPA annotations) work without
  Gilead.  I just used the underlying beanlib replicators to undo the
  cglib or javassist stuff before serializing to client.
 
  -Dave
  
 

 


--~--~-~--~~~---~--~~
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-web-toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en
-~--~~~~--~~--~--~---



Re: GWT RPC Hibernate - again and again

2009-09-09 Thread Raphael André Bauer

On Wed, Sep 9, 2009 at 5:35 PM, Thomas Holmesthomas.j.hol...@gmail.com wrote:
 I get the idea that ouside packages need to be include in the module ...
 but of course I am going to include code from outside packages 
 Hibernate and Spring jars are outside ... and there is no source code:

 so, here are some errors;
 [ERROR] Line 5: The import org.springframework.orm cannot be resolved
 [ERROR] Line 10: HibernateDaoSupport cannot be resolved to a type
 [ERROR] Line 14: The method getHibernateTemplate() is undefined for the type
 TestDaoImpl

 So, I added this to my StockWatcher.gwt.xml:
  !-- Other module inherits  --
   inherits
 name='org.springframework.orm.hibernate3.support.HibernateDaoSupport'/

 But now I get:
 [TRACE] Loading inherited module
 'org.springframework.orm.hibernate3.support.HibernateDaoSupport'
 [ERROR] Unable to find
 'org/springframework/orm/hibernate3/support/HibernateDaoSupport.gwt.xml' on
 your classpath;
 could be a typo, or maybe you forgot to include a classpath entry for
 source?

 And then the application won't run at all ..

okay. you have to understand what crosscompiling actually means. the
stuff you write in java for the gwt looks like java. eclipse even
thinks it is java and the debugger works. but it is not java.

so if it us no java. then you cannot include any java file.

what is it then? well it is javascript. there is a really cool
crosscompiling step involved that transforms the java stuff to
javascript.

so simply forget that you can include large java packages into your
gwt application (btw = the spring package you included is not a gwt
package = so this has to fails...).


how to solve this? check out smart-gwt
(http://code.google.com/p/smartgwt/) to get an idea (i don't know
smart-gwt well, but the basic idea is cool). or generate some simple
POJOs that have no dependencies to any package and can be handled by
java server side code and also javascript code on the GWT client side.

hope that helps...

r


 On Wed, Sep 9, 2009 at 6:49 AM, Raphael André Bauer
 raphael.andre.ba...@gmail.com wrote:

 On Tue, Sep 8, 2009 at 10:17 PM, Thomas Holmesthomas.j.hol...@gmail.com
 wrote:
 
  Would you have some sample code that I could see ... or a link to
  some.
 
  I'm going to continue looking through my book, and use their example
  that uses the Command Pattern.
 
  I am getting tons of errors because my DAO's and POJO's are in another
  package, so I was working with GWT Modules to try and make that work.
  I finally gave that up and tried to move that code closer to the
  Client directory ... and there a still a ton of errors.
 
  The most bothersome was in my UserDaoImpl where I have a
  getHibernateTemplate method, and it says that the source code isn't
  there.
 most likely this code is referenced by a module. some ideas:
 - check by which module it is referenced (if you have more than one)
 and make sure it is inherited by that module.
 - make sure it is under the /client/ directory, so that the gwt
 crosscompiler can find the sourcecode.
 - make sure the file has no external references (import xyz) that are
 not in the client directory

 this should make that part work... hope that helps...

 r





 
  So ... it is driving me crazy ...
 
  Thanks!
                             Tom
 
  On Sep 8, 4:04 pm, David Durham david.durham...@gmail.com wrote:
   After research in this group, and on Google in general, I have found
   that I should look at Gilead.
   So, I downloaded the latest jars and the latest sample (using GWT
   1.6)
   and sure enough, AGAIN, the sample uses hibernate.cfg.xml and
   Object.hbm.xml files 
 
  I was able to make GWT and Hiberate (JPA annotations) work without
  Gilead.  I just used the underlying beanlib replicators to undo the
  cglib or javassist stuff before serializing to client.
 
  -Dave
  
 




 


--~--~-~--~~~---~--~~
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-web-toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en
-~--~~~~--~~--~--~---



Re: GWT RPC Hibernate - again and again

2009-09-09 Thread Robnauticus-

Hello Thomas,

Do you have Hibernate working with annotations?  If you don't have an
cfg.xml file set up and mapping files, Hibernate will not work.  You
are also attempting to call spring classes inside of GWT which will
not work.

I created a Domain package that serves as the in-between for your
shared client/server data classes that are passed via RPC.

In your .gwt.xml file for your project you need to add source
path=domain / to the file to tell GWT that it can use those classes
as well as the client package.

Now you have the problem with serializing Hibernate object from client/
server.  Gilead is what I am using, there are other ways to do this
but Bruno did a great job creating the lib.  Basically the Hibernate
objects that are generated are too complex to be converted to js
objects so Gilead takes the nasty work out of the conversion.

Take a look at which core java libraries can be converted to js by
GWT.  Anything else will fail for the most part so don't try to
include it in your client code.  The server package will allow you to
do anything you want java-wise.

HTH,
Rob


On Sep 9, 8:35 am, Thomas Holmes thomas.j.hol...@gmail.com wrote:
 I get the idea that ouside packages need to be include in the module ...
 but of course I am going to include code from outside packages 
 Hibernate and Spring jars are outside ... and there is no source code:

 so, here are some errors;
 [ERROR] Line 5: The import org.springframework.orm cannot be resolved
 [ERROR] Line 10: HibernateDaoSupport cannot be resolved to a type
 [ERROR] Line 14: The method getHibernateTemplate() is undefined for the type
 TestDaoImpl

 So, I added this to my StockWatcher.gwt.xml:
  !-- Other module inherits      --
   inherits
 name='org.springframework.orm.hibernate3.support.HibernateDaoSupport'/

 But now I get:
 [TRACE] Loading inherited module
 'org.springframework.orm.hibernate3.support.HibernateDaoSupport'
 [ERROR] Unable to find
 'org/springframework/orm/hibernate3/support/HibernateDaoSupport.gwt.xml' on
 your classpath;
 could be a typo, or maybe you forgot to include a classpath entry for
 source?

 And then the application won't run at all ..

 On Wed, Sep 9, 2009 at 6:49 AM, Raphael André Bauer 



 raphael.andre.ba...@gmail.com wrote:

  On Tue, Sep 8, 2009 at 10:17 PM, Thomas Holmesthomas.j.hol...@gmail.com
  wrote:

   Would you have some sample code that I could see ... or a link to
   some.

   I'm going to continue looking through my book, and use their example
   that uses the Command Pattern.

   I am getting tons of errors because my DAO's and POJO's are in another
   package, so I was working with GWT Modules to try and make that work.
   I finally gave that up and tried to move that code closer to the
   Client directory ... and there a still a ton of errors.

   The most bothersome was in my UserDaoImpl where I have a
   getHibernateTemplate method, and it says that the source code isn't
   there.
  most likely this code is referenced by a module. some ideas:
  - check by which module it is referenced (if you have more than one)
  and make sure it is inherited by that module.
  - make sure it is under the /client/ directory, so that the gwt
  crosscompiler can find the sourcecode.
  - make sure the file has no external references (import xyz) that are
  not in the client directory

  this should make that part work... hope that helps...

  r

   So ... it is driving me crazy ...

   Thanks!
                              Tom

   On Sep 8, 4:04 pm, David Durham david.durham...@gmail.com wrote:
After research in this group, and on Google in general, I have found
that I should look at Gilead.
So, I downloaded the latest jars and the latest sample (using GWT 1.6)
and sure enough, AGAIN, the sample uses hibernate.cfg.xml and
Object.hbm.xml files 

   I was able to make GWT and Hiberate (JPA annotations) work without
   Gilead.  I just used the underlying beanlib replicators to undo the
   cglib or javassist stuff before serializing to client.

   -Dave
--~--~-~--~~~---~--~~
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-web-toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en
-~--~~~~--~~--~--~---



GWT RPC Hibernate - again and again

2009-09-08 Thread Thomas Holmes

I am going to keep asking and keep bugging and jumping up and down
until I get an answer that can help me.

I have the book Pro Web 2.0 Application Development with GWT and
Chapter 6 is about saving work with Hibernate to the database ... too
bad it expects a hibernate.cfg.xml file and Object.hbm.xml files, we
have neither.

We have Spring 2.5.6 Beans and use Hibernate-Annotations.  The DAO's
and POJO's all work, that is something we did ahead of time.

After research in this group, and on Google in general, I have found
that I should look at Gilead.
So, I downloaded the latest jars and the latest sample (using GWT 1.6)
and sure enough, AGAIN, the sample uses hibernate.cfg.xml and
Object.hbm.xml files 

Maybe I just need to tweak that sample and get rid of the
hibernate.cfg.xml and hbm.xml files ...
Maybe I should just change them use use HIbernate-Annotations?

I'll test this out and see if it works.

If anyone can let me know if this will work, or if there is a better
way, that would be great.

Thanks!
   Tom

--~--~-~--~~~---~--~~
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-web-toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en
-~--~~~~--~~--~--~---



Re: GWT RPC Hibernate - again and again

2009-09-08 Thread David Durham

 After research in this group, and on Google in general, I have found
 that I should look at Gilead.
 So, I downloaded the latest jars and the latest sample (using GWT 1.6)
 and sure enough, AGAIN, the sample uses hibernate.cfg.xml and
 Object.hbm.xml files 

I was able to make GWT and Hiberate (JPA annotations) work without
Gilead.  I just used the underlying beanlib replicators to undo the
cglib or javassist stuff before serializing to client.


-Dave

--~--~-~--~~~---~--~~
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-web-toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en
-~--~~~~--~~--~--~---



Re: GWT RPC Hibernate - again and again

2009-09-08 Thread Thomas Holmes

Would you have some sample code that I could see ... or a link to
some.

I'm going to continue looking through my book, and use their example
that uses the Command Pattern.

I am getting tons of errors because my DAO's and POJO's are in another
package, so I was working with GWT Modules to try and make that work.
I finally gave that up and tried to move that code closer to the
Client directory ... and there a still a ton of errors.

The most bothersome was in my UserDaoImpl where I have a
getHibernateTemplate method, and it says that the source code isn't
there.

So ... it is driving me crazy ...

Thanks!
Tom

On Sep 8, 4:04 pm, David Durham david.durham...@gmail.com wrote:
  After research in this group, and on Google in general, I have found
  that I should look at Gilead.
  So, I downloaded the latest jars and the latest sample (using GWT 1.6)
  and sure enough, AGAIN, the sample uses hibernate.cfg.xml and
  Object.hbm.xml files 

 I was able to make GWT and Hiberate (JPA annotations) work without
 Gilead.  I just used the underlying beanlib replicators to undo the
 cglib or javassist stuff before serializing to client.

 -Dave
--~--~-~--~~~---~--~~
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-web-toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en
-~--~~~~--~~--~--~---