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

quarkus-hibernate-reactive-panache: hibernate validate doesn't work #15785

Closed
edeandrea opened this issue Mar 16, 2021 · 10 comments
Closed

quarkus-hibernate-reactive-panache: hibernate validate doesn't work #15785

edeandrea opened this issue Mar 16, 2021 · 10 comments
Labels
area/hibernate-reactive Hibernate Reactive area/panache area/persistence OBSOLETE, DO NOT USE kind/bug Something isn't working triage/duplicate This issue or pull request already exists

Comments

@edeandrea
Copy link
Contributor

Describe the bug

When using the quarkus-hibernate-reactive-panache extension and setting quarkus.hibernate-orm.database.generation=validate, the application fails to start with this exception:

2021-03-16 10:47:01,740 INFO  [org.hib.rea.pro.imp.ReactiveIntegrator] (Quarkus Main Thread) HRX000001: Hibernate Reactive Preview
2021-03-16 10:47:01,844 WARN  [org.hib.eng.jdb.spi.SqlExceptionHelper] (Quarkus Main Thread) SQL Error: 0, SQLState: null
2021-03-16 10:47:01,844 ERROR [org.hib.eng.jdb.spi.SqlExceptionHelper] (Quarkus Main Thread) Not using JDBC
2021-03-16 10:47:02,425 ERROR [io.qua.run.Application] (Quarkus Main Thread) Failed to start application (with profile dev): java.sql.SQLException: Not using JDBC
        at org.hibernate.reactive.provider.service.NoJdbcConnectionProvider.getConnection(NoJdbcConnectionProvider.java:25)
        at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator$ConnectionProviderJdbcConnectionAccess.obtainConnection(JdbcEnvironmentInitiator.java:180)
        at org.hibernate.resource.transaction.backend.jdbc.internal.DdlTransactionIsolatorNonJtaImpl.getIsolatedConnection(DdlTransactionIsolatorNonJtaImpl.java:43)

If I change quarkus.hibernate-orm.database.generation=drop-and-create then everything works as expected.

@edeandrea edeandrea added the kind/bug Something isn't working label Mar 16, 2021
@quarkus-bot quarkus-bot bot added area/hibernate-reactive Hibernate Reactive area/panache area/persistence OBSOLETE, DO NOT USE labels Mar 16, 2021
@quarkus-bot
Copy link

quarkus-bot bot commented Mar 16, 2021

@gavinking
Copy link

Hi, this is a limitation listed in the README. We're working on it.

@edeandrea
Copy link
Contributor Author

Which README? For the extension? I also noticed there isn't a guide available for the quarkus-hibernate-reactive-panache extension.

@DavideD
Copy link
Contributor

DavideD commented Mar 16, 2021

The Hibernate Reactive README.md

@DavideD
Copy link
Contributor

DavideD commented Mar 16, 2021

I also noticed there isn't a guide available for the quarkus-hibernate-reactive-panache extension.

It's still an experimental feature but you can find some examples in the quickstart: https://github.com/quarkusio/quarkus-quickstarts/tree/development/hibernate-reactive-quickstart

@DavideD
Copy link
Contributor

DavideD commented Mar 16, 2021

Sorry, it was the wrong quickstart. This is the one for quarkus-hibernate-reactive-panache: https://github.com/quarkusio/quarkus-quickstarts/tree/development/hibernate-reactive-panache-quickstart

@gavinking
Copy link

This issue is a dupe of #10665. Can we just close it?

@edeandrea
Copy link
Contributor Author

#10665 seems related to this one but not the same use case, although from an implementation standpoint it might be more related?

Essentially what's missing is the ability to validate the schema matches what the application "thinks" the schema should be.

@gavinking
Copy link

though from an implementation standpoint it might be more related?

From an implementation standpoint I have no idea how I could make schema validation work without also making schema update work by side-effect :-)

All we need to do is make a "mock" JDBC metadata API based on the reactive driver.

@edeandrea
Copy link
Contributor Author

That works for me.

@gsmet gsmet closed this as completed Apr 1, 2021
@gsmet gsmet added the triage/duplicate This issue or pull request already exists label Apr 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/hibernate-reactive Hibernate Reactive area/panache area/persistence OBSOLETE, DO NOT USE kind/bug Something isn't working triage/duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

4 participants