Changed the loading order and now I get the following:<br><br>Exception in thread &quot;main&quot; java.lang.ExceptionInInitializerError<br>&nbsp;&nbsp;&nbsp; at com.circuitcity.rtvcrms.test.MainBasedTester.testRules(MainBasedTester.java
:31)<br>&nbsp;&nbsp;&nbsp; at com.circuitcity.rtvcrms.test.MainBasedTester.main(MainBasedTester.java:23)<br>Caused by: java.lang.RuntimeException: Failure loading the Rules<br>&nbsp;&nbsp;&nbsp; at com.circuitcity.rtvcrms.rules.RtvDecisionEngine.&lt;clinit&gt;(
RtvDecisionEngine.java:47)<br>&nbsp;&nbsp;&nbsp; ... 2 more<br>Caused by: org.drools.rule.InvalidRulePackage: [1,0]: unknown:1:0 required (...)+ loop (decision=2) did not match anything; token=[@0,0:6=&#39;created&#39;,&lt;8&gt;,1:0]<br>
&nbsp;&nbsp;&nbsp; at org.drools.rule.Package.checkValidity(Package.java:409)<br>&nbsp;&nbsp;&nbsp; at org.drools.common.AbstractRuleBase.addPackage(AbstractRuleBase.java:262)<br>&nbsp;&nbsp;&nbsp; at com.circuitcity.rtvcrms.rules.RtvDecisionEngine.&lt;clinit&gt;(RtvDecisionEngine.java
:43)<br>&nbsp;&nbsp;&nbsp; ... 2 more<br><br><div><span class="gmail_quote">On 7/6/07, <b class="gmail_sendername">Ronald R. DiFrango</b> &lt;<a href="mailto:ron.difrango@gmail.com">ron.difrango@gmail.com</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I am getting the following exception all of a sudden:<br><br>Exception in thread &quot;main&quot; java.lang.ExceptionInInitializerError<br>&nbsp;&nbsp;&nbsp; at com.circuitcity.rtvcrms.test.MainBasedTester.testRules(MainBasedTester.java
:31)
<br>&nbsp;&nbsp;&nbsp; at com.circuitcity.rtvcrms.test.MainBasedTester.main(MainBasedTester.java:23)<br>Caused by: java.lang.RuntimeException: Failure loading the Rules<br>&nbsp;&nbsp;&nbsp; at com.circuitcity.rtvcrms.rules.RtvDecisionEngine.&lt;clinit&gt;(
RtvDecisionEngine.java:47)<br>&nbsp;&nbsp;&nbsp; ... 2 more<br>Caused by: org.drools.compiler.PackageBuilder$MissingPackageNameException: Missing package name for rule package.<br>&nbsp;&nbsp;&nbsp; at org.drools.compiler.PackageBuilder.validatePackageName

(PackageBuilder.java:278)<br>&nbsp;&nbsp;&nbsp; at org.drools.compiler.PackageBuilder.addPackage(PackageBuilder.java:214)<br>&nbsp;&nbsp;&nbsp; at org.drools.compiler.PackageBuilder.addPackageFromDrl(PackageBuilder.java:147)<br>&nbsp;&nbsp;&nbsp; at com.circuitcity.rtvcrms.rules.RtvDecisionEngine

.&lt;clinit&gt;(RtvDecisionEngine.java:40)<br>&nbsp;&nbsp;&nbsp; ... 2 more<br><br><br>Here are my DRL files:<br><br>created on: Dec 7, 2006<br>package com.circuitcity.rtvcrms.rules<br><br>#list any import classes here.<br>import java.math.BigDecimal

;<br>import java.math.BigInteger;<br>import com.circuitcity.rtvcrms.bw.Constants;<br>import com.circuitcity.rtvcrms.bw.DocumentTypes;<br>import com.circuitcity.rtvcrms.bw.StatusConstants;<br><br>import com.circuitcity.rtvcrms.Adjustment

;<br>import com.circuitcity.rtvcrms.DetailLine;<br>import com.circuitcity.rtvcrms.EffectivePrice;<br>import com.circuitcity.rtvcrms.RepaymentCode;<br>import com.circuitcity.rtvcrms.MatchingOutput;<br><br>#declare any global variables here
<br>global java.util.List matchedList;<br><br>rule &quot;CM Qty EQ RTV Qty&quot;<br>&nbsp;&nbsp;&nbsp; salience 10<br>&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; when<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; cmDetailLine : DetailLine(cmNumber != null, lineNumber != null,&nbsp; status != StatusConstants.MATCHED

, cmRtvNumber : cmRtvNumber, cmBrand : brand , cmModel : model, cmQuantity : availableQuantity&nbsp; )<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; rtvDetailLine : DetailLine(rtvNumber != null, rtvNumber == cmRtvNumber, lineNumber != null, status != StatusConstants.MATCHED

, brand == cmBrand, model == cmModel, availableQuantity == cmQuantity ) <br>&nbsp;&nbsp;&nbsp; then <br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; System.out.println(StatusConstants.MATCHED);<br><br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; MatchingOutput output =<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; buildMatchingOutput(<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; 
rtvDetailLine.getBrand(),<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; rtvDetailLine.getClazz(),<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; cmDetailLine.getLineNumber(),<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; cmDetailLine.getCmNumber(),<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; (String)null, // defTag<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; 
rtvDetailLine.getEffectivePrice(),<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; (BigDecimal)null, // keyRecNo<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; rtvDetailLine.getItemCost(),<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; rtvDetailLine.getAvailableQuantity(),<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; rtvDetailLine.getModel

(),<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; (String)null, // originalRepaymentCode<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; (BigDecimal)null, // rrLineNumber<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; rtvDetailLine.getLineNumber(),<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; rtvDetailLine.getRtvNumber(),<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; 
StatusConstants.MATCHED,<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; DocumentTypes.RTV_CM,<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; (String)null); // vendorNumber<br><br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; matchedList.add(output);<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; cmDetailLine.setAvailableQuantity(Constants.NO_MORE_QUANTITY

);<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; cmDetailLine.setStatus(StatusConstants.MATCHED);<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; rtvDetailLine.setAvailableQuantity(Constants.NO_MORE_QUANTITY);<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; rtvDetailLine.setStatus(StatusConstants.MATCHED);<br>end<br><br>rule &quot;RNR Qty EQ RTV Qty&quot;
<br>&nbsp;&nbsp;&nbsp; salience 10<br>&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; when<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; rnrDetailLine : DetailLine(keyRecNo != null, lineNumber != null, status != StatusConstants.MATCHED, cmRtvNumber : cmRtvNumber, cmBrand : brand , cmModel : model, cmQuantity : availableQuantity&nbsp;&nbsp; )
<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; rtvDetailLine : DetailLine(rtvNumber != null, rtvNumber == cmRtvNumber, lineNumber != null, status != StatusConstants.MATCHED, brand == cmBrand, model == cmModel, availableQuantity == cmQuantity )<br>&nbsp;&nbsp;&nbsp; then 
<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; System.out.println(StatusConstants.MATCHED);<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; MatchingOutput output =<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; buildMatchingOutput(<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; rtvDetailLine.getBrand(),<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; rtvDetailLine.getClazz

(),<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; (BigDecimal)null, // cmDetailLine.getLineNumber(),<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; (String)null, // cmDetailLine.getCmNumber(),<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; (String)null, // defTag<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; rtvDetailLine.getEffectivePrice

(),<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; rnrDetailLine.getKeyRecNo(), // keyRecNo<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; rtvDetailLine.getItemCost(),<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; rtvDetailLine.getAvailableQuantity(),<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; rtvDetailLine.getModel(),<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; (String)null, // originalRepaymentCode
<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; rnrDetailLine.getLineNumber(), // rrLineNumber<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; rtvDetailLine.getLineNumber(),<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; rtvDetailLine.getRtvNumber(),<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; StatusConstants.MATCHED,<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; 
DocumentTypes.RTV_RR,<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; (String)null); // vendorNumber<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; matchedList.add(output);<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; rnrDetailLine.setAvailableQuantity(Constants.NO_MORE_QUANTITY);<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; 
rnrDetailLine.setStatus(StatusConstants.MATCHED);<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; rtvDetailLine.setAvailableQuantity(Constants.NO_MORE_QUANTITY);<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; rtvDetailLine.setStatus(StatusConstants.MATCHED);<br>end<br><br>#created on: Apr 10, 2007
<br>package com.circuitcity.rtvcrms.rules<br><br>#list any import classes here.<br>import java.math.BigDecimal;<br><br>import com.circuitcity.rtvcrms.bw.ModelDiscrepancyOutput;<br>import com.circuitcity.rtvcrms.bw.StatusConstants

;<br>import com.circuitcity.rtvcrms.Adjustment;<br>import com.circuitcity.rtvcrms.DetailLine;<br>import com.circuitcity.rtvcrms.RepaymentCode;<br>import com.circuitcity.rtvcrms.MatchingOutput;<br>import org.drools.WorkingMemory

;<br>import org.drools.QueryResults;<br>import org.drools.QueryResult;<br>import java.util.Iterator;<br><br>#declare any global variables here<br><br>rule &quot;Sum CM&quot;<br>&nbsp;&nbsp;&nbsp; salience 90<br>&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; when<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; mdOutput : ModelDiscrepancyOutput ()
<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; repaymentCode : RepaymentCode( code == &quot;MD&quot;)<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; cmAdjustment : Adjustment(cmNumber != null, lineNumber != null, originalRepaymentCode == &quot;MD&quot; )<br>&nbsp;&nbsp;&nbsp; then<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; System.out.println

(&quot;Sum CM&quot;); <br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; mdOutput.setSumCmAndRnr(cmAdjustment.getAvailableQuantity());<br>end<br><br>Any thoughts?<br>
</blockquote></div><br>