<div dir="ltr"><div>working projects are attached<br></div><div><br>This simple code works in Groovy project:<br>{code}<br>KieServices ks = KieServices.Factory.get();<br>KieRepository kr = ks.getRepository();<br>KieFileSystem kfs = ks.newKieFileSystem();<br>
<br>// String drl = new File("rules/r1.drl").getText()<br>// kfs.write("src/main/resources/org/kie/example5/HAL5.drl", drl);<br><br>KieBuilder kb = ks.newKieBuilder(kfs);<br><br>kb.buildAll(); // kieModule is automatically deployed to KieRepository if successfully built.<br>
{code}<br><br>but it fails with error if executed in Grails 2.2.4 application<br></div><div>{code}<br><ol style="margin:0px;padding:0px 0px 0px 48px;color:rgb(172,172,172);font-family:Consolas,Menlo,Monaco,'Lucida Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono',monospace,serif;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:21px;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(248,248,248)">
<li class="" style><div class="" style="padding:0px 5px;vertical-align:top;color:rgb(0,0,0);border-left:1px solid rgb(204,204,204);background-color:rgb(255,255,255);font-family:Consolas,Menlo,Monaco,'Lucida Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono',monospace,serif;line-height:21px">
ERROR errors.GrailsExceptionResolver - ClassNotFoundException occurred when processing request: [GET] /grails-drools6/drools/index</div></li><li class="" style><div class="" style="padding:0px 5px;vertical-align:top;color:rgb(0,0,0);border-left:1px solid rgb(204,204,204);background-color:rgb(255,255,255);font-family:Consolas,Menlo,Monaco,'Lucida Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono',monospace,serif;line-height:21px">
org.drools.compiler.kie.builder.impl.KieModuleCache$KModuleCache. Stacktrace follows:</div></li><li class="" style><div class="" style="padding:0px 5px;vertical-align:top;color:rgb(0,0,0);border-left:1px solid rgb(204,204,204);background-color:rgb(255,255,255);font-family:Consolas,Menlo,Monaco,'Lucida Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono',monospace,serif;line-height:21px">
Message: org.drools.compiler.kie.builder.impl.KieModuleCache$KModuleCache</div></li><li class="" style><div class="" style="padding:0px 5px;vertical-align:top;color:rgb(0,0,0);border-left:1px solid rgb(204,204,204);background-color:rgb(255,255,255);font-family:Consolas,Menlo,Monaco,'Lucida Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono',monospace,serif;line-height:21px">
Line | Method</div></li><li class="" style><div class="" style="padding:0px 5px;vertical-align:top;color:rgb(0,0,0);border-left:1px solid rgb(204,204,204);background-color:rgb(255,255,255);font-family:Consolas,Menlo,Monaco,'Lucida Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono',monospace,serif;line-height:21px">
->> 366 | run in java.net.URLClassLoader$1</div></li><li class="" style><div class="" style="padding:0px 5px;vertical-align:top;color:rgb(0,0,0);border-left:1px solid rgb(204,204,204);background-color:rgb(255,255,255);font-family:Consolas,Menlo,Monaco,'Lucida Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono',monospace,serif;line-height:21px">
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</div></li><li class="" style><div class="" style="padding:0px 5px;vertical-align:top;color:rgb(0,0,0);border-left:1px solid rgb(204,204,204);background-color:rgb(255,255,255);font-family:Consolas,Menlo,Monaco,'Lucida Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono',monospace,serif;line-height:21px">
| 355 | run in ''</div></li><li class="" style><div class="" style="padding:0px 5px;vertical-align:top;color:rgb(0,0,0);border-left:1px solid rgb(204,204,204);background-color:rgb(255,255,255);font-family:Consolas,Menlo,Monaco,'Lucida Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono',monospace,serif;line-height:21px">
| 354 | findClass . . . . . . . . in java.net.URLClassLoader</div></li><li class="" style><div class="" style="padding:0px 5px;vertical-align:top;color:rgb(0,0,0);border-left:1px solid rgb(204,204,204);background-color:rgb(255,255,255);font-family:Consolas,Menlo,Monaco,'Lucida Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono',monospace,serif;line-height:21px">
| 424 | loadClass in java.lang.ClassLoader</div></li><li class="" style><div class="" style="padding:0px 5px;vertical-align:top;color:rgb(0,0,0);border-left:1px solid rgb(204,204,204);background-color:rgb(255,255,255);font-family:Consolas,Menlo,Monaco,'Lucida Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono',monospace,serif;line-height:21px">
| 357 | loadClass . . . . . . . . in ''</div></li><li class="" style><div class="" style="padding:0px 5px;vertical-align:top;color:rgb(0,0,0);border-left:1px solid rgb(204,204,204);background-color:rgb(255,255,255);font-family:Consolas,Menlo,Monaco,'Lucida Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono',monospace,serif;line-height:21px">
| 2521 | privateGetDeclaredMethods in java.lang.Class</div></li><li class="" style><div class="" style="padding:0px 5px;vertical-align:top;color:rgb(0,0,0);border-left:1px solid rgb(204,204,204);background-color:rgb(255,255,255);font-family:Consolas,Menlo,Monaco,'Lucida Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono',monospace,serif;line-height:21px">
| 1845 | getDeclaredMethods . . . in ''</div></li><li class="" style><div class="" style="padding:0px 5px;vertical-align:top;color:rgb(0,0,0);border-left:1px solid rgb(204,204,204);background-color:rgb(255,255,255);font-family:Consolas,Menlo,Monaco,'Lucida Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono',monospace,serif;line-height:21px">
| 46 | getLocked in org.codehaus.groovy.util.LazyReference</div></li><li class="" style><div class="" style="padding:0px 5px;vertical-align:top;color:rgb(0,0,0);border-left:1px solid rgb(204,204,204);background-color:rgb(255,255,255);font-family:Consolas,Menlo,Monaco,'Lucida Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono',monospace,serif;line-height:21px">
| 33 | get . . . . . . . . . . . in ''</div></li><li class="" style><div class="" style="padding:0px 5px;vertical-align:top;color:rgb(0,0,0);border-left:1px solid rgb(204,204,204);background-color:rgb(255,255,255);font-family:Consolas,Menlo,Monaco,'Lucida Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono',monospace,serif;line-height:21px">
| 64 | loadEngine in grails.drools6.DroolsService</div></li><li class="" style><div class="" style="padding:0px 5px;vertical-align:top;color:rgb(0,0,0);border-left:1px solid rgb(204,204,204);background-color:rgb(255,255,255);font-family:Consolas,Menlo,Monaco,'Lucida Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono',monospace,serif;line-height:21px">
| 8 | index . . . . . . . . . . in grails.drools6.DroolsController</div></li><li class="" style><div class="" style="padding:0px 5px;vertical-align:top;color:rgb(0,0,0);border-left:1px solid rgb(204,204,204);background-color:rgb(255,255,255);font-family:Consolas,Menlo,Monaco,'Lucida Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono',monospace,serif;line-height:21px">
| 195 | doFilter in grails.plugin.cache.web.filter.PageFragmentCachingFilter</div></li><li class="" style><div class="" style="padding:0px 5px;vertical-align:top;color:rgb(0,0,0);border-left:1px solid rgb(204,204,204);background-color:rgb(255,255,255);font-family:Consolas,Menlo,Monaco,'Lucida Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono',monospace,serif;line-height:21px">
| 63 | doFilter . . . . . . . . in grails.plugin.cache.web.filter.AbstractFilter</div></li><li class="" style><div class="" style="padding:0px 5px;vertical-align:top;color:rgb(0,0,0);border-left:1px solid rgb(204,204,204);background-color:rgb(255,255,255);font-family:Consolas,Menlo,Monaco,'Lucida Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono',monospace,serif;line-height:21px">
| 1145 | runWorker in java.util.concurrent.ThreadPoolExecutor</div></li><li class="" style><div class="" style="padding:0px 5px;vertical-align:top;color:rgb(0,0,0);border-left:1px solid rgb(204,204,204);background-color:rgb(255,255,255);font-family:Consolas,Menlo,Monaco,'Lucida Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono',monospace,serif;line-height:21px">
| 615 | run . . . . . . . . . . . in java.util.concurrent.ThreadPoolExecutor$Worker</div></li><li class="" style><div class="" style="padding:0px 5px;vertical-align:top;color:rgb(0,0,0);border-left:1px solid rgb(204,204,204);background-color:rgb(255,255,255);font-family:Consolas,Menlo,Monaco,'Lucida Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono',monospace,serif;line-height:21px">
^ 724 | run in java.lang.Thread</div></li></ol><br></div><div>{code}<br></div><div><br>do I need to configure custom (Grails) class loader to Kie ?<br><br></div></div>