Skip to content

Reactive find with lock in Quarkus with reactive hibernate #1896

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

Closed
alexjaravete opened this issue Apr 25, 2024 · 4 comments
Closed

Reactive find with lock in Quarkus with reactive hibernate #1896

alexjaravete opened this issue Apr 25, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@alexjaravete
Copy link

Hi, when using Quarkus with reactive hibernate and trying to run this findById(id, LockModeType.PESSIMISTIC_WRITE), I get following Error: JPA error: java.lang.UnsupportedOperationException

The error seems to be coming from here:

@Override
public void onLock(LockEvent event) throws HibernateException {
throw new UnsupportedOperationException();
}

Is this intended, or is the implementation not finished? I can see that the last time this was edited was 4 years ago.

@DavideD
Copy link
Member

DavideD commented Apr 26, 2024

It seems like a bug. We shouldn't call this method. We should call .reactiveOnLock.

@DavideD DavideD added the bug Something isn't working label Apr 26, 2024
@DavideD
Copy link
Member

DavideD commented Apr 29, 2024

I've tried to change one of the quarkus quickstarts to see the error, but I couldn't recreate it.
Could you provide a reproducer, please?
Or, at least, you could tell what's different from your use case.

The changes are here: https://github.com/DavideD/quarkus-quickstarts/tree/findById/hibernate-reactive-panache-quickstart

@alexjaravete
Copy link
Author

I tried your quickstart example and the error does not show up.
The difference is that we are using Kotlin.
But even after rewriting everything to Kotlin, the error still does not show up.
Now I am trying to find out what the difference between our set-up and the quickstart project is.

I will let you know if I can reproduce it in the quickstart project.

@DavideD
Copy link
Member

DavideD commented Apr 30, 2024

Thanks.

I'm going to close this issue for now. Feel free to reopen it or comment here when you have a test case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants