Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

java.lang.IllegalStateException: Illegal pop() with non-matching JdbcValuesSourceProcessingState #2050

Open
coder-github578 opened this issue Dec 19, 2024 · 1 comment

Comments

@coder-github578
Copy link

Below is the code for inserting the records

Uni txnInstance = sessionFactory.withTransaction((session, transaction) -> session.persist(eventEntity));
txnInstance.onFailure(this::logError)
.recoverWithNull()
.subscribe()
.with(this::logAction);

return Mono.just(exceptionEvent);

The records for insertion are coming from kafka streams and we have to first check whether record exists, If not then do insert. However sometimes we get the below error
java.lang.IllegalStateException: Illegal pop() with non-matching JdbcValuesSourceProcessingState

We also tried session.merge but that also resulted in the same error.

Any kind of guidance would be appreciated

@DavideD
Copy link
Member

DavideD commented Dec 20, 2024

This error usually happens when the same session is accessed in parallel.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants