Thanks a lot  Néstor

regards,

Nagin


2011/1/27 Néstor Boscán <[email protected]>

> I found this one on the web:
>
> http://maherkilani.blogspot.com/2008/12/hibernate-proxy-cleaner.html
>
> Regards,
>
> Néstor Boscán
>
>  On Thu, Jan 27, 2011 at 2:15 AM, Nagin Kothari <[email protected]>wrote:
>
>>
>> Hi,
>> Can you point to some link that provide sample code or utility to clean
>> the Hibernate POJO (Hibernate Cleaner class) as you have mentioned in this
>> mail. It would greately help me too.
>>
>> Thanks in advance,
>>
>> Nagin
>> 2011/1/26 Néstor Boscán <[email protected]>
>>
>>>  This is very tipical in Hibernate applications that have to serialize
>>> objects through the network be it GWT, Web Services, JSON, etc. Hibernate
>>> will leave his own POJO in your objects for lazy initialization purposes.
>>> When GWT or a Web Service tries to serialize the objects and opens the
>>> hibernate POJO it will throw LazyInitializationException because the
>>> connection is already closed. What I've done in my applications is to clean
>>> the POJO of any Hibernate references. This is done with a Hibernate Cleaner
>>> class. On the web there are a couple of examples of this.
>>>
>>> Regards,
>>>
>>> Néstor Boscán
>>>
>>> On Tue, Jan 25, 2011 at 2:33 PM, Debashish <[email protected]>wrote:
>>>
>>>> Hi
>>>>
>>>> I am trying for a sample using GWT and database layer as Hibernate
>>>> with Oracle on Google Aps server.
>>>>
>>>> I have done a sample for Hibernate with JSP as presentation layer,
>>>> which is working fine.
>>>> But the same approach is not working with GWT.
>>>>
>>>> Here is a verygood link on this topic
>>>>
>>>> http://code.google.com/webtoolkit/articles/using_gwt_with_hibernate.html
>>>> and my approach is almost similar.
>>>>
>>>> I have followed the below approach,
>>>> The RemoteServiceServlet makes a call to Hibernate layer and tries the
>>>> initializes the SessionFactory as below,
>>>>      sessionFactory = new
>>>> Configuration().configure().buildSessionFactory();
>>>>
>>>> I have added the jars necessary for the Hibernate layer (and
>>>> classes12.jar for oracle driver).
>>>>
>>>> However while running , it is giving me an error as below,
>>>>
>>>> --------------------------------------------------------------------------------------------------------
>>>> Initial SessionFactory creation failed.java.lang.NoClassDefFoundError:
>>>> java.net.Socket is a restricted class. Please see the Google  App
>>>> Engine developer's guide for more details.
>>>> [ERROR] javax.servlet.ServletContext log: Exception while dispatching
>>>> incoming RPC call
>>>> com.google.gwt.user.server.rpc.UnexpectedException: Service method
>>>> 'public abstract java.lang.Long
>>>>
>>>> com.google.musicstore.client.MusicStoreService.saveAccount(com.google.musicstore.client.dto.AccountDTO)'
>>>> threw an unexpected exception: java.lang.ExceptionInInitializerError
>>>>        at
>>>> com.google.gwt.user.server.rpc.RPC.encodeResponseForFailure(RPC.java:
>>>> 378)
>>>>
>>>> --------------------------------------------------------------------------------------------------------
>>>> I have one through some of the threads which suggested me to download
>>>> the google apps jar files and try it. I have downladed it. but there
>>>> is no proper direction on how to make use of which jar file.
>>>>
>>>> Have anybody tried the same. Please let me know if anything I am doing
>>>> wrong.
>>>> *** Note that I am using Oracle 9.2 as local database.
>>>>
>>>> Thanks
>>>> Dev
>>>>
>>>> --
>>>> 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]<google-web-toolkit%[email protected]>
>>>> .
>>>> For more options, visit this group at
>>>> http://groups.google.com/group/google-web-toolkit?hl=en.
>>>>
>>>>
>>> --
>>> 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]<google-web-toolkit%[email protected]>
>>> .
>>> For more options, visit this group at
>>> http://groups.google.com/group/google-web-toolkit?hl=en.
>>>
>>
>> --
>>   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]<google-web-toolkit%[email protected]>
>> .
>> For more options, visit this group at
>> http://groups.google.com/group/google-web-toolkit?hl=en.
>>
>
>   --
> 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]<google-web-toolkit%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.
>

-- 
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