jamesnetherton opened a new issue, #9025: URL: https://github.com/apache/camel-quarkus/issues/9025
`camel-langchain4j-agent` still references `dev.langchain4j.mcp.client.transport.http.HttpMcpTransport` for the deprecated `sse` MCP transport type. That class was removed in LangChain4j `1.19.0`, which Camel Quarkus picked up when aligning with Quarkus LangChain4j `1.13.0`. Because Quarkus passes a bare `--link-at-build-time`, the unresolvable type fails native image analysis of `LangChain4jMcpServerDefinition.buildTransport`: ``` Error: Discovered unresolved type during parsing: dev.langchain4j.mcp.client.transport.http.HttpMcpTransport$Builder. This error is reported at image build time because class org.apache.camel.component.langchain4j.agent.LangChain4jMcpServerDefinition is registered for linking at image build time by command line and command line. Error encountered while parsing org.apache.camel.component.langchain4j.agent.LangChain4jMcpServerDefinition.buildClient(LangChain4jMcpServerDefinition.java:208) ``` As a workaround, `LangChain4jMcpServerDefinitionSubstitutions` in `camel-quarkus-support-langchain4j` substitutes `buildTransport` to drop the `sse` branch. The substitution duplicates the upstream method body for the remaining transports, so it will drift if Camel changes that code. Note that in JVM mode the `sse` transport type fails with `NoClassDefFoundError`, since the substitution applies to native mode only. Once Camel drops its usage of `HttpMcpTransport`, the following can be removed: * `extensions-support/langchain4j/runtime/src/main/java/org/apache/camel/quarkus/component/support/langchain4j/graal/LangChain4jMcpServerDefinitionSubstitutions.java` * The `org.graalvm.sdk:nativeimage` dependency in `extensions-support/langchain4j/runtime/pom.xml`, if nothing else needs it * `extensions/langchain4j-agent/runtime/src/main/doc/limitations.adoc` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
