You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Omar Atie (Jira)" <ji...@apache.org> on 2026/07/21 16:01:00 UTC

[jira] [Assigned] (CAMEL-23949) camel-langchain4j-embeddingstore: ADD without embedding header calls EmbeddingStore.add(null) instead of failing

     [ https://issues.apache.org/jira/browse/CAMEL-23949?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Omar Atie reassigned CAMEL-23949:
---------------------------------

    Assignee: Omar Atie

> camel-langchain4j-embeddingstore: ADD without embedding header calls EmbeddingStore.add(null) instead of failing
> ----------------------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-23949
>                 URL: https://issues.apache.org/jira/browse/CAMEL-23949
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-langchain4j-embeddings
>    Affects Versions: 4.21.0
>            Reporter: Federico Mariani
>            Assignee: Omar Atie
>            Priority: Major
>             Fix For: 4.22.0
>
>         Attachments: LangChain4jEmbeddingStoreMissingEmbeddingHeaderTest.java
>
>
> The ADD action in {{LangChain4jEmbeddingStoreProducer.add()}} (lines 129-148) does not validate that the {{CamelLangChain4jEmbeddingsEmbedding}} header is present. When the header is missing, the producer calls {{EmbeddingStore.add(null)}} — the store receives a null embedding and the exchange completes without any error, unlike the missing-action case which is properly rejected with {{NoSuchHeaderException}}.
> Depending on the store implementation this either throws a store-specific NPE later or silently persists garbage.
> Attached reproducer {{LangChain4jEmbeddingStoreMissingEmbeddingHeaderTest}} uses a recording stub store: it receives {{add(null)}} and the exchange carries no exception.
> *Fix*: fail fast with a meaningful validation error when the embedding header is absent (same pattern as the action validation).
> _This issue was drafted by Claude Code on behalf of Federico Mariani._



--
This message was sent by Atlassian Jira
(v8.20.10#820010)