Thank you for taking time to contribute this pull request! You might have already read the [contributor guide][1], but as a reminder, please make sure to:
- [x] * Sign the contributor license agreement
- [x] * Rebase your changes on the latest
main
branch and squash your commits - [x] * Add/Update unit tests as needed
- [x] * Run a build and make sure all tests pass prior to submission
Comment From: tzolov
@rahulmitt when i try to run the ITs locally ./mvnw clean install -pl vector-stores/spring-ai-hanadb-store -Pintegration-tests
it fails with:
... 33 more
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.zaxxer.hikari.HikariDataSource]: Factory method 'dataSource' threw exception with message: Failed to determine a suitable driver class
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:177)
at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:644)
... 47 more
Caused by: org.springframework.boot.autoconfigure.jdbc.DataSourceProperties$DataSourceBeanCreationException: Failed to determine a suitable driver class
at org.springframework.boot.autoconfigure.jdbc.DataSourceProperties.determineDriverClassName(DataSourceProperties.java:186)
at org.springframework.boot.autoconfigure.jdbc.PropertiesJdbcConnectionDetails.getDriverClassName(PropertiesJdbcConnectionDetails.java:49)
at org.springframework.boot.autoconfigure.jdbc.DataSourceConfiguration.createDataSource(DataSourceConfiguration.java:55)
at org.springframework.boot.autoconfigure.jdbc.DataSourceConfiguration$Hikari.dataSource(DataSourceConfiguration.java:117)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:140)
... 48 more
Comment From: tzolov
Hi @rahulmitt , thank you for the updates. I've noticed that you have not provided auto-configuration test, so i though i can add one myself. But apparently getting a test/try account for SAP HANA Cloud is not that obvious. Cloud you please update your documentation to explain where and how one can obtain SAP HANA Cloud access and how to configure its Vector Store capabilities?.
Also:
- Add an Auto-configuration integration test. You can check the other Vectors Stores for sample auto-config tests.
- run ./mvnw license:format -Plicense
to fix the license headers issues
- run ./mvnw javadoc:javadoc -pl vector-stores/spring-ai-hanadb-store -Pjavadoc
to fix the javadocs issues.
- run ./mvnw spring-javaformat:apply
to fix any code formatting issues.
Comment From: rahulmitt
Hi @tzolov - thanks for your kind reviews. Let me work on the following:
- [x] Add unit test for HanaCloudVectorStoreProperties.java
- [ ] Add IT for HanaCloudVectorStoreAutoConfiguration.java
- [x] Write documentation to provision a SAP BTP trial account and create SAP Hana Cloud instance
- [x] Run
./mvnw license:format -Plicense
to fix the license headers issues - [x] Run
./mvnw javadoc:javadoc -pl vector-stores/spring-ai-hanadb-store -Pjavadoc
to fix the javadocs issues. - [x] Run
./mvnw spring-javaformat:apply
to fix any code formatting issues.
Will update the status here.
Comment From: rahulmitt
Hi @tzolov - I attempted to write the IT for HanaCloudVectorStoreAutoConfiguration. However, it is failing with below error. So, checked in as disabled for now.
java.io.FileNotFoundException: class path resource [org/springframework/data/jdbc/repository/config/AbstractJdbcConfiguration.class] cannot be opened because it does not exist
If I add the following dependency to spring-ai-spring-boot-autoconfigure/pom.xml, the above error is resolved.
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jdbc</artifactId>
</dependency>
However, it starts complaining about:
org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'org.springframework.ai.vectorstore.HanaVectorRepository<org.springframework.ai.vectorstore.HanaVectorEntity>' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {}
I am looking for pointers on how to fix this. Do you mind taking a look pls?
Comment From: tzolov
@rahulmitt thank you for the contribution. I applied some fixes to the docs and the Autoconfiguraiton you can review (in the merged code)
Comment From: tzolov
Rebased, squashed and merged at 466b8248407d15490e3ff4d291c04e06ed3b72ed
Additional changes
- add @AutoConfiguration(after = { JpaRepositoriesAutoConfiguration.class })
- update the handa docs structure.