Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
2.19.0
-
None
-
Unknown
-
Regression
Description
After updating from 2.18.3 to 2.19.0 the following simple expression:
${headers.materialnumbers.size} != 0
(materialnumbers is a LinkedHashSet) fails with:
2017-05-08 09:10:17,143 ERR [main] org.apache.camel.processor.DefaultErrorHandler - Failed delivery for (MessageId: ID-RDDE102Y-57877-1494227416153-0-1 on ExchangeId: ID-RDDE102Y-57877-1494227416153-0-2). Exhausted after delivery attempt: 1 caught: org.apache.camel.language.bean.RuntimeBeanExpressionException: Failed to invoke method: size on null due to: org.apache.camel.component.bean.AmbiguousMethodCallException: Ambiguous method invocations possible: [public abstract int java.util.Set.size(), public abstract int java.util.AbstractCollection.size()]. Exchange[] Message History --------------------------------------------------------------------------------------------------------------------------------------- RouteId ProcessorId Processor Elapsed (ms) [Read TB ] [Read TB ] [ ] [ 67] [Read TB ] [choice1 ] [when[simple{Simple: ${headers.materialnumbers.size} != 0}]choice[] ] [ 62] Stacktrace --------------------------------------------------------------------------------------------------------------------------------------- org.apache.camel.language.bean.RuntimeBeanExpressionException: Failed to invoke method: size on null due to: org.apache.camel.component.bean.AmbiguousMethodCallException: Ambiguous method invocations possible: [public abstract int java.util.Set.size(), public abstract int java.util.AbstractCollection.size()]. Exchange[] at org.apache.camel.language.bean.BeanExpression$OgnlInvokeProcessor.process(BeanExpression.java:327) at org.apache.camel.language.bean.BeanExpression.evaluate(BeanExpression.java:115) ~[camel-core-2.19.0.jar:2.19.0] at org.apache.camel.language.bean.BeanExpression.evaluate(BeanExpression.java:139) ~[camel-core-2.19.0.jar:2.19.0] at org.apache.camel.model.language.ExpressionDefinition.evaluate(ExpressionDefinition.java:126) ~[camel-core-2.19.0.jar:2.19.0] at org.apache.camel.model.language.ExpressionDefinition.evaluate(ExpressionDefinition.java:118) ~[camel-core-2.19.0.jar:2.19.0] at org.apache.camel.builder.ExpressionBuilder$KeyedOgnlExpressionAdapter.evaluate(ExpressionBuilder.java:2490) ~[camel-core-2.19.0.jar:2.19.0] at org.apache.camel.support.ExpressionAdapter.evaluate(ExpressionAdapter.java:36) ~[camel-core-2.19.0.jar:2.19.0] at org.apache.camel.builder.BinaryPredicateSupport.matchesReturningFailureMessage(BinaryPredicateSupport.java:60) ~[camel-core-2.19.0.jar:2.19.0] at org.apache.camel.builder.BinaryPredicateSupport.matches(BinaryPredicateSupport.java:50) ~[camel-core-2.19.0.jar:2.19.0] at org.apache.camel.language.simple.ast.BinaryExpression$5.evaluate(BinaryExpression.java:233) ~[camel-core-2.19.0.jar:2.19.0] at org.apache.camel.util.ExpressionToPredicateAdapter.matches(ExpressionToPredicateAdapter.java:37) ~[camel-core-2.19.0.jar:2.19.0] at org.apache.camel.builder.SimpleBuilder.matches(SimpleBuilder.java:85) ~[camel-core-2.19.0.jar:2.19.0] at org.apache.camel.processor.FilterProcessor.matches(FilterProcessor.java:65) ~[camel-core-2.19.0.jar:2.19.0] at org.apache.camel.processor.ChoiceProcessor.process(ChoiceProcessor.java:93) ~[camel-core-2.19.0.jar:2.19.0] at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:541) [camel-core-2.19.0.jar:2.19.0] at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:198) [camel-core-2.19.0.jar:2.19.0] at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:198) [camel-core-2.19.0.jar:2.19.0] at org.apache.camel.component.direct.DirectProducer.process(DirectProducer.java:62) [camel-core-2.19.0.jar:2.19.0] at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:198) [camel-core-2.19.0.jar:2.19.0] at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:97) [camel-core-2.19.0.jar:2.19.0] at org.apache.camel.impl.ProducerCache$1.doInProducer(ProducerCache.java:529) [camel-core-2.19.0.jar:2.19.0] at org.apache.camel.impl.ProducerCache$1.doInProducer(ProducerCache.java:497) [camel-core-2.19.0.jar:2.19.0] at org.apache.camel.impl.ProducerCache.doInProducer(ProducerCache.java:365) [camel-core-2.19.0.jar:2.19.0] at org.apache.camel.impl.ProducerCache.sendExchange(ProducerCache.java:497) [camel-core-2.19.0.jar:2.19.0] at org.apache.camel.impl.ProducerCache.send(ProducerCache.java:209) [camel-core-2.19.0.jar:2.19.0] at org.apache.camel.impl.DefaultProducerTemplate.send(DefaultProducerTemplate.java:139) [camel-core-2.19.0.jar:2.19.0] at org.apache.camel.impl.DefaultProducerTemplate.send(DefaultProducerTemplate.java:374) [camel-core-2.19.0.jar:2.19.0] Caused by: org.apache.camel.component.bean.AmbiguousMethodCallException: Ambiguous method invocations possible: [public abstract int java.util.Set.size(), public abstract int java.util.AbstractCollection.size()]. Exchange[] at org.apache.camel.component.bean.BeanInfo.createInvocation(BeanInfo.java:278) ~[camel-core-2.19.0.jar:2.19.0] at org.apache.camel.component.bean.BeanInfo.createInvocation(BeanInfo.java:189) ~[camel-core-2.19.0.jar:2.19.0] at org.apache.camel.component.bean.BeanProcessor.process(BeanProcessor.java:160) ~[camel-core-2.19.0.jar:2.19.0] at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:109) ~[camel-core-2.19.0.jar:2.19.0] at org.apache.camel.component.bean.BeanProcessor.process(BeanProcessor.java:69) ~[camel-core-2.19.0.jar:2.19.0] at org.apache.camel.language.bean.BeanExpression$InvokeProcessor.process(BeanExpression.java:212) ~[camel-core-2.19.0.jar:2.19.0] at org.apache.camel.language.bean.BeanExpression$OgnlInvokeProcessor.process(BeanExpression.java:323) ~[camel-core-2.19.0.jar:2.19.0]
Attachments
Issue Links
- is broken by
-
CAMEL-10396 Can't use parameter type to select among overloaded methods
- Resolved
- relates to
-
CAMEL-11240 Simple Language: MethodNotFoundException when calling interface method implemented by super class
- Resolved
- links to