camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Harish Kumar <harish.kum...@tcs.com>
Subject Re: Camel Websocket - Connection key not set
Date Wed, 06 May 2015 07:07:51 GMT
Hey Thanks for the suggestion

Now am using AH-WS component. Leaving the websocket code untounced, now I
get this error

java.lang.NullPointerException
        at
org.apache.camel.component.ahc.ws.WsProducer.sendMessage(WsProducer.j
ava:77)
        at
org.apache.camel.component.ahc.ws.WsProducer.process(WsProducer.java:
52)
        at
org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncP
rocessorBridge.process(AsyncProcessorConverterHelper.java:61)
        at
org.apache.camel.processor.SendProcessor.process(SendProcessor.java:1
29)
        at
org.apache.camel.management.InstrumentationProcessor.process(Instrume
ntationProcessor.java:77)
        at
org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryE
rrorHandler.java:448)
        at
org.apache.camel.processor.CamelInternalProcessor.process(CamelIntern
alProcessor.java:191)
        at org.apache.camel.processor.Pipeline.process(Pipeline.java:118)
        at org.apache.camel.processor.Pipeline.process(Pipeline.java:80)
        at
org.apache.camel.processor.CamelInternalProcessor.process(CamelIntern
alProcessor.java:191)
        at
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelp
er.java:109)
        at
org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsy
ncProcessor.java:87)
        at
org.apache.camel.component.jms.EndpointMessageListener.onMessage(Endp
ointMessageListener.java:103)
        at
org.springframework.jms.listener.AbstractMessageListenerContainer.doI
nvokeListener(AbstractMessageListenerContainer.java:699)
        at
org.springframework.jms.listener.AbstractMessageListenerContainer.inv
okeListener(AbstractMessageListenerContainer.java:637)
        at
org.springframework.jms.listener.AbstractMessageListenerContainer.doE
xecuteListener(AbstractMessageListenerContainer.java:605)
        at
org.springframework.jms.listener.AbstractPollingMessageListenerContai
ner.doReceiveAndExecute(AbstractPollingMessageListenerContainer.java:308)
        at
org.springframework.jms.listener.AbstractPollingMessageListenerContai
ner.receiveAndExecute(AbstractPollingMessageListenerContainer.java:246)
        at
org.springframework.jms.listener.DefaultMessageListenerContainer$Asyn
cMessageListenerInvoker.invokeListener(DefaultMessageListenerContainer.java:1144
)
        at
org.springframework.jms.listener.DefaultMessageListenerContainer$Asyn
cMessageListenerInvoker.executeOngoingLoop(DefaultMessageListenerContainer.java:
1136)
        at
org.springframework.jms.listener.DefaultMessageListenerContainer$Asyn
cMessageListenerInvoker.run(DefaultMessageListenerContainer.java:1033)
        at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.
java:1145)
        at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor
.java:615)
        at java.lang.Thread.run(Thread.java:724)
[d #0 - JmsConsumer[test.queue]] EndpointMessageListener        WARN 
Execution
of JMS message listener failed. Caused by:
[org.apache.camel.RuntimeCamelExcepti
on - java.lang.NullPointerException]
org.apache.camel.RuntimeCamelException: java.lang.NullPointerException
        at
org.apache.camel.util.ObjectHelper.wrapRuntimeCamelException(ObjectHe
lper.java:1619)
        at
org.apache.camel.component.jms.EndpointMessageListener$EndpointMessag
eListenerAsyncCallback.done(EndpointMessageListener.java:186)
        at
org.apache.camel.component.jms.EndpointMessageListener.onMessage(Endp
ointMessageListener.java:107)
        at
org.springframework.jms.listener.AbstractMessageListenerContainer.doI
nvokeListener(AbstractMessageListenerContainer.java:699)
        at
org.springframework.jms.listener.AbstractMessageListenerContainer.inv
okeListener(AbstractMessageListenerContainer.java:637)
        at
org.springframework.jms.listener.AbstractMessageListenerContainer.doE
xecuteListener(AbstractMessageListenerContainer.java:605)
        at
org.springframework.jms.listener.AbstractPollingMessageListenerContai
ner.doReceiveAndExecute(AbstractPollingMessageListenerContainer.java:308)
        at
org.springframework.jms.listener.AbstractPollingMessageListenerContai
ner.receiveAndExecute(AbstractPollingMessageListenerContainer.java:246)
        at
org.springframework.jms.listener.DefaultMessageListenerContainer$Asyn
cMessageListenerInvoker.invokeListener(DefaultMessageListenerContainer.java:1144
)
        at
org.springframework.jms.listener.DefaultMessageListenerContainer$Asyn
cMessageListenerInvoker.executeOngoingLoop(DefaultMessageListenerContainer.java:
1136)
        at
org.springframework.jms.listener.DefaultMessageListenerContainer$Asyn
cMessageListenerInvoker.run(DefaultMessageListenerContainer.java:1033)
        at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.
java:1145)
        at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor
.java:615)
        at java.lang.Thread.run(Thread.java:724)
Caused by: java.lang.NullPointerException
        at
org.apache.camel.component.ahc.ws.WsProducer.sendMessage(WsProducer.j
ava:77)
        at
org.apache.camel.component.ahc.ws.WsProducer.process(WsProducer.java:
52)
        at
org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncP
rocessorBridge.process(AsyncProcessorConverterHelper.java:61)
        at
org.apache.camel.processor.SendProcessor.process(SendProcessor.java:1
29)
        at
org.apache.camel.management.InstrumentationProcessor.process(Instrume
ntationProcessor.java:77)
        at
org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryE
rrorHandler.java:448)
        at
org.apache.camel.processor.CamelInternalProcessor.process(CamelIntern
alProcessor.java:191)
        at org.apache.camel.processor.Pipeline.process(Pipeline.java:118)
        at org.apache.camel.processor.Pipeline.process(Pipeline.java:80)
        at
org.apache.camel.processor.CamelInternalProcessor.process(CamelIntern
alProcessor.java:191)
        at
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelp
er.java:109)
        at
org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsy
ncProcessor.java:87)
        at
org.apache.camel.component.jms.EndpointMessageListener.onMessage(Endp
ointMessageListener.java:103)


Digging the source code, shows, null pointer exception at

*webSocket.sendMessage(msg);*

Does it mean, the webSocket is null??

The instance of the webSocket arrives as

return (WsEndpoint) super.getEndpoint(); // super extended from
DefaultProducer



--
View this message in context: http://camel.465427.n5.nabble.com/Camel-Websocket-Connection-key-not-set-tp5766728p5766730.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Mime
View raw message