1 Reply Latest reply on Nov 21, 2008 1:55 AM by Kannan Raghupathy

    Drools Exception

    Bindhu UK Newbie

      Hi All,

      I'm facing a problem when i have both *.drl and *.dsl. The following is the exception i'm facing.

      java.lang.IllegalArgumentException: Unable to use expander. Make sure a expander or dsl config is being passed to the parser. [ExpanderResolver was not set].
      at org.drools.lang.RuleParser.expander(Unknown Source)
      at org.drools.lang.RuleParser.prolog(Unknown Source)
      at org.drools.lang.RuleParser.compilation_unit(Unknown Source)
      at org.drools.compiler.DrlParser.compile(Unknown Source)
      at org.drools.compiler.DrlParser.parse(Unknown Source)
      at org.drools.compiler.DrlParser.parse(Unknown Source)
      at org.drools.compiler.PackageBuilder.addPackageFromDrl(Unknown Source)
      at com.livetrial.CreditExample.main(CreditExample.java:24)
      Exception in thread "main"


      In the main java class, i have the below codes:

      builder.addPackageFromDrl( new InputStreamReader(CreditExample.class.getResourceAsStream("/credit.drl" )) );
      builder.addPackageFromDrl( new InputStreamReader(CreditExample.class.getResourceAsStream("/credit.dsl" )) );

      Please guide me on how to resolve this problem.


      Thanks
      Bindhu