Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 8AA5C200BAA for ; Thu, 13 Oct 2016 07:50:22 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 8966B160AF5; Thu, 13 Oct 2016 05:50:22 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id CBD0F160ACA for ; Thu, 13 Oct 2016 07:50:21 +0200 (CEST) Received: (qmail 6593 invoked by uid 500); 13 Oct 2016 05:50:21 -0000 Mailing-List: contact issues-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@camel.apache.org Delivered-To: mailing list issues@camel.apache.org Received: (qmail 6580 invoked by uid 99); 13 Oct 2016 05:50:20 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 13 Oct 2016 05:50:20 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id B9DCD2C4C70 for ; Thu, 13 Oct 2016 05:50:20 +0000 (UTC) Date: Thu, 13 Oct 2016 05:50:20 +0000 (UTC) From: "ASF GitHub Bot (JIRA)" To: issues@camel.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CAMEL-10385) simple ognl expression issue w/ list & spring boot MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Thu, 13 Oct 2016 05:50:22 -0000 [ https://issues.apache.org/jira/browse/CAMEL-10385?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15570944#comment-15570944 ] ASF GitHub Bot commented on CAMEL-10385: ---------------------------------------- GitHub user dmitriyC300 opened a pull request: https://github.com/apache/camel/pull/1209 CAMEL-10385: springtypeconverter return null on list -> map You can merge this pull request into a Git repository by running: $ git pull https://github.com/dmitriyC300/camel CAMEL-10385 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/camel/pull/1209.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #1209 ---- commit de208e8c9d8a60e8c2738932707cd638865bb5f2 Author: dmitriy Date: 2016-10-13T05:37:50Z CAMEL-10385: springtypeconverter return null on list -> map ---- > simple ognl expression issue w/ list & spring boot > -------------------------------------------------- > > Key: CAMEL-10385 > URL: https://issues.apache.org/jira/browse/CAMEL-10385 > Project: Camel > Issue Type: Bug > Components: camel-spring-boot > Affects Versions: 2.17.0, 2.17.3, 2.18.0 > Reporter: Dmitriy Frolov > Priority: Minor > > conflict running simple expression w/ list under spring boot. SpringTypeConverter is registered as a fallback converter which gets picked up during ognl while attempting to convert list -> map causing an exception instead of a null response that is expected. It is happening under 2.17 & 2.18. > sample expression: ${body.list[0].field} > 10:20:32.499 [main] TRACE o.a.c.i.c.DefaultTypeConverter | Converting java.util.ArrayList -> java.util.Map > 10:20:32.500 [main] TRACE o.a.c.i.c.DefaultTypeConverter | Using converter: org.apache.camel.impl.converter.ArrayTypeConverter@79d7035 to convert [class java.util.ArrayList=>interface java.util.Map] > Caused by: org.apache.camel.TypeConversionException: Error during type conversion from type: java.util.ArrayList to the required type: java.util.Map with due Failed to convert from type [java.util.ArrayList] to type [java.util.Map] > at org.apache.camel.impl.converter.BaseTypeConverterRegistry.createTypeConversionException(BaseTypeConverterRegistry.java:629) > at org.apache.camel.impl.converter.BaseTypeConverterRegistry.convertTo(BaseTypeConverterRegistry.java:150) > at org.apache.camel.impl.converter.BaseTypeConverterRegistry.convertTo(BaseTypeConverterRegistry.java:121) > at org.apache.camel.language.bean.BeanExpression$OgnlInvokeProcessor.lookupResult(BeanExpression.java:358) > at org.apache.camel.language.bean.BeanExpression$OgnlInvokeProcessor.process(BeanExpression.java:334) > at org.apache.camel.language.bean.BeanExpression.evaluate(BeanExpression.java:114) > ... 55 common frames omitted > Caused by: org.springframework.core.convert.ConversionFailedException: Failed to convert from type [java.util.ArrayList] to type [java.util.Map] > at org.springframework.core.convert.support.ConversionUtils.invokeConverter(ConversionUtils.java:42) > at org.springframework.core.convert.support.GenericConversionService.convert(GenericConversionService.java:192) > at org.springframework.core.convert.support.GenericConversionService.convert(GenericConversionService.java:176) > at org.apache.camel.spring.boot.SpringTypeConverter.convertTo(SpringTypeConverter.java:46) > at org.apache.camel.impl.converter.BaseTypeConverterRegistry.doConvertTo(BaseTypeConverterRegistry.java:346) > at org.apache.camel.impl.converter.BaseTypeConverterRegistry.convertTo(BaseTypeConverterRegistry.java:133) > ... 59 common frames omitted -- This message was sent by Atlassian JIRA (v6.3.4#6332)