FAQ
/...
Caused by: org.springframework.beans.BeanInstantiationException: Could not
instantiate bean class
[org.apache.camel.processor.aggregate.UseOriginalAggregationStrategy]: No
default constructor found; nested exception is
java.lang.NoSuchMethodException:
org.apache.camel.processor.aggregate.UseOriginalAggregationStrategy.(SimpleInstantiationStrategy.java:70)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:957)
... 83 more
Caused by: java.lang.NoSuchMethodException:
org.apache.camel.processor.aggregate.UseOriginalAggregationStrategy.(Class.java:2706)
at java.lang.Class.getDeclaredConstructor(Class.java:1985)
at
org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:65)
... 84 more/


The exception above is throw because UseOriginalAggregationStrategy (see
http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/processor/aggregate/UseOriginalAggregationStrategy.html)
does not have a default constructor needed to perform the folowing XML DSL:

/<bean id="myAggregator"

class="org.apache.camel.processor.aggregate.UseOriginalAggregationStrategy"
/>
...
<camelContext >
....
<camel:route id="route1">
<camel:from ref="incomingMessageDirect" />
<camel:split strategyRef="myAggregator">
<camel:simple>${body.envelopeList}</camel:simple>
<camel:to ref="myJmsQueue" />
<camel:to uri="bean:myConsumer?method=process" />
</camel:split>
</camel:route>
....
</camelContext>/

/UseOriginalAggregationStrategy /has only 1 constructor with 2 args. This
approach is allowing me to define UseOriginalAggregationStrategy via Java
DSL only but not via XML DSL(or I don´t know how ).

How can I use /UseOriginalAggregationStrategy /via XML DSL?

Search Discussions

  • Claus Ibsen at Apr 12, 2012 at 7:43 am
    Hi

    The splitter automatic uses the original strategy, so you do not need
    to specify any at all.


    On Wed, Apr 11, 2012 at 11:44 PM, garrydias wrote:
    /...
    Caused by: org.springframework.beans.BeanInstantiationException: Could not
    instantiate bean class
    [org.apache.camel.processor.aggregate.UseOriginalAggregationStrategy]: No
    default constructor found; nested exception is
    java.lang.NoSuchMethodException:
    org.apache.camel.processor.aggregate.UseOriginalAggregationStrategy.<init>()
    at
    org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:70)
    at
    org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:957)
    ... 83 more
    Caused by: java.lang.NoSuchMethodException:
    org.apache.camel.processor.aggregate.UseOriginalAggregationStrategy.<init>()
    at java.lang.Class.getConstructor0(Class.java:2706)
    at java.lang.Class.getDeclaredConstructor(Class.java:1985)
    at
    org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:65)
    ... 84 more/


    The exception above is throw because UseOriginalAggregationStrategy (see
    http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/processor/aggregate/UseOriginalAggregationStrategy.html)
    does not have a default constructor needed to perform the folowing XML DSL:

    /<bean id="myAggregator"

    class="org.apache.camel.processor.aggregate.UseOriginalAggregationStrategy"
    />
    ...
    <camelContext >
    ....
    <camel:route id="route1">
    <camel:from ref="incomingMessageDirect" />
    <camel:split strategyRef="myAggregator">
    <camel:simple>${body.envelopeList}</camel:simple>
    <camel:to ref="myJmsQueue" />
    <camel:to uri="bean:myConsumer?method=process" />
    </camel:split>
    </camel:route>
    ....
    </camelContext>/

    /UseOriginalAggregationStrategy /has only 1 constructor with 2 args. This
    approach is allowing me to define UseOriginalAggregationStrategy via Java
    DSL only but not via XML DSL(or I don´t know how ).

    How can I use /UseOriginalAggregationStrategy /via XML DSL?

    --
    View this message in context: http://camel.465427.n5.nabble.com/split-strategyRef-rejects-GroupedExchangeAggregationStrategy-UseLatestAggregationStrategy-UseOriginay-tp5634122p5634122.html
    Sent from the Camel - Users mailing list archive at Nabble.com.


    --
    Claus Ibsen
    -----------------
    CamelOne 2012 Conference, May 15-16, 2012: http://camelone.com
    FuseSource
    Email: cibsen@fusesource.com
    Web: http://fusesource.com
    Twitter: davsclaus, fusenews
    Blog: http://davsclaus.blogspot.com/
    Author of Camel in Action: http://www.manning.com/ibsen/
  • Garrydias at Apr 12, 2012 at 3:09 pm
    Ok Claus.

    Thanks

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupusers @
categoriescamel
postedApr 11, '12 at 9:44p
activeApr 12, '12 at 3:09p
posts3
users2
websitecamel.apache.org

2 users in discussion

Garrydias: 2 posts Claus Ibsen: 1 post

People

Translate

site design / logo © 2022 Grokbase