[hibernate-issues] [JIRA] (HHH-14074) Cannot deserialize proxy in other JVM with lazy_load_no_trans

Alex CD (JIRA) jira at hibernate.atlassian.net
Wed Jun 17 19:04:34 EDT 2020


Alex CD ( https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%3A9b0f6d49-bc76-4aca-875b-c8525b2f039d ) *created* an issue

Hibernate ORM ( https://hibernate.atlassian.net/browse/HHH?atlOrigin=eyJpIjoiZGIxOGY3ZTI0Zjk2NGM1YWE4MzMwZGJkMjEyZWJjNDkiLCJwIjoiaiJ9 ) / Bug ( https://hibernate.atlassian.net/browse/HHH-14074?atlOrigin=eyJpIjoiZGIxOGY3ZTI0Zjk2NGM1YWE4MzMwZGJkMjEyZWJjNDkiLCJwIjoiaiJ9 ) HHH-14074 ( https://hibernate.atlassian.net/browse/HHH-14074?atlOrigin=eyJpIjoiZGIxOGY3ZTI0Zjk2NGM1YWE4MzMwZGJkMjEyZWJjNDkiLCJwIjoiaiJ9 ) Cannot deserialize proxy in other JVM with lazy_load_no_trans ( https://hibernate.atlassian.net/browse/HHH-14074?atlOrigin=eyJpIjoiZGIxOGY3ZTI0Zjk2NGM1YWE4MzMwZGJkMjEyZWJjNDkiLCJwIjoiaiJ9 )

Issue Type: Bug Affects Versions: 5.4.17 Assignee: Unassigned Created: 17/Jun/2020 16:04 PM Priority: Major Reporter: Alex CD ( https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%3A9b0f6d49-bc76-4aca-875b-c8525b2f039d )

Using *hibernate.enable_lazy_load_no_trans=true* to enable lazy loading without an active transaction.
Serializing a proxy, stores the session factory uuid to be used upon deserialization to get the session factory:

SessionFactoryImplementor sf = (SessionFactoryImplementor)
	SessionFactoryRegistry.INSTANCE.getSessionFactory( sessionFactoryUuid );

If I try to deserialize the proxy in a different JVM (e.g. after restart), the session factory uuid will be different and deserialization will fail with NullPointerException because no session factory is found with old uuid.

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

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#100129- sha1:3ed9692 )
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/hibernate-issues/attachments/20200617/4f806f45/attachment.html 


More information about the hibernate-issues mailing list