[hibernate-issues] [JIRA] (HHH-13933) LazyInitializationException in ToOneIdMapper when attempting to initialize Hibernate proxy.

Janko Petrovic (JIRA) jira at hibernate.atlassian.net
Mon Apr 6 09:42:31 EDT 2020


Janko Petrovic ( https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%3Aa664960c-9189-4868-80ac-ee75c62cef31 ) *updated* an issue

Hibernate ORM ( https://hibernate.atlassian.net/browse/HHH?atlOrigin=eyJpIjoiZThkZDhmOWYyMjI0NGQ1YTljZmQ2OWQ4ZmQwYWJjODQiLCJwIjoiaiJ9 ) / Bug ( https://hibernate.atlassian.net/browse/HHH-13933?atlOrigin=eyJpIjoiZThkZDhmOWYyMjI0NGQ1YTljZmQ2OWQ4ZmQwYWJjODQiLCJwIjoiaiJ9 ) HHH-13933 ( https://hibernate.atlassian.net/browse/HHH-13933?atlOrigin=eyJpIjoiZThkZDhmOWYyMjI0NGQ1YTljZmQ2OWQ4ZmQwYWJjODQiLCJwIjoiaiJ9 ) LazyInitializationException in ToOneIdMapper when attempting to initialize Hibernate proxy. ( https://hibernate.atlassian.net/browse/HHH-13933?atlOrigin=eyJpIjoiZThkZDhmOWYyMjI0NGQ1YTljZmQ2OWQ4ZmQwYWJjODQiLCJwIjoiaiJ9 )

Change By: Janko Petrovic ( https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%3Aa664960c-9189-4868-80ac-ee75c62cef31 )

[^HHH-13933-test-case (da2214f9-fc5e-47e5-b8aa-b212f60e22b8).zip]

In ToOneIdMapper.mapToMapFromEntity() Hibernate proxy initialization is attempted using session which was originally used for loading that entity. However, by that time, that session could be closed (and reference to it could be removed from lazy initializer instance). Attached test case demonstrates such a scenario.

( https://hibernate.atlassian.net/browse/HHH-13933#add-comment?atlOrigin=eyJpIjoiZThkZDhmOWYyMjI0NGQ1YTljZmQ2OWQ4ZmQwYWJjODQiLCJwIjoiaiJ9 ) Add Comment ( https://hibernate.atlassian.net/browse/HHH-13933#add-comment?atlOrigin=eyJpIjoiZThkZDhmOWYyMjI0NGQ1YTljZmQ2OWQ4ZmQwYWJjODQiLCJwIjoiaiJ9 )

Get Jira notifications on your phone! Download the Jira Cloud app for Android ( https://play.google.com/store/apps/details?id=com.atlassian.android.jira.core&referrer=utm_source%3DNotificationLink%26utm_medium%3DEmail ) or iOS ( https://itunes.apple.com/app/apple-store/id1006972087?pt=696495&ct=EmailNotificationLink&mt=8 ) This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100124- sha1:c7667cc )
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/hibernate-issues/attachments/20200406/52191cfb/attachment.html 


More information about the hibernate-issues mailing list