Bug 232425 - org.hibernate.LazyInitializationException in Hosted
org.hibernate.LazyInitializationException in Hosted
Status: CLOSED CURRENTRELEASE
Product: Red Hat Network
Classification: Red Hat
Component: RHN/Web Site (Show other bugs)
rhn500
All Linux
medium Severity medium
: ---
: ---
Assigned To: Mike Orazi
Preethi Thomas
:
Depends On:
Blocks: rhn500h-hotfix
  Show dependency treegraph
 
Reported: 2007-03-15 10:20 EDT by Bret McMillan
Modified: 2007-03-27 09:17 EDT (History)
1 user (show)

See Also:
Fixed In Version: 5.0.0
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-03-27 09:17:27 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Bret McMillan 2007-03-15 10:20:48 EDT
Request:
No request information


User Information:
No User logged in.

Exception:
org.hibernate.LazyInitializationException: could not initialize proxy - the
owning Session was closed
	at
org.hibernate.proxy.AbstractLazyInitializer.initialize(AbstractLazyInitializer.java(Compiled
Code))
	at
org.hibernate.proxy.AbstractLazyInitializer.getImplementation(AbstractLazyInitializer.java(Inlined
Compiled Code))
	at
org.hibernate.proxy.CGLIBLazyInitializer.intercept(CGLIBLazyInitializer.java(Compiled
Code))
	at
com.redhat.rhn.domain.org.OrgImpl$$EnhancerByCGLIB$$a7f782b6.isPayingCustomer(<generated>(Compiled
Code))
	at
com.redhat.rhn.manager.errata.cache.UpdateErrataCacheCommand.processServer(UpdateErrataCacheCommand.java(Compiled
Code))
	at
com.redhat.rhn.manager.errata.cache.UpdateErrataCacheCommand.updateErrataCache(UpdateErrataCacheCommand.java(Compiled
Code))
	at
com.redhat.rhn.frontend.events.UpdateErrataCacheAction.execute(UpdateErrataCacheAction.java(Compiled
Code))
	at
com.redhat.rhn.common.messaging.ActionExecutor.run(ActionExecutor.java(Compiled
Code))
	at
com.redhat.rhn.common.messaging.MessageDispatcher.run(MessageDispatcher.java(Compiled
Code))
	at java.lang.Thread.run(Thread.java:570)
Comment 1 Bret McMillan 2007-03-15 10:23:01 EDT
Seeing this fairly often in prod after rhel5ga
Comment 2 Mike Orazi 2007-03-15 18:16:54 EDT
The UpdateErrataCacheAction executes asynchronously, so it was possible for for
the org passed in to be connected to an already closed hibernate session.  

Fix checked into 501h (r113316), 500h (r113318)

Test plan: -- This is a timing issue that will be difficult to test
consistently, but the code path that will trigger it involves logging in with a
user that belongs to an org with less than 30 servers & that has entries in the
rhnOrgErrataCacheQueue table.  Log in with the same user a while later
(depending on server activity) and the ErrataCache for that org will be updated.
 Monitor the logs, or have a java dev do so to ensure that the exception doesn't
show up.  

NOTE:  Because this task happens asynchronously, there will be no feedback to
the application user.
Comment 3 Preethi Thomas 2007-03-19 12:37:24 EDT
This seem to be working well ( I did not see any exceptions in the logs.) 
but as per mike
looks ok for the piece of code I fixed, but I believe it might be happening in
other areas of the code as well.
So I am not sure if I should mark it verified yet.
Marking it need info for now.
Comment 4 Mike Orazi 2007-03-19 14:54:44 EDT
I verified that the other issue I was seeing was unrelated.  Please mark verified.
Comment 5 Preethi Thomas 2007-03-19 14:59:32 EDT
marking it verified as per the above comment.
Comment 6 Preethi Thomas 2007-03-21 15:47:08 EDT
verified on stage.

Note You need to log in before you can comment on or make changes to this bug.