You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Igor Azarny (JIRA)" <ji...@apache.org> on 2012/12/23 09:54:13 UTC
[jira] [Created] (CAMEL-5908) Websocket consumer cannot be started,
because of NPE
Igor Azarny created CAMEL-5908:
----------------------------------
Summary: Websocket consumer cannot be started, because of NPE
Key: CAMEL-5908
URL: https://issues.apache.org/jira/browse/CAMEL-5908
Project: Camel
Issue Type: Bug
Components: camel-websocket
Affects Versions: 2.10.3
Reporter: Igor Azarny
Priority: Critical
Websocket consumer cannot be started for simple route
<camel:route>
<camel:from uri="websocket://localhost:9998/cnt"/>
<camel:to uri="stream:out"/>
</camel:route>
Root cause:
Websoket component has not serlvet object.
WebsoketComponent#line:170
// Don't provide a Servlet object as Producer/Consumer will create them later on
connectorRef = new ConnectorRef(server, connector, null);
WebsoketComponent#line:190
if (prodcon instanceof WebsocketConsumer) {
// connect websocket consumer, to servlet
connectorRef.servlet.connect((WebsocketConsumer) prodcon);
}
Stack trace is:
Caused by: java.lang.NullPointerException
at org.apache.camel.component.websocket.WebsocketComponent.connect(WebsocketComponent.java:192)
at org.apache.camel.component.websocket.WebsocketEndpoint.connect(WebsocketEndpoint.java:90)
at org.apache.camel.component.websocket.WebsocketConsumer.start(WebsocketConsumer.java:36)
at org.apache.camel.impl.DefaultCamelContext.startService(DefaultCamelContext.java:1763)
at org.apache.camel.impl.DefaultCamelContext.doStartOrResumeRouteConsumers(DefaultCamelContext.java:2059)
at org.apache.camel.impl.DefaultCamelContext.doStartRouteConsumers(DefaultCamelContext.java:1995)
at org.apache.camel.impl.DefaultCamelContext.safelyStartRouteServices(DefaultCamelContext.java:1923)
at org.apache.camel.impl.DefaultCamelContext.doStartOrResumeRoutes(DefaultCamelContext.java:1702)
at org.apache.camel.impl.DefaultCamelContext.doStartCamel(DefaultCamelContext.java:1583)
at org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.java:1444)
at org.apache.camel.spring.SpringCamelContext.doStart(SpringCamelContext.java:179)
at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:60)
at org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:1412)
at org.apache.camel.spring.SpringCamelContext.maybeStart(SpringCamelContext.java:228)
at org.apache.camel.spring.SpringCamelContext.onApplicationEvent(SpringCamelContext.java:118)
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira