On Tue, Mar 1, 2011 at 8:30 PM, JacobS <[email protected]> wrote:
> Hi,
>
> I am trying to use a POJO for a splitter with spring.
> I defined a bean as a splitter and set it as the split method like this:
>
> <bean id="pojoSplitter" class="acme.splitters.PojoSplitter" />
>
> <camel:split>
>        <camel:method bean="pojoSplitter" method="split" />
>        ...
> </camel:split>
>
> but when a message reaches the route I get this exception:
> org.apache.camel.NoSuchBeanException: No bean could be found in the registry
> for: pojoSplitter.
>
> I am sure the bean was created because I checked with jmx.
>

That's odd.

This XML file is used in unit test from camel-spring:
org/apache/camel/spring/processor/splitterMethodCallTest.xml

    <!-- START SNIPPET: e1 -->
    <camelContext xmlns="http://camel.apache.org/schema/spring";>
        <route>
            <from uri="direct:start"/>
            <split>
                <method bean="splitWordsBean" method="splitWords"/>
                <to uri="mock:result"/>
            </split>
        </route>
    </camelContext>
    <!-- END SNIPPET: e1 -->

    <bean id="splitWordsBean"
class="org.apache.camel.processor.SplitterMethodCallTest$SplitWordsBean"/>



> Thanks,
> Jacob
>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/split-with-spring-DSL-bean-tp3405576p3405576.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



-- 
Claus Ibsen
-----------------
FuseSource
Email: [email protected]
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/

Reply via email to