Open culebras opened 1 year ago
That's wrong assumption. Better to check docs before going into the woods: https://docs.spring.io/spring-integration/reference/html/jdbc.html#supported-databases.
Hibernate and Hikari has nothing to do with this LockRepository
implementation.
I'd suggest you to back off Spring Boot database auto-creation and provide respective DB tables yourself.
You can borrow an SQL script from existing DB support: https://github.com/spring-projects/spring-integration/tree/main/spring-integration-jdbc/src/main/resources/org/springframework/integration/jdbc
With this ticket we probably can take a look into including a support for this DB. Just need to understand how popular it is and if it has an open source JDBC driver.
Hello, you are right, there is no support for SAP HANA DB at the moment, I did not check the docs properly.
Actually, in my app, the int_lock
table was already provided (as I have no permission to create tables from within the app), but I guess it will still fail as the other tables are somehow required. I am just interested in the LockRepository
part of spring-integration-jdbc
, but I imagine the support for the HANA DB has to be integrated fully in spring-integration-jdbc
.
I noticed that SAP HANA DB support was recently added to spring-batch
project here: https://github.com/spring-projects/spring-batch/issues/1087, so I guess that is a good point to consider this DB as a popular candidate.
I would be happy to help in this integration. How exactly could I help?
If you don't use any other Spring Integration JDBC features, you don't need other tables, just that INT_LOCK
.
For contributing such a support back to the framework, please, look first into general Contribution Guideline: https://github.com/spring-projects/spring-integration/blob/main/CONTRIBUTING.adoc.
Then you need to open pull request against this issue and add something like schema-hana.sql
, schema-drop-hana.sql
alongside with existing schema-h2.sql
, schema-mysql.sql
etc.
Next you go to org.springframework.integration.jdbc.store.channel
package and implement an AbstractChannelMessageStoreQueryProvider
for HANA.
Another way might be a simple remapping fix in Spring Boot, if HANA is fully compatible with existing DB schema. For example we have over there a mapping like this:
platformResolver.withDriverPlatform(DatabaseDriver.MARIADB, "mysql")
We definitely need to know what is a databaseMetaData.getDatabaseProductName()
for this DB to be able to map it properly in Spring Boot in the end for IntegrationDataSourceScriptDatabaseInitializer
...
In what version(s) of Spring Integration are you seeing this issue?
5.5.14
Describe the bug
Unable to start my spring-boot service when using
spring-integration-jdbc
andHANA DB
. It looks like that it is not possible to determinate the database type when I am injecting mydatasource
(which usesHANA DB
) to theorg.springframework.integration.jdbc.lock.LockRepository
. This exception is raised:I am using Hikari datasource, Hibernate and
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.HANAColumnStoreDialect
.Expected behavior
I would expect that
spring-integration-jdbc
is compatible with HANA DB, but I might have wrongly assumed this. Doesspring-integration-jdbc
supportsHANA DB
? In that case this bug issue could be flagged rather as a feature request.