spring-projects / spring-projects/spring-integration

(Feature request) when using spring-integration-jdbc and HANA DB

Open
#4,009 3 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

in: jdbc type: enhancement
Dominant language
Java
Stars
1.6k
Forks
1.2k
Avg merge
17h 48m
Merged PRs (30d)
62

Description

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 and HANA DB. It looks like that it is not possible to determinate the database type when I am injecting my datasource (which uses HANA DB) to the org.springframework.integration.jdbc.lock.LockRepository. This exception is raised:

2023-02-06 14:13:28,361 WARN  [restartedMain] - [org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext] [] - Exception encountered during context initialization - cancelling refresh attempt:
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'integrationDataSourceInitializer' defined in class path resource [org/springframework/boot/autoconfigure/integration/IntegrationAutoConfiguration$IntegrationJdbcConfiguration.class]:
Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException:
Failed to instantiate [org.springframework.boot.autoconfigure.integration.IntegrationDataSourceScriptDatabaseInitializer]: Factory method 'integrationDataSourceInitializer' threw exception; nested exception is java.lang.IllegalStateException: Unable to detect database type

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. Does spring-integration-jdbc supports HANA DB? In that case this bug issue could be flagged rather as a feature request.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing database-type detection from IntegrationDataSourceScriptDatabaseInitializer in Spring Boot's IntegrationAutoConfiguration to the spring-integration-jdbc LockRepository. Review the HANA datasource and HANAColumnStoreDialect details described in the report. Done means a HANA-backed datasource can start the integration JDBC configuration without the Unable to detect database type exception.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, spring
Domain
databases
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.