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&
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
--
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
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"
>&
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
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
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
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
> 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/
-
--
> 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
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/
--
ukasz
> http://www.lenart.org.pl/
>
> -----
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
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
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
;
>> struts2
>>
>> org.apache.struts2.dispatcher.FilterDispatcher
>>
>>
>>
>>
>> struts2
>> /*
>>
>>
>>
>>
>> index.jsp
>>
org.springframework.web.context.ContextLoaderListener
>
>
>
>
>
> Regards
> --
> Lukasz
> http://www.lenart.org.pl/
>
> -----
> To unsubscribe, e-mail: [EMAIL PROTE
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
>>
>>
>> Regards
>> --
>> Lukasz
>> http://www.lenart.org.pl/
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
&g
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
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.
--
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
>
>
>
> org.springframework.web.context.ContextLoaderListener
>
>
>
>
>
> Regards
> --
> Lukasz
> http://www.lenart.org.pl/
>
> -
> To unsubscribe, e-mail: [EMAIL PR
roblem with web applications.
>
>
> Regards
> --
> Lukasz
> http://www.lenart.org.pl/
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
> 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
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
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-
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.
--- 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
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/
-
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
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
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
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
33 matches
Mail list logo