Prashant Guleria (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%...
) *commented* on HHH-16903 (
https://hibernate.atlassian.net/browse/HHH-16903?atlOrigin=eyJpIjoiYWE4ZG...
)
Re: java.lang.IllegalStateException: Illegal pop() with non-matching
JdbcValuesSourceProcessingState (
https://hibernate.atlassian.net/browse/HHH-16903?atlOrigin=eyJpIjoiYWE4ZG...
)
In class
org.hibernate.collection.spi. AbstractPersistentCollection<E> implements
Serializable PersistentCollection<E> the method
prepareForPossibleLoadingOutsideTransaction is called from unsetSession like following
from class {{ org.hibernate.engine.internal}}. StatefulPersistenceContext :
final SharedSessionContractImplementor session = getSession();
if ( collectionEntries != null ) {
IdentityMap.onEachKey( collectionEntries, k -> k.unsetSession( session ) );
}
(
https://hibernate.atlassian.net/rest/api/3/attachment/content/50493 )
If you see in the screenshot, the {{currentSession}}holds a session object but
this.session is null, which causes {{allowLoadOutsideTransaction}}to be set as false and
throws exception later in {{prepareForPossibleLoadingOutsideTransaction}}becuase both
sessiion and tempsession are null.
I think currentsession variable should be passed to
prepareForPossibleLoadingOutsideTransaction }}to check if a transaction is allowed outside
transaction or not. {{allowLoadOutsideTransaction =
session.getFactory().getSessionFactoryOptions().isInitializeLazyStateOutsideTransactionsEnabled();
(
https://hibernate.atlassian.net/browse/HHH-16903#add-comment?atlOrigin=ey...
) Add Comment (
https://hibernate.atlassian.net/browse/HHH-16903#add-comment?atlOrigin=ey...
)
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....
) or iOS (
https://itunes.apple.com/app/apple-store/id1006972087?pt=696495&ct=Em...
) This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100230- sha1:acc9c6f )