camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bingliu <liubing1...@gmail.com>
Subject Integration camel and spring-integration
Date Mon, 29 Nov 2010 09:22:06 GMT

Hi, I am integrating camel and spring-integration now. Please look this:
                <camel:route>
			<camel:from uri="direct:toIntegration"/>
			<camel:bean ref="testIn"/>
			<camel:to uri="spring-integration:inChannel"/>
		</camel:route>
the spring-integration configuration is this :
        <int:channel id="inChannel"/>
	<int:channel id="outChannel"/>

	<int:service-activator ref="testActivator" method="test"
input-channel="inChannel"/>
	
	<bean id="testActivator" class="com.jbsoft.msb.db.TestActivator"/>
but a problem has occur,please look this:
2010 十一月 29 17:19:22 21374 DEBUG [OSGi Console]
org.apache.camel.processor.DefaultErrorHandler     - Failed delivery for
exchangeId: 28711046-b8b8-4e89-91a9-b6ef92214a39. On delivery attempt: 0
caught: java.lang.NullPointerException
2010 十一月 29 17:19:22 21376 ERROR [OSGi Console]
org.apache.camel.processor.DefaultErrorHandler     - Failed delivery for
exchangeId: 28711046-b8b8-4e89-91a9-b6ef92214a39. Exhausted after delivery
attempt: 1 caught: java.lang.NullPointerException
java.lang.NullPointerException
	at
org.apache.camel.component.spring.integration.SpringIntegrationProducer.process(SpringIntegrationProducer.java:87)
	at
org.apache.camel.processor.SendProcessor$1.doInProducer(SendProcessor.java:106)
	at
org.apache.camel.processor.SendProcessor$1.doInProducer(SendProcessor.java:104)
	at org.apache.camel.impl.ProducerCache.doInProducer(ProducerCache.java:189)
	at
org.apache.camel.processor.SendProcessor.doProcess(SendProcessor.java:103)
	at org.apache.camel.processor.SendProcessor.process(SendProcessor.java:87)
	at
org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:67)
	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:97)
	at
org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:67)
	at
org.apache.camel.processor.RedeliveryErrorHandler.processExchange(RedeliveryErrorHandler.java:185)
	at
org.apache.camel.processor.RedeliveryErrorHandler.processErrorHandler(RedeliveryErrorHandler.java:151)
	at
org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:89)
	at
org.apache.camel.processor.DefaultErrorHandler.process(DefaultErrorHandler.java:49)
	at
org.apache.camel.processor.DefaultChannel.process(DefaultChannel.java:228)
	at org.apache.camel.processor.Pipeline.process(Pipeline.java:75)
	at
org.apache.camel.processor.UnitOfWorkProcessor.processNext(UnitOfWorkProcessor.java:70)
	at
org.apache.camel.processor.DelegateProcessor.process(DelegateProcessor.java:48)
	at
org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:67)
	at
org.apache.camel.component.direct.DirectProducer.process(DirectProducer.java:44)
	at
org.apache.camel.impl.ProducerCache$1.doInProducer(ProducerCache.java:230)
	at
org.apache.camel.impl.ProducerCache$1.doInProducer(ProducerCache.java:209)
	at org.apache.camel.impl.ProducerCache.doInProducer(ProducerCache.java:189)
	at org.apache.camel.impl.ProducerCache.sendExchange(ProducerCache.java:208)
	at org.apache.camel.impl.ProducerCache.send(ProducerCache.java:152)
	at
org.apache.camel.impl.DefaultProducerTemplate.send(DefaultProducerTemplate.java:113)
	at
org.apache.camel.impl.DefaultProducerTemplate.sendBody(DefaultProducerTemplate.java:117)
	at
org.apache.camel.impl.DefaultProducerTemplate.sendBody(DefaultProducerTemplate.java:134)
	at
org.apache.camel.impl.DefaultProducerTemplate.requestBody(DefaultProducerTemplate.java:282)
	at com.jbsoft.msb.db.Activator._test1(Activator.java:46)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at
org.eclipse.osgi.framework.internal.core.FrameworkCommandInterpreter.execute(FrameworkCommandInterpreter.java:155)
	at
org.eclipse.osgi.framework.internal.core.FrameworkConsole.docommand(FrameworkConsole.java:303)
	at
org.eclipse.osgi.framework.internal.core.FrameworkConsole.console(FrameworkConsole.java:288)
	at
org.eclipse.osgi.framework.internal.core.FrameworkConsole.run(FrameworkConsole.java:224)
	at java.lang.Thread.run(Thread.java:619)
2010 十一月 29 17:19:22 21382 DEBUG [OSGi Console]
org.apache.camel.processor.DefaultErrorHandler     - This exchange is not
handled so its marked as failed: Exchange[Message: [B@1e81d48]
2010 十一月 29 17:19:22 21382 DEBUG [OSGi Console]  
org.apache.camel.processor.Pipeline     - Message exchange has failed so
breaking out of pipeline: Exchange[Message: [B@1e81d48] Exception:
java.lang.NullPointerException
org.apache.camel.CamelExecutionException: Exception occurred during
execution on the exchange: Exchange[Message: [B@1e81d48]
	at
org.apache.camel.util.ObjectHelper.wrapCamelExecutionException(ObjectHelper.java:1127)
	at
org.apache.camel.util.ExchangeHelper.extractResultBody(ExchangeHelper.java:448)
	at
org.apache.camel.impl.DefaultProducerTemplate.extractResultBody(DefaultProducerTemplate.java:440)
	at
org.apache.camel.impl.DefaultProducerTemplate.sendBody(DefaultProducerTemplate.java:118)
	at
org.apache.camel.impl.DefaultProducerTemplate.sendBody(DefaultProducerTemplate.java:134)
	at
org.apache.camel.impl.DefaultProducerTemplate.requestBody(DefaultProducerTemplate.java:282)
	at com.jbsoft.msb.db.Activator._test1(Activator.java:46)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at
org.eclipse.osgi.framework.internal.core.FrameworkCommandInterpreter.execute(FrameworkCommandInterpreter.java:155)
	at
org.eclipse.osgi.framework.internal.core.FrameworkConsole.docommand(FrameworkConsole.java:303)
	at
org.eclipse.osgi.framework.internal.core.FrameworkConsole.console(FrameworkConsole.java:288)
	at
org.eclipse.osgi.framework.internal.core.FrameworkConsole.run(FrameworkConsole.java:224)
	at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.NullPointerException
I see the example on the website.The configuration as same as the example?
What cause of the problem is it?Thanks
-- 
View this message in context: http://camel.465427.n5.nabble.com/Integration-camel-and-spring-integration-tp3284105p3284105.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Mime
View raw message