Bug 232425 - org.hibernate.LazyInitializationException in Hosted
Summary: org.hibernate.LazyInitializationException in Hosted
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Network
Classification: Retired
Component: RHN/Web Site
Version: rhn500
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Mike Orazi
QA Contact: Preethi Thomas
URL:
Whiteboard:
Depends On:
Blocks: rhn500h-hotfix
TreeView+ depends on / blocked
 
Reported: 2007-03-15 14:20 UTC by Bret McMillan
Modified: 2007-03-27 13:17 UTC (History)
1 user (show)

Fixed In Version: 5.0.0
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2007-03-27 13:17:27 UTC
Embargoed:


Attachments (Terms of Use)

Description Bret McMillan 2007-03-15 14:20:48 UTC
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 14:23:01 UTC
Seeing this fairly often in prod after rhel5ga

Comment 2 Mike Orazi 2007-03-15 22:16:54 UTC
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 16:37:24 UTC
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 18:54:44 UTC
I verified that the other issue I was seeing was unrelated.  Please mark verified.

Comment 5 Preethi Thomas 2007-03-19 18:59:32 UTC
marking it verified as per the above comment.

Comment 6 Preethi Thomas 2007-03-21 19:47:08 UTC
verified on stage.


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