title: How to use Drools Workbench rules in application at client side
body: <p>I have deployed drools workbench on tomcat server...It is running well....Now i want to load and fire all the rules available on workbench at client side application. Also, when rules are modified, rules must be updated at client side.....</p>
  
  <p>Currently,client side application is running on drools 6.0.1.</p>
  
  <p>I have tried the below code...</p>
  
  <pre><code>    String url = "http://localhost:4040/kie-drools-wb-distribution-wars-6.0.1.Final-tomcat7.0/maven2/com/dcproject1/dcproject1/LATEST/dcproject1-LATEST.jar";
  
      // make sure you use "LATEST" here!
      //ReleaseIdImpl releaseId = new ReleaseIdImpl("de.test", "Test", "LATEST");
      ReleaseIdImpl releaseId = new ReleaseIdImpl("com.dcproject1", "dcproject1", "LATEST");
  
      KieServices ks = KieServices.Factory.get();
  
      ks.getResources().newUrlResource(url);
  
      KieContainer kieContainer = ks.newKieContainer(releaseId);
  
      // check every 5 seconds if there is a new version at the URL
      KieScanner kieScanner = ks.newKieScanner(kieContainer);
      kieScanner.start(15000L);
  </code></pre>
  
  <p>But when i update my rules on workbench, it throws the exception like...</p>
  
  <p>13:43:16.853 [Timer-0] INFO o.d.c.k.b.impl.KieRepositoryImpl - KieModule was added:ZipKieModule[ ReleaseId=com.dcproject1:dcproject1:1.0.1file=E:\Users\kjariwala1.m2\repository\com\dcproject1\dcproject1\1.0.1\dcproject1-1.0.1.jar] Exception in thread "Timer-0" java.lang.NullPointerException at org.drools.compiler.kie.builder.impl.KieContainerImpl.updateToVersion(KieContainerImpl.java:161) at org.kie.scanner.KieRepositoryScannerImpl.updateKieModule(KieRepositoryScannerImpl.java:214) at org.kie.scanner.KieRepositoryScannerImpl.scanNow(KieRepositoryScannerImpl.java:204) at org.kie.scanner.KieRepositoryScannerImpl$ScanTask.run(KieRepositoryScannerImpl.java:193) at java.util.TimerThread.mainLoop(Timer.java:555) at java.util.TimerThread.run(Timer.java:505)</p>