title: Creating a drools route in Camel
body: <p>I'm getting the following error while deploying a Camel route using the drools-camel component. </p>
  
  <p>This is how my route looks like. </p>
  
  <pre><code>            &lt;route id="drools-route"&gt;
                      &lt;from uri="direct:drools-ep" /&gt;
                      &lt;policy ref="droolsPolicy"&gt;
                              &lt;unmarshal ref="xstream" /&gt;
                              &lt;to uri="drools:node1/ksession1" /&gt;
                              &lt;marshal ref="xstream" /&gt;
                      &lt;/policy&gt;
              &lt;/route&gt;
  
      &lt;bean id="droolsPolicy" class="org.drools.camel.component.DroolsPolicy" /&gt;
  
  268 [          http-bio-8080-exec-5] SpringCamelContext             INFO  Apache Camel 2.10-SNAPSHOT (CamelContext: camelctx) is starting
  269 [          http-bio-8080-exec-5] SpringCamelContext             INFO  Tracing is enabled on CamelContext: camelctx
  270 [          http-bio-8080-exec-5] ManagementStrategyFactory      INFO  JMX enabled.
  271 [          http-bio-8080-exec-5] ultManagementLifecycleStrategy INFO  StatisticsLevel at All so enabling load performance statistics
  272 [          http-bio-8080-exec-5] DefaultTypeConverter           INFO  Loaded 194 type converters
  273 [          http-bio-8080-exec-5] SpringCamelContext             INFO  Apache Camel 2.10-SNAPSHOT (CamelContext: camelctx) is shutting down
  274 [          http-bio-8080-exec-5] SpringCamelContext             INFO  Apache Camel 2.10-SNAPSHOT (CamelContext: camelctx) is shutdown in 0.004 seconds. Uptime 0.298 seconds.
  275 [          http-bio-8080-exec-5] ContextLoader                  ERROR Context initialization failed
  276 org.apache.camel.RuntimeCamelException: org.apache.camel.FailedToCreateRouteException: Failed to create route drools-route at: &gt;&gt;&gt; Policy[ref:droolsPolicy] &lt;&lt;&lt; in route: Route[[From[direct:drools-ep]] -&gt; [Policy[ref:droolsPolicy]    ]... because of Failed to resolve endpoint: drools://node1/ksession1 due to: Could not find GridNode for uri="node1/ksession1" in CamelContext. Check configuration.
  277         at org.apache.camel.util.ObjectHelper.wrapRuntimeCamelException(ObjectHelper.java:1221)[camel-core-2.10-20120318.032230-65.jar:2.10-SNAPSHOT]
  278         at org.apache.camel.spring.SpringCamelContext.onApplicationEvent(SpringCamelContext.java:120)[camel-spring-2.10-20120318.032739-65.jar:2.10-SNAPSHOT]
  279         at org.apache.camel.spring.CamelContextFactoryBean.onApplicationEvent(CamelContextFactoryBean.java:243)[camel-spring-2.10-20120318.032739-65.jar:2.10-SNAPSHOT]
  280         at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:97)[spring-context-3.0.7.RELEASE.jar:3.0.7.RELEASE]
  281         at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:303)[spring-context-3.0.7.RELEASE.jar:3.0.7.RELEASE]
  282         at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:911)[spring-context-3.0.7.RELEASE.jar:3.0.7.RELEASE]
  283         at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:428)[spring-context-3.0.7.RELEASE.jar:3.0.7.RELEASE]
  284         at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:282)[spring-web-3.0.7.RELEASE.jar:3.0.7.RELEASE]
  285         at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:204)[spring-web-3.0.7.RELEASE.jar:3.0.7.RELEASE]
  286         at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)[spring-web-3.0.7.RELEASE.jar:3.0.7.RELEASE]
  287         at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4779)[catalina.jar:7.0.26]
  288         at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5273)[catalina.jar:7.0.26]
  289         at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)[catalina.jar:7.0.26]
  290         at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:895)[catalina.jar:7.0.26]
  291         at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:871)[catalina.jar:7.0.26]
  292         at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:615)[catalina.jar:7.0.26]
  293         at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:958)[catalina.jar:7.0.26]
  294         at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:536)[catalina.jar:7.0.26]
  295         at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1467)[catalina.jar:7.0.26]
  296         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[:1.6.0_29]
  297         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)[:1.6.0_29]
  298         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)[:1.6.0_29]
  299         at java.lang.reflect.Method.invoke(Method.java:597)[:1.6.0_29]
  300         at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:301)[tomcat-coyote.jar:7.0.26]
  301         at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:836)[:1.6.0_29]
  302         at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:761)[:1.6.0_29]
  303         at org.apache.catalina.manager.ManagerServlet.check(ManagerServlet.java:1436)[catalina.jar:7.0.26]
  304         at org.apache.catalina.manager.ManagerServlet.deploy(ManagerServlet.java:673)[catalina.jar:7.0.26]
  305         at org.apache.catalina.manager.ManagerServlet.doPut(ManagerServlet.java:431)[catalina.jar:7.0.26]
  306         at javax.servlet.http.HttpServlet.service(HttpServlet.java:644)[servlet-api.jar:]
  307         at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)[servlet-api.jar:]
  308         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)[catalina.jar:7.0.26]
  309         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)[catalina.jar:7.0.26]
  310         at org.apache.catalina.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:108)[catalina.jar:7.0.26]
  311         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)[catalina.jar:7.0.26]
  312         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)[catalina.jar:7.0.26]
  313         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:224)[catalina.jar:7.0.26]
  314         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)[catalina.jar:7.0.26]
  315         at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:581)[catalina.jar:7.0.26]
  316         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)[catalina.jar:7.0.26]
  317         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)[catalina.jar:7.0.26]
  318         at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927)[catalina.jar:7.0.26]
  319         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)[catalina.jar:7.0.26]
  320         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)[catalina.jar:7.0.26]
  321         at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:987)[tomcat-coyote.jar:7.0.26]
  322         at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:579)[tomcat-coyote.jar:7.0.26]
  323         at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:307)[tomcat-coyote.jar:7.0.26]
  324         at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)[:1.6.0_29]
  325         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)[:1.6.0_29]
  326         at java.lang.Thread.run(Thread.java:680)[:1.6.0_29]
  327 Mar 19, 2012 12:23:17 PM org.apache.catalina.core.StandardContext startInternal 
  </code></pre>