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

Micronaut Data r2dbc PorstgreSQL aways thows relation does not exist in select operations #109

Open
henriquelsmti opened this issue Apr 19, 2021 · 1 comment

Comments

@henriquelsmti
Copy link

henriquelsmti commented Apr 19, 2021

I created a simple user CRUD using Micronaut Data and PorstgreSQL r2dbc, but in every select operations I have this error:

09:49:29.044 [reactor-tcp-epoll-1] DEBUG io.micronaut.data.query - Executing Query: SELECT user_data_.id,user_data_.username,user_data_.password,user_data_.name,user_data_.role,user_data_.active FROM user_data user_data_ WHERE (user_data_.id = $1)
09:49:29.049 [reactor-tcp-epoll-1] TRACE io.micronaut.data.query - Binding parameter at position 0 to value 01b2d119-afe2-09:49:29.072 [reactor-tcp-epoll-1] WARN i.r.p.client.ReactorNettyClient - Error: SEVERITY_LOCALIZED=ERROR, SEVERITY_NON_LOCALIZED=ERROR, CODE=42P01, MESSAGE=relation "user_data" does not exist, POSITION=117, FILE=parse_relation.c, LINE=1376, ROUTINE=parserOpenTable
09:49:29.090 [reactor-tcp-epoll-1] ERROR i.m.h.s.netty.RoutingInBoundHandler - Unexpected error occurred: relation "user_data" does not exist
io.r2dbc.postgresql.ExceptionFactory$PostgresqlBadGrammarException: relation "user_data" does not exist
at io.r2dbc.postgresql.ExceptionFactory.createException(ExceptionFactory.java:86)
at io.r2dbc.postgresql.ExceptionFactory.handleErrorResponse(ExceptionFactory.java:111)
at reactor.core.publisher.FluxHandleFuseable$HandleFuseableSubscriber.onNext(FluxHandleFuseable.java:169)
at reactor.core.publisher.FluxFilterFuseable$FilterFuseableConditionalSubscriber.onNext(FluxFilterFuseable.java:337)
at reactor.core.publisher.FluxContextWrite$ContextWriteSubscriber.onNext(FluxContextWrite.java:107)
at reactor.core.publisher.FluxPeekFuseable$PeekConditionalSubscriber.onNext(FluxPeekFuseable.java:854)
at io.r2dbc.postgresql.util.FluxDiscardOnCancel$FluxDiscardOnCancelSubscriber.onNext(FluxDiscardOnCancel.java:86)
at reactor.core.publisher.FluxCreate$BufferAsyncSink.drain(FluxCreate.java:793)
at reactor.core.publisher.FluxCreate$BufferAsyncSink.next(FluxCreate.java:718)
at reactor.core.publisher.FluxCreate$SerializedFluxSink.next(FluxCreate.java:154)
at io.r2dbc.postgresql.client.ReactorNettyClient$Conversation.emit(ReactorNettyClient.java:735)
at io.r2dbc.postgresql.client.ReactorNettyClient$BackendMessageSubscriber.emit(ReactorNettyClient.java:986)
at io.r2dbc.postgresql.client.ReactorNettyClient$BackendMessageSubscriber.onNext(ReactorNettyClient.java:860)
at io.r2dbc.postgresql.client.ReactorNettyClient$BackendMessageSubscriber.onNext(ReactorNettyClient.java:767)
at reactor.core.publisher.FluxHandle$HandleSubscriber.onNext(FluxHandle.java:118)
at reactor.core.publisher.FluxPeekFuseable$PeekConditionalSubscriber.onNext(FluxPeekFuseable.java:854)
at reactor.core.publisher.FluxMap$MapConditionalSubscriber.onNext(FluxMap.java:220)
at reactor.core.publisher.FluxMap$MapConditionalSubscriber.onNext(FluxMap.java:220)
at reactor.netty.channel.FluxReceive.drainReceiver(FluxReceive.java:267)
at reactor.netty.channel.FluxReceive.onInboundNext(FluxReceive.java:377)
at reactor.netty.channel.ChannelOperations.onInboundNext(ChannelOperations.java:381)
at reactor.netty.channel.ChannelOperationsHandler.channelRead(ChannelOperationsHandler.java:94)

Insert into work well.

To simulate, execute UserDataControllerIntegrationSpec.
https://github.com/henriquelsmti/kafka-utils branch KU-8

Edit:
I changed to MySql and work well.

@fragaLY
Copy link

fragaLY commented Feb 15, 2023

@henriquelsmti ,

I suggest you to define your entities like that:
@MappedEntity(value = "TABLE_NAME", schema = "SCHEMA_NAME")

The sample: https://github.com/fragaLY/performance-researches/tree/master/micronaut-reactive

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