You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Claus Ibsen (Jira)" <ji...@apache.org> on 2021/09/03 13:11:00 UTC

[jira] [Commented] (CAMEL-16906) Platform-http components fail when using unmarshal

    [ https://issues.apache.org/jira/browse/CAMEL-16906?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17409495#comment-17409495 ] 

Claus Ibsen commented on CAMEL-16906:
-------------------------------------

Yeah sure, but it also helps if instead of using ByteBuffer as fallback in the writeResponse of platform-vertx, then use InputStream as fallback, as a lot more can be converter to this in Camel.



> Platform-http components fail when using unmarshal
> --------------------------------------------------
>
>                 Key: CAMEL-16906
>                 URL: https://issues.apache.org/jira/browse/CAMEL-16906
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-platform-http-vertx
>    Affects Versions: 3.11.1, 3.12.0
>            Reporter: Pasquale Congiusti
>            Assignee: Pasquale Congiusti
>            Priority: Major
>             Fix For: 3.11.2, 3.12.0
>
>
> When we run a route which is using platform-http component and we try to unmarshal to json (and I suspect also any other dataformat), there is a failure due to a missing conversion type.
> For example:
> {code}
>     from("platform-http:/hello?httpMethodRestrict=GET").
>       setBody(simple("{\"hello\": \"world\"}"))
>       .unmarshal().json();
> {code}
> Will fail because there is a [mandatory conversion from Map to ByteBuffer|https://github.com/apache/camel/blob/main/components/camel-platform-http-vertx/src/main/java/org/apache/camel/component/platform/http/vertx/VertxPlatformHttpSupport.java#L183] that is failing.
> {code}
> [1] 2021-08-31 13:41:58,676 ERROR [io.qua.ver.htt.run.QuarkusErrorHandler] (vert.x-eventloop-thread-1) HTTP Request to /hello failed, error id: 3ea4fdb8-931c-4d59-b8e6-376dc6a34e09-1: org.apache.camel.NoTypeConversionAvailableException: No type converter available to convert from type: java.util.LinkedHashMap to the required type: java.nio.ByteBuffer with value {hello=world}
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)