Hi

Could be OSGi related. Can you try without OSGi.
Just to get the fact straight.

And I assume you use 2.0-SNAPSHOT.


On Tue, Jun 9, 2009 at 11:18 AM, Charles Moulliard<[email protected]> wrote:
> Hi,
>
> When I use the following route :
>
>        <camel:route>
>            <camel:from ref="queueClientInEndpoint" />
>            <camel:choice>
>                <camel:when>
>                    <camel:simple>${in.header.messageType} ==
> 'OINP'</camel:simple>
>                    <!-- Call the requestService to save the request -->
>                    <camel:bean ref="requestService"/>
>                </camel:when>
>                ....
>
>    <!-- Request Service  -->
>    <osgi:reference id="requestService"
> interface="com.xpectis.x3s.platform.service.RequestService" />
>
>   �...@handler
>    public void createRequest(@Header(value = "messageType") String
> messageType, @Body String body, Exchange exchange) {
>
>        // Instantiate the Request class
>        Request request = new Request();
>
>        // Add the CSV records to the body field
>        request.setMessageContent(body.getBytes());
>
>        // Save the request in the DB
>        this.saveRequest(request);
>
>        // add the request object to the exchange
>        exchange.getOut().setBody(request);
>
>    }
>
> , camel generates the following error :
>
> Caused by: java.lang.NullPointerException
>    at
> org.apache.camel.component.bean.MethodInfo$2.evaluate(MethodInfo.java:197)
>    at
> org.apache.camel.component.bean.MethodInfo.createMethodInvocation(MethodInfo.java:81)
>    at
> org.apache.camel.component.bean.BeanInfo.createInvocation(BeanInfo.java:151)
>    at
> org.apache.camel.component.bean.BeanProcessor.process(BeanProcessor.java:104)
>    at
> org.apache.camel.processor.interceptor.StreamCachingInterceptor.process(StreamCachingInterceptor.java:52)
>    at
> org.apache.camel.processor.DelegateProcessor.processNext(DelegateProcessor.java:53)
>    at
> org.apache.camel.processor.DelegateProcessor.proceed(DelegateProcessor.java:82)
>    at
> org.apache.camel.processor.interceptor.TraceInterceptor.process(TraceInterceptor.java:114)
>    at
> org.apache.camel.processor.DefaultErrorHandler.process(DefaultErrorHandler.java:52)
>    at
> org.apache.camel.processor.DefaultChannel.process(DefaultChannel.java:147)
>    at
> org.apache.camel.processor.DelegateProcessor.processNext(DelegateProcessor.java:53)
>    at
> org.apache.camel.processor.ChoiceProcessor.process(ChoiceProcessor.java:51)
>    at
> org.apache.camel.processor.interceptor.StreamCachingInterceptor.process(StreamCachingInterceptor.java:52)
>    at
> org.apache.camel.processor.DelegateProcessor.processNext(DelegateProcessor.java:53)
>    at
> org.apache.camel.processor.DelegateProcessor.proceed(DelegateProcessor.java:82)
>    at
> org.apache.camel.processor.interceptor.TraceInterceptor.process(TraceInterceptor.java:114)
>    at
> org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:61)
>    at
> org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:61)
>    at
> org.apache.camel.processor.DefaultErrorHandler.process(DefaultErrorHandler.java:52)
>    at
> org.apache.camel.processor.DefaultChannel.process(DefaultChannel.java:147)
>    at org.apache.camel.processor.Pipeline.process(Pipeline.java:74)
>    at
> org.apache.camel.processor.UnitOfWorkProcessor.processNext(UnitOfWorkProcessor.java:54)
>    at
> org.apache.camel.processor.DelegateProcessor.process(DelegateProcessor.java:48)
>    at
> org.apache.camel.component.jms.EndpointMessageListener.onMessage(EndpointMessageListener.java:81)
>
> Is the problem related to the fact that camel can't find the method where
> @handler has been defined ?
>
> Charles Moulliard
> Senior Enterprise Architect
> Apache Camel Committer
>
> *****************************
> blog : http://cmoulliard.blogspot.com
>



-- 
Claus Ibsen
Apache Camel Committer

Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus

Reply via email to