Hi guys,


In my program I have couple of .brl, .drl and .dslr files which get added to the rulebase.


Now my .brl files get converted to drl files and then have to be added to the rulebase.


After creating my .drl or .dslr file I am using this code to update the resources in my change-set.xml

ResourceChangeScannerConfiguration sconf = ResourceFactory.getResourceChangeScannerService().newResourceChangeScannerConfiguration();

sconf.setProperty( "drools.resource.scanner.interval",

                   "30" ); // set the disk scanning interval to 30s, default is 60s

ResourceFactory.getResourceChangeScannerService().configure( sconf );


KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder();

kbuilder.add( ResourceFactory.newClassPathResource( "change-set.xml", getClass()),ResourceType.CHANGE_SET );

if ( kbuilder.hasErrors() ) {

   System.err.println( kbuilder.getErrors().toString() );



Now as per my understanding:

Since a new .drl file has been just created – the resource notifier will update my change-set.xml file of the change.


Now I need to load this new file to my rulebase along with my dsl file.


kbuilder.add( ResourceFactory.newClassPathResource( "change-set.xml", getClass()),ResourceType.CHANGE_SET );


is adding my new created file to my knowledge pacakage.

How can I specify my dsl file also to be added along with it???


I also keep getting the following error when I run the program:


Exception in thread "main" java.lang.NoSuchMethodError: org.drools.compiler.PackageBuilder.addKnowledgeResource(Lorg/drools/io/Resource;Lorg/drools/builder/ResourceType;Lorg/drools/builder/ResourceConfiguration;)V

      at org.drools.builder.impl.KnowledgeBuilderImpl.add(KnowledgeBuilderImpl.java:30)

      at com.org.RuleRunner.loadRules(RuleRunner.java:75)

      at com.org.RuleRunner.runStatelessRules(RuleRunner.java:155)

      at com.org.RulesTest.main(RulesTest.java:40)

Is my drools-compiler.jar not having the correct information required???? How can I change that??


Can you please guide me in the right direction..??

Please help.


Thank you.


Please consider the environment before printing this email.

Visit our website at http://www.nyse.com
Note: The information contained in this message and any attachment to it is privileged, confidential and protected from disclosure. If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify the sender immediately by replying to the message, and please delete it from your system. Thank you. NYSE Euronext.