Closed jkalex-git closed 2 years ago
/cc @Sanne, @gsmet, @yrodiere
Workaround:
In application.properties
%dev.quarkus.hibernate-orm.dialect=com.blah.persistence.entity.PostgresSQL10ListDialect
New class PostgresSQL10ListDialect
package com.blah.persistence.entity.PostgresSQL10ListDialect;
import io.quarkus.hibernate.orm.runtime.dialect.QuarkusPostgreSQL10Dialect;
import java.sql.Types;
public class PostgresSQL10ListDialect extends QuarkusPostgreSQL10Dialect {
public PostgresSQL10ListDialect() {
super();
registerColumnType(Types.ARRAY, "array" );
}
}
I have tried to disable all dev services
quarkus.devservices.enabled=false
But it has no effect on the error. The 'HibernateOrmDevConsoleIntegrator' still continues to load in hibernate-core (org.hibernate.internal.SessionFactoryImpl)
If I downgrade quarkus 2.1.1.Final, it is not loaded even without quarkus.devservices.enabled=false
when you have datasource url defined
The specific exception you included in the description should disappear with #21147 .
That being said, the underlying cause is that Hibernate ORM is unable to generate your database schema when you're using custom types.
I see in your reproducer that you enabled database schema generation. Is that intentional? Are you successfully using database schema generation in Quarkus 2.1, with custom types?
Thank you for the update.
The reproducer has the same issue with Quarkus 2.1.
The production application uses Quarkus 2.1 without schema generation is working without any issues. Upgrading the Quarkus version causes the application to fail even though there is no change to any other settings.
The production application uses Quarkus 2.1 without schema generation
Alright. Then #21147 will fix this issue. The bugfix will be included in Quarkus 2.4.1. Closing.
Thank you for your feedback!
Describe the bug
The application fails to start when there is custom usertype defined in a Hibernate entity class. It uses 'hibernate-types-55' for the usertype implementation. The issue is reproducible with any org.hibernate.usertype.UserType implementations. It is not specific to hibernate-types-55 library. The test project is built on top of hibernate-orm-panache-quickstart
Expected behavior
Application starts without errors.
Actual behavior
How to Reproduce?
Run the test project https://github.com/jkalex-git/quarkus-hibernate-test
Output of
uname -a
orver
No response
Output of
java -version
openjdk version "11.0.11"
GraalVM version (if different from Java)
No response
Quarkus version or git rev
2.3.0.FINAL
Build tool (ie. output of
mvnw --version
orgradlew --version
)Apache Maven 3.6.3
Additional information
This issue is not there in the production app which is running Quarkus Ver# 2.1.1.Final. Please find below vault and datasource configuration
Issue showed up when upgraded to Quarkus Ver# 2.2.x.Final.
But the issue is reproducible in the test project even with ver#2.1.x, which make me wonder if its related to dev services related with datasources. Prior Ver#2.2.x no dev services were loading with the same configuration as above. This inference may be completely bogus.