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

Claus Ibsen updated CAMEL-25751:
--------------------------------
    Description: 
A body that is a Map or a List (unmarshalled from JSON, or built as a map) 
fails when it is the reply of a platform-http route, and when the file producer 
writes it, and the message names only the conversion:

{noformat}
NoTypeConversionAvailableException: No type converter available to convert from 
type: java.util.LinkedHashMap to the required type: java.io.InputStream
{noformat}

CAMEL-25309 gave the http producer a sentence for the same case ("a Map is not 
an HTTP request body: marshal it to JSON first (marshal: json) or set the body 
to the JSON text"). The reply and the file write should say the same:

* camel-platform-http-vertx: 
{{VertxPlatformHttpSupport.writeResponseAsFallback}} - a Map is not an HTTP 
response body: marshal it to JSON first (marshal: json) as the last step of the 
route, or let the REST binding write it (bindingMode: json).
* camel-file: {{FileOperations.storeFile}} - a Map is not file content: marshal 
it first (marshal: json), or set the body to the text.

Found in the r17 series of the local-model benchmark (2026-10-17/18): 5 of the 
20 runs that hit a body type collision failed at these two places (3 
platform-http replies, 2 file writes), and all 5 failed the step. The validator 
reports the static cases (CAMEL-24844, PR 28047); this is the runtime side, 
which CAMEL-25749 later moves onto the shared helper.

_Filed by Claude Code on behalf of davsclaus_

  was:
A body that is a Map or a List (unmarshalled from JSON, or built as a map) 
fails when it is the reply of a platform-http route, and when the file producer 
writes it, and the message names only the conversion:

{noformat}
NoTypeConversionAvailableException: No type converter available to convert from 
type: java.util.LinkedHashMap to the required type: java.io.InputStream
{noformat}

CAMEL-25309 gave the http producer a sentence for the same case ("a Map is not 
an HTTP request body: marshal it to JSON first (marshal: json) or set the body 
to the JSON text"). The reply and the file write should say the same:

* camel-platform-http-vertx: 
{{VertxPlatformHttpSupport.writeResponseAsFallback}} - a Map is not an HTTP 
response body: marshal it to JSON first (marshal: json) as the last step of the 
route, or let the REST binding write it (bindingMode: json).
* camel-file: {{FileOperations.storeFile}} - a Map is not file content: marshal 
it first (marshal: json), or set the body to the text.

Found in the r17 series of the local-model benchmark (2026-10-17/18): 5 of the 
17 runs that hit a body type collision failed at these two places (3 
platform-http replies, 2 file writes), and all 5 failed the step. The validator 
reports the static cases (CAMEL-24844, PR 28047); this is the runtime side, 
which CAMEL-25749 later moves onto the shared helper.

_Filed by Claude Code on behalf of davsclaus_


> camel-platform-http-vertx, camel-file - a Map or List body says to marshal it 
> first when it is the HTTP reply or written to a file
> ----------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-25751
>                 URL: https://issues.apache.org/jira/browse/CAMEL-25751
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-file, camel-platform-http-vertx
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>            Priority: Major
>             Fix For: 4.24.0
>
>
> A body that is a Map or a List (unmarshalled from JSON, or built as a map) 
> fails when it is the reply of a platform-http route, and when the file 
> producer writes it, and the message names only the conversion:
> {noformat}
> NoTypeConversionAvailableException: No type converter available to convert 
> from type: java.util.LinkedHashMap to the required type: java.io.InputStream
> {noformat}
> CAMEL-25309 gave the http producer a sentence for the same case ("a Map is 
> not an HTTP request body: marshal it to JSON first (marshal: json) or set the 
> body to the JSON text"). The reply and the file write should say the same:
> * camel-platform-http-vertx: 
> {{VertxPlatformHttpSupport.writeResponseAsFallback}} - a Map is not an HTTP 
> response body: marshal it to JSON first (marshal: json) as the last step of 
> the route, or let the REST binding write it (bindingMode: json).
> * camel-file: {{FileOperations.storeFile}} - a Map is not file content: 
> marshal it first (marshal: json), or set the body to the text.
> Found in the r17 series of the local-model benchmark (2026-10-17/18): 5 of 
> the 20 runs that hit a body type collision failed at these two places (3 
> platform-http replies, 2 file writes), and all 5 failed the step. The 
> validator reports the static cases (CAMEL-24844, PR 28047); this is the 
> runtime side, which CAMEL-25749 later moves onto the shared helper.
> _Filed by Claude Code on behalf of davsclaus_



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

Reply via email to