1

for days now I've been trying to get a simple H2 / R2dbc database running in Spring boot with WebFlux. The app starts up just fine but when I call the /todos endpoint to get all the objects in the database I get the following error:

reactor.core.Exceptions$ErrorCallbackNotImplemented: org.springframework.data.r2dbc.BadSqlGrammarException: executeMany; bad SQL grammar [SELECT TODO.* FROM TODO]; nested exception is io.r2dbc.spi.R2dbcBadGrammarException: [42102] [42S02] Table "TODO" not found; SQL statement:
SELECT TODO.* FROM TODO [42102-200]

My understanding is that if I add a schema.sql file on the class path with a create table command it will use that to create the table on startup, but it does not look like that is working. Any ideas on what I may be doing wrong? Any help would be appreciated, what would like to get to is a working mysql/r2dbc example, if someone could point me to one.

All the code is located at: https://gitlab.com/vanfleet/test-r2dbc-h2

David V
  • 161
  • 3
  • 13
  • Can you check the H2 database by enabling its end point from the Application.properties (remove the comment out from your file) and see if the table is getting created or not. Thus you specify your problem further more. – Jalil.Jarjanazy Mar 18 '20 at 07:46

1 Answers1

-2

It is query issue. Run same query in editor.