Open ThomasVitale opened 5 months ago
Given the tricky landscape you describe, this is low in our priority list given major functional areas we want to reach in a 1.0 release.
That's fair. I created this separate issue so not to block the work in https://github.com/spring-projects/spring-ai/issues/325 for other vector stores that won't be affected by this problem.
@ThomasVitale - thanks for raising this issue. I faced this issue when I was trying to build a native image of an application using Spring AI and Qdrant. Did you manage to find a workaround to bypass the issue and successfully compile a native image?
The work on native compilation support for the vector stores in Spring AI is tracked in https://github.com/spring-projects/spring-ai/issues/325.
I have created a dedicated issue for Qdrant and Weaviate since the API classes are not defined in this project, requiring a different solution than the rest of the integrations. Instead, the Weaviate And Qdrant Java Client libraries are used. Those libraries depend on the
grpc-java
project (https://github.com/grpc/grpc-java), which doesn't support native compilation due to a shaded Netty dependency. It's a common problem affecting several Java libraries. Most recently, I encountered the same problem when using the Dapr Java SDK.An issue was filed in the grpc-java project about this, but eventually closed as not planned: https://github.com/grpc/grpc-java/issues/10601. It would be nice to find a general solution either in the Oracle Reachability Metadata or in the Netty project (see https://github.com/netty/netty/pull/12601), solving the problem for many Java libraries rather than fixing it multiple times across the different libraries.
In the absence of a more general solution, a viable option could be what they did in the Microcks project, providing all the missing configuration explicitly: https://github.com/microcks/microcks/issues/1054.