You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by haqim01 <im...@int.sc.mufg.jp> on 2015/06/08 15:34:25 UTC

Scala POJO Aggregator Exception

Hi,
I am getting the following error:

Exception in thread "main" org.apache.camel.RuntimeCamelException:
java.lang.IllegalArgumentException: Parameter annotations at index 0 is not
supported on method: public java.util.List
com.musi.tec.ofp.model.instrument.ext.InstrumentContainer.add(com.musi.tec.ofp.model.instrument.ext.InstrumentContainer,com.musi.tec.ofp.model.instrument.ext.InstrumentContainer)
	at
org.apache.camel.util.ObjectHelper.wrapRuntimeCamelException(ObjectHelper.java:1363)

when trying to execute the following Scala Aggregator method:
def add(existing: InstrumentContainer, next: InstrumentContainer):
JList[Instrument] = {....

this aggregator is being executed using Spring XML as follows:

<bean id="instrumentContainer"
class="com.musi.tec.ofp.model.instrument.ext.InstrumentContainer"/>
...
<route id="aggregateInstruments">	
 <from uri="direct:instruments"/>
  <aggregate strategyRef="instrumentContainer" strategyMethodName="add"
completionSize="2">
	        		<correlationExpression>
	             		<constant>true</constant>
	        		</correlationExpression>
	        		<to ...
	    		</aggregate>

I am using 2.13.1
Any ideas?
Thanks,
Imran



--
View this message in context: http://camel.465427.n5.nabble.com/Scala-POJO-Aggregator-Exception-tp5767978.html
Sent from the Camel Development mailing list archive at Nabble.com.