Re: LazyInitializationException

2010-10-29 Thread Maurizio Cucchiara
It's hibernate thing (I guess db connection timeout). What's your DB? mysql? 2010/10/29 cellterry : > > Dear all, > > I encountered LazyInitializationException today in my SSH project today as > follows. > >>>>>>>>LOG4J&

LazyInitializationException

2010-10-29 Thread cellterry
Dear all, I encountered LazyInitializationException today in my SSH project today as follows. >>>>>>>LOG4J<<<<<<< 1 2010-10-29 17:37:42,454 [http-8080-2] ERROR org.hibernate.LazyInitializationException - #org.hibernate.LazyInitializationException.(Lazy

Re: Hibernate, HTTP Session, and LazyInitializationException

2009-02-25 Thread John Dell'Aera
-- From: "suhas kokal" Sent: Wednesday, February 25, 2009 11:12 PM To: "Struts Users Mailing List" Subject: Re: Hibernate, HTTP Session, and LazyInitializationException Hi all, If some body knows hot to use javascript alerts with struts 2

Re: Hibernate, HTTP Session, and LazyInitializationException

2009-02-25 Thread Nils-Helge Garli Hegvik
ease find me the way. > > Thanks a lot in advance. > > Suhas. > > > --- On Wed, 25/2/09, Paul Benedict wrote: > >> From: Paul Benedict >> Subject: Hibernate, HTTP Session, and LazyInitializationException >> To: "Struts Users Mailing List" >&

Re: Hibernate, HTTP Session, and LazyInitializationException

2009-02-25 Thread suhas kokal
n, and LazyInitializationException > To: "Struts Users Mailing List" > Date: Wednesday, 25 February, 2009, 11:15 AM > Does anyone have a good solution for objects stored in an > HTTP Session > that should be reattached per request? For example, like > the > authenticated "user" ob

Re: Hibernate, HTTP Session, and LazyInitializationException

2009-02-25 Thread Antonio Petrelli
2009/2/25 Paul Benedict : > I had a servlet filter written that attached the entity per request, > but a double-click from the user showed the futility of that approach. > You can't have one entity attached to two sessions :-) Uh sorry I did not read correctly this sentence. You are right, the sam

Re: Hibernate, HTTP Session, and LazyInitializationException

2009-02-25 Thread Antonio Petrelli
2009/2/25 Paul Benedict : > Does anyone have a good solution for objects stored in an HTTP Session > that should be reattached per request? For example, like the > authenticated "user" object stored in the HTTP Session. > > I had a servlet filter written that attached the entity per request, > but

Hibernate, HTTP Session, and LazyInitializationException

2009-02-24 Thread Paul Benedict
Does anyone have a good solution for objects stored in an HTTP Session that should be reattached per request? For example, like the authenticated "user" object stored in the HTTP Session. I had a servlet filter written that attached the entity per request, but a double-click from the user showed t

Re: LazyInitializationException with Struts 2 + Spring 2 + JPA + AJAX application

2008-06-27 Thread Lukasz Lenart
> I think that this solution should be added somewhere in that Struts 2 + > Spring 2 + JPA + AJAX application example, because a lot of people will have > the same problem. The right order is already in the example, you made simple mistypo ;-) Best regards -- Lukasz http://www.lenart.org.pl/ -

Re: LazyInitializationException with Struts 2 + Spring 2 + JPA + AJAX application

2008-06-27 Thread Milan Milanovic
-- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- View this message in context: http://www.nabble.com/LazyInitializationException-with-Struts-2-%2B-Spring-2-%2B-JPA-%2B-AJAX-application-tp1

Re: LazyInitializationException with Struts 2 + Spring 2 + JPA + AJAX application

