[ https://issues.apache.org/jira/browse/CAMEL-14937?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17089604#comment-17089604 ]
Claus Ibsen commented on CAMEL-14937: ------------------------------------- Thanks we will take a look at this > ExpressionBuilder.headerExpression("name", class) results in > ClassNotFoundException > ----------------------------------------------------------------------------------- > > Key: CAMEL-14937 > URL: https://issues.apache.org/jira/browse/CAMEL-14937 > Project: Camel > Issue Type: Bug > Components: came-core > Affects Versions: 3.2.0 > Reporter: Jens Kleine-Herzbruch > Priority: Major > Fix For: 3.3.0 > > Attachments: camel-header-expression.diff > > > {{ public static <T> Expression headerExpression(final String headerName, > final Class<T> type) {}} > {{ return headerExpression(simpleExpression(headerName), > constantExpression(type));}} > {{ }}} > > and > > {{ public static Expression headerExpression(final Expression headerName, > final Expression typeName)}} > {{}}{{}} > tries to resolve the type via > {{String text = typeName.evaluate(exchange, String.class);}} > which results in the String "class xxx.yyy.type". Trying to resolve that as a > class obviously is bound to fail. I'm not sure whether the type converter > should be changed here or the headerExpression code is wrong. > > This worked in 3.1.0, btw. -- This message was sent by Atlassian Jira (v8.3.4#803005)