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 <[email protected]> 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- <[email protected]> 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 <[email protected]> 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 <
>
> > > [email protected]> wrote:
>
> > > > On Tue, Sep 8, 2009 at 10:17 PM, Thomas 
> > > > Holmes<[email protected]>
> > > > 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 <[email protected]> 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 [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-web-toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to