2008-06-27 Thread Lukasz Lenart
Move OpenEntityManagerInViewFilter mapping before Struts2 mapping like below Spring OpenEntityManagerInViewFilter /* struts2 /* If Acegi also use JPA. move OpenEntityManagerInViewFilter to the top. Regards -- Lukasz http://www.lenart.org.pl/ --

Re: LazyInitializationException with Struts 2 + Spring 2 + JPA + AJAX application

2008-06-27 Thread Milan Milanovic
ukasz > http://www.lenart.org.pl/ > > ----- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > >

Re: LazyInitializationException with Struts 2 + Spring 2 + JPA + AJAX application

2008-06-27 Thread Milan Milanovic
LazyInitializationException. What can I do ? -- Thx, Milan Lukasz Lenart wrote: > > 2008/6/27 Milan Milanovic <[EMAIL PROTECTED]>: >> >> Hi Lukasz, >> >> AFAIK I just need to define sessionFactory bean in my >> applicationContext.xml >> to work with my JPA-enabled cl

Re: LazyInitializationException with Struts 2 + Spring 2 + JPA + AJAX application

2008-06-27 Thread Lukasz Lenart
2008/6/27 Milan Milanovic <[EMAIL PROTECTED]>: > > Hi Lukasz, > > great, thanks! > > Yes, I put this new mapping to my web.xml and now my application works. But > again when I retrieve > person from database with: person = service.find(...); and call > person.getJobs() I again get: > > > org.hibern

Re: LazyInitializationException with Struts 2 + Spring 2 + JPA + AJAX application

2008-06-27 Thread Milan Milanovic
; >> struts2 >> >> org.apache.struts2.dispatcher.FilterDispatcher >> >> >> >> >> struts2 >> /* >> >> >> >> >> index.jsp >>

Re: LazyInitializationException with Struts 2 + Spring 2 + JPA + AJAX application

2008-06-27 Thread Milan Milanovic
org.springframework.web.context.ContextLoaderListener > > > > > > Regards > -- > Lukasz > http://www.lenart.org.pl/ > > ----- > To unsubscribe, e-mail: [EMAIL PROTE

Re: LazyInitializationException with Struts 2 + Spring 2 + JPA + AJAX application

2008-06-27 Thread Lukasz Lenart
2008/6/27 Milan Milanovic <[EMAIL PROTECTED]>: > > Hi Lukasz, > > AFAIK I just need to define sessionFactory bean in my applicationContext.xml > to work with my JPA-enabled classes (just like in the Person example) ? How > can I do that ? Sorry!! My big mistake ;-) Right now I discovered that you

Re: LazyInitializationException with Struts 2 + Spring 2 + JPA + AJAX application

2008-06-27 Thread Milan Milanovic
>> >> >> Regards >> -- >> Lukasz >> http://www.lenart.org.pl/ >> >> - >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] &g

Re: LazyInitializationException with Struts 2 + Spring 2 + JPA + AJAX application

2008-06-27 Thread Lukasz Lenart
Hi, 2008/6/27 Milan Milanovic <[EMAIL PROTECTED]>: > > Hi Lukasz, > > I tried to define web.xml as you give here, but when I deploy my application > I get this exception: Just look to the doc, link I've sent you, there is such note: Looks up the SessionFactory in Spring's root web application co

Re: LazyInitializationException with Struts 2 + Spring 2 + JPA + AJAX application

2008-06-27 Thread Milan Milanovic
CTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- View this message in context: http://www.nabble.com/LazyInitializationException-with-Struts-2-%2B-Spring-2-%2B-JPA-%2B-AJAX-application-tp18155823p18157734.html Sent from the Struts - User mailing list archive at Nabble.com. --

Re: LazyInitializationException with Struts 2 + Spring 2 + JPA + AJAX application

2008-06-27 Thread Lukasz Lenart
2008/6/27 Milan Milanovic <[EMAIL PROTECTED]>: > > Hi Lukasz, > > I wrote this in my first post in this thread, I need to read > person.getJobs() when person object is loaded in my action class for this > Struts + AJAX+ Spring + Hibernate example provided in Struts docs, that's > it. Just add that

Re: LazyInitializationException with Struts 2 + Spring 2 + JPA + AJAX application

2008-06-27 Thread Milan Milanovic
> > > > org.springframework.web.context.ContextLoaderListener > > > > > > Regards > -- > Lukasz > http://www.lenart.org.pl/ > > - > To unsubscribe, e-mail: [EMAIL PR

Re: LazyInitializationException with Struts 2 + Spring 2 + JPA + AJAX application

2008-06-27 Thread Milan Milanovic
roblem with web applications. > > > Regards > -- > Lukasz > http://www.lenart.org.pl/ > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > >

Re: LazyInitializationException with Struts 2 + Spring 2 + JPA + AJAX application

2008-06-27 Thread Lukasz Lenart
> I see that I can use OpenSessionInViewFilter, just I now need some example > for this kind of application. Example: http://java.sun.com/xml/ns/j2ee"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; version="2.4" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com

Re: LazyInitializationException with Struts 2 + Spring 2 + JPA + AJAX application

2008-06-27 Thread Lukasz Lenart
2008/6/27 Milan Milanovic <[EMAIL PROTECTED]>: > > Hi, > > thank you. Do you know for any example of using this filter for application > like I mentioned ? I'm not quite sure what you need, but this is the common why, how to solve such problem with web applications. Regards -- Lukasz http://www

Re: LazyInitializationException with Struts 2 + Spring 2 + JPA + AJAX application

2008-06-27 Thread Milan Milanovic
docs. > > I see that I can use OpenSessionInViewFilter, just I now need some example > for this kind of application. > > Dave > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-

Re: LazyInitializationException with Struts 2 + Spring 2 + JPA + AJAX application

2008-06-27 Thread Milan Milanovic
EMAIL PROTECTED] > > > -- View this message in context: http://www.nabble.com/LazyInitializationException-with-Struts-2-%2B-Spring-2-%2B-JPA-%2B-AJAX-application-tp18155823p18156840.html Sent from the Struts - User mailing list archive at Nabble.com.

Re: LazyInitializationException with Struts 2 + Spring 2 + JPA + AJAX application

2008-06-27 Thread Dave Newton
--- On Fri, 6/27/08, Milan Milanovic <[EMAIL PROTECTED]> wrote: > I now that Hibernate session is closed, I've tried with > Hibernate.initialize(person.getJobs()), but it is the same! ... wouldn't the session still be closed? http://www.hibernate.org/hib_docs/v3/api/org/hibernate/Hibernate.html#i

Re: LazyInitializationException with Struts 2 + Spring 2 + JPA + AJAX application

2008-06-27 Thread Lukasz Lenart
Hi, Add OpenSessionInViewFilter [1] filter to your web.xml [1] http://static.springframework.org/spring/docs/2.5.x/api/org/springframework/orm/hibernate3/support/OpenSessionInViewFilter.html Regards -- Lukasz http://www.lenart.org.pl/ -

LazyInitializationException with Struts 2 + Spring 2 + JPA + AJAX application

2008-06-27 Thread Milan Milanovic
with person = service.find(id);and then to access to jobs, e.g., person.getJobs(), I get LazyInitializationException !! I now that Hibernate session is closed, I've tried with Hibernate.initialize(person.getJobs()), but it is the same ! Please, help because I think this is MAJOR problem with ev

RE: Struts-EL with Hibernate and LazyInitializationException (no session)

2004-12-20 Thread Marius Botha
at that time and that is when I get the exception. Thanks again. Marius -Original Message- From: David G. Friedman [mailto:[EMAIL PROTECTED] Sent: 21 December 2004 07:07 To: Struts Users Mailing List Subject: RE: Struts-EL with Hibernate and LazyInitializationException (no session) Mariu

RE: Struts-EL with Hibernate and LazyInitializationException (no session)

2004-12-20 Thread David G. Friedman
scope. How are you "lazily" loading it? Regards, David -Original Message- From: Marius Botha [mailto:[EMAIL PROTECTED] Sent: Monday, December 20, 2004 9:56 AM To: [EMAIL PROTECTED] Subject: Struts-EL with Hibernate and LazyInitializationException (no session) Hi there, I'm

Struts-EL with Hibernate and LazyInitializationException (no session)

2004-12-20 Thread Marius Botha
Hi there, I'm hoping someone out there have some experience with struts and Hibernate and can point me in the right direction. I'm fairly new to struts and have actually been using JSF, Hibernate and JBoss for the last couple of months so this was my only reference point. In JSF using the EL is qu