Skip to content

Reactive repository using micronaut and project reactor #1668

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
fstolar-vendavo opened this issue Jun 12, 2023 · 3 comments · Fixed by #1674
Closed

Reactive repository using micronaut and project reactor #1668

fstolar-vendavo opened this issue Jun 12, 2023 · 3 comments · Fixed by #1674
Assignees
Milestone

Comments

@fstolar-vendavo
Copy link

In Micronaut project we tried to use https://guides.micronaut.io/latest/micronaut-data-hibernate-reactive-gradle-kotlin.html
Everything seems to be fine until we test modifying operations like save or update.
Then we end up which this exception:
image

I found that the method which was called onFlush is not implemented, thus throwing UnsupportedOperationException exception.
Is there any work I can do to help implement/solve that issue?

https://github.com/hibernate/hibernate-reactive/blame/c1d51e6d89d85dffa4fedc510e3b03d57b36c5cd/hibernate-reactive-core/src/main/java/org/hibernate/reactive/event/impl/DefaultReactiveFlushEventListener.java#L62

@DavideD DavideD self-assigned this Jun 16, 2023
@DavideD
Copy link
Member

DavideD commented Jun 16, 2023

That method should never gets called. I'm having a look

@DavideD
Copy link
Member

DavideD commented Jun 16, 2023

Ah, I think this is the wrong repository.

This is org.hibernate.reactive:hibernate-reactive-core, but micronaut needs io.micronaut.data:micronaut-data-hibernate-reactive.

@DavideD DavideD closed this as completed Jun 16, 2023
@DavideD
Copy link
Member

DavideD commented Jun 16, 2023

There is probably something wrong with the dependencies in your project

It's probably micronaut that's doing something wrong. You should create an issue on their issue tracker.

DavideD added a commit to DavideD/hibernate-reactive that referenced this issue Jun 16, 2023
onFlush is not reactive, reactiveOnFlush should be called instead.

For this situations, with have a custom exception in the Logger:
```
throw LOG.nonReactiveMethodCall( "reactiveOnFlush" );
```
DavideD added a commit that referenced this issue Jun 16, 2023
onFlush is not reactive, reactiveOnFlush should be called instead.

For this situations, with have a custom exception in the Logger:
```
throw LOG.nonReactiveMethodCall( "reactiveOnFlush" );
```
@DavideD DavideD added this to the 2.0.2.Final milestone Jun 30, 2023
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

Successfully merging a pull request may close this issue.

2 participants