You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Bob Paulin (Jira)" <ji...@apache.org> on 2021/01/29 14:35:00 UTC
[jira] [Created] (CAMEL-16114) DataFormat UnmarshalType defined as
an Array Class Fails
Bob Paulin created CAMEL-16114:
----------------------------------
Summary: DataFormat UnmarshalType defined as an Array Class Fails
Key: CAMEL-16114
URL: https://issues.apache.org/jira/browse/CAMEL-16114
Project: Camel
Issue Type: Bug
Components: camel-jackson
Affects Versions: 3.7.1
Environment: Camel 3.7.1
Apache Karaf 4.2.10
Reporter: Bob Paulin
On camel 2.x and early versions of 3.x you could specify an unmarshal type that is an array
EX
{code:java}
from("direct:beginArray").unmarshal().json(JsonLibrary.Jackson, String[].class).to("mock:endArray");
{code}
I've upgraded to Camel 3.7.1 and this now throws an exception
{code:java}
java.lang.IllegalArgumentException: Unrecognized Type: [null]
at com.fasterxml.jackson.databind.type.TypeFactory._fromAny(TypeFactory.java:1263)
at com.fasterxml.jackson.databind.type.TypeFactory.constructType(TypeFactory.java:657)
at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:3242)
at org.apache.camel.component.jackson.JacksonDataFormat.unmarshal(JacksonDataFormat.java:183)
at org.apache.camel.support.processor.UnmarshalProcessor.process(UnmarshalProcessor.java:64)
at org.apache.camel.processor.errorhandler.RedeliveryErrorHandler$SimpleTask.run(RedeliveryErrorHandler.java:395)
at org.apache.camel.impl.engine.DefaultReactiveExecutor$Worker.schedule(DefaultReactiveExecutor.java:148)
at org.apache.camel.impl.engine.DefaultReactiveExecutor.scheduleMain(DefaultReactiveExecutor.java:60)
at org.apache.camel.processor.Pipeline.process(Pipeline.java:147)
at org.apache.camel.impl.engine.CamelInternalProcessor.process(CamelInternalProcessor.java:312)
at org.apache.camel.component.netty.handlers.ServerChannelHandler.processAsynchronously(ServerChannelHandler.java:142)
at org.apache.camel.component.netty.handlers.ServerChannelHandler.channelRead0(ServerChannelHandler.java:113)
at org.apache.camel.component.netty.http.handlers.HttpServerChannelHandler.channelRead0(HttpServerChannelHandler.java:221)
at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:99)
at org.apache.camel.component.netty.http.handlers.HttpServerMultiplexChannelHandler.channelRead0(HttpServerMultiplexChannelHandler.java:162)
at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:99)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:377)
at io.netty.channel.AbstractChannelHandlerContext.access$600(AbstractChannelHandlerContext.java:59)
at io.netty.channel.AbstractChannelHandlerContext$7.run(AbstractChannelHandlerContext.java:368)
at io.netty.util.concurrent.DefaultEventExecutor.run(DefaultEventExecutor.java:66)
at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989)
at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
at java.lang.Thread.run(Thread.java:748) {code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)