Hi guys,<br><br>I am converting a .brl file to a .drl file for loading to my rule base.<br>using following code:<br><p class="MsoNormal" style=""><font color="black" face="Courier New" size="2"><span style="font-size: 10pt;">File file = </span></font><b><font color="#7f0055" face="Courier New" size="2"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: rgb(127, 0, 85); font-weight: bold;">new</span></font></b><font color="black" face="Courier New" size="2"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"> File(rulesFiles); </span></font><font face="Courier New" size="2"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;"></span></font></p>


<p class="MsoNormal" style=""><font color="black" face="Courier New" size="2"><span style="font-size: 10pt;">            String brl = </span></font><b><font color="#7f0055" face="Courier New" size="2"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: rgb(127, 0, 85); font-weight: bold;">null</span></font></b><font color="black" face="Courier New" size="2"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;">;</span></font><font face="Courier New" size="2"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;"></span></font></p>


<p class="MsoNormal" style=""><font color="black" face="Courier New" size="2"><span style="font-size: 10pt;">            </span></font><b><font color="#7f0055" face="Courier New" size="2"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: rgb(127, 0, 85); font-weight: bold;">try</span></font></b><font color="black" face="Courier New" size="2"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;">{</span></font><font face="Courier New" size="2"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;"></span></font></p>


<p class="MsoNormal" style=""><font color="black" face="Courier New" size="2"><span style="font-size: 10pt;">                  BRXMLPersistence read = 
(BRXMLPersistence)
BRXMLPersistence.<i><span style="font-style: italic;">getInstance</span></i>();</span></font><font face="Courier New" size="2"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;"></span></font></p>

<p class="MsoNormal" style=""><font color="black" face="Courier New" size="2"><span style="font-size: 10pt;">                  BRDRLPersistence write = 
(BRDRLPersistence)
BRDRLPersistence.<i><span style="font-style: italic;">getInstance</span></i>();</span></font><font face="Courier New" size="2"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;"></span></font></p>

<p class="MsoNormal" style=""><font color="black" face="Courier New" size="2"><span style="font-size: 10pt;">                  brl = FileUtils.<i><span style="font-style: italic;">readFileToString</span></i>(file);
</span></font><font face="Courier New" size="2"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;"></span></font></p>

<p class="MsoNormal" style=""><font color="black" face="Courier New" size="2"><span style="font-size: 10pt;">                System.</span></font><i><font color="#0000c0" face="Courier New" size="2"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: rgb(0, 0, 192); font-style: italic;">out</span></font></i><font color="black" face="Courier New" size="2"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;">.println(</span></font><font color="#2a00ff" face="Courier New" size="2"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: rgb(42, 0, 255);">&quot;File
 content: &quot;</span></font><font color="black" face="Courier New" size="2"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"> + brl); </span></font><font face="Courier New" size="2"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;"></span></font></p>


<p class="MsoNormal" style=""><font color="black" face="Courier New" size="2"><span style="font-size: 10pt;">                String outputDRL =
write.marshal(read.unmarshal(brl));</span></font><font face="Courier New" size="2"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;"></span></font></p>

<p class="MsoNormal" style=""><font color="black" face="Courier New" size="2"><span style="font-size: 10pt;">                String drlFilePath = </span></font><font color="#2a00ff" face="Courier New" size="2"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: rgb(42, 0, 255);">&quot;drlFile.drl&quot;</span></font><font color="black" face="Courier New" size="2"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;">;</span></font><font face="Courier New" size="2"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;"></span></font></p>


<p class="MsoNormal" style=""><font color="black" face="Courier New" size="2"><span style="font-size: 10pt;">                File drlFile = </span></font><b><font color="#7f0055" face="Courier New" size="2"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: rgb(127, 0, 85); font-weight: bold;">new</span></font></b><font color="black" face="Courier New" size="2"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"> File(drlFilePath);</span></font><font face="Courier New" size="2"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;"></span></font></p>


<p class="MsoNormal" style=""><font color="black" face="Courier New" size="2"><span style="font-size: 10pt;">                FileUtils.<i><span style="font-style: italic;">writeStringToFile</span></i>(drlFile,
outputDRL);</span></font><font face="Courier New" size="2"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;"></span></font></p>

<p class="MsoNormal" style=""><font color="black" face="Courier New" size="2"><span style="font-size: 10pt;">                addRulesToThisPackage.addPackageFromDrl(</span></font><b><font color="#7f0055" face="Courier New" size="2"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: rgb(127, 0, 85); font-weight: bold;">new</span></font></b><font face="Courier New" size="2"><span style="font-size: 10pt;"></span></font></p>


<p class="MsoNormal" style=""><font color="black" face="Courier New" size="2"><span style="font-size: 10pt;">                        
 InputStreamReader(RuleRunner.</span></font><b><font color="#7f0055" face="Courier New" size="2"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: rgb(127, 0, 85); font-weight: bold;">class</span></font></b><font color="black" face="Courier New" size="2"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;">.getResourceAsStream(drlFilePath)));</span></font><font face="Courier New" size="2"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;"></span></font></p>


<p class="MsoNormal" style=""><font color="black" face="Courier New" size="2"><span style="font-size: 10pt;">            }</span></font><b><font color="#7f0055" face="Courier New" size="2"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: rgb(127, 0, 85); font-weight: bold;">catch</span></font></b><font color="black" face="Courier New" size="2"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"> (IOException e) {</span></font><font face="Courier New" size="2"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;"></span></font></p>


<p class="MsoNormal" style=""><font face="Courier New" size="2"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;"> </span></font></p>

<p class="MsoNormal" style=""><font color="black" face="Courier New" size="2"><span style="font-size: 10pt;">                  e.printStackTrace(); </span></font><font face="Courier New" size="2"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;"></span></font></p>


<p class="MsoNormal" style=""><font color="black" face="Courier New" size="2"><span style="font-size: 10pt;">             } </span></font><font face="Courier New" size="2"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;"></span></font></p>


<p class="MsoNormal"><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;"> </span></font></p><p class="MsoNormal"><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">I have downloaded <a href="http://org.apache.commons.io">org.apache.commons.io</a> package from <a href="http://commons.apache.org/io/download_io.cgi">http://commons.apache.org/io/download_io.cgi</a> site.</span></font></p>
<p class="MsoNormal"><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">It does not contain .jar file for </span></font><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;"> org.apache.commons.io.FileUtils. But contains .java file for the same.</span></font></p>
<p class="MsoNormal"><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">I add it to my classpath and add import </span></font><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;"> org.apache.commons.io.FileUtils to my import statements.</span></font></p>
<p class="MsoNormal"><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">But  I get this error: <br></span></font></p><p class="MsoNormal"><font color="red" face="Courier New" size="2"><span style="font-size: 10pt;">xception in thread &quot;main&quot; java.lang.Error: 
Unresolved
compilation problem: </span></font><font face="Courier New" size="2"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;"></span></font>

</p><p class="MsoNormal" style=""><font color="red" face="Courier New" size="2"><span style="font-size: 10pt;">      FileUtils cannot be resolved</span></font><font face="Courier New" size="2"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;"></span></font></p>


<p class="MsoNormal" style=""><font face="Courier New" size="2"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;"> </span></font></p>

<p class="MsoNormal" style=""><font color="red" face="Courier New" size="2"><span style="font-size: 10pt;">      at com.org.RuleRunner.loadRuleFile(</span></font><u><font color="navy" face="Courier New" size="2"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: navy;">RuleRunner.java:70</span></font></u><font color="red" face="Courier New" size="2"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: red;">)// </span></font><font face="Courier New" size="2"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;"></span></font></p>


<p class="MsoNormal" style=""><font color="red" face="Courier New" size="2"><span style="font-size: 10pt;">      at com.org.RuleRunner.loadRules(</span></font><u><font color="navy" face="Courier New" size="2"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: navy;">RuleRunner.java:45</span></font></u><font color="red" face="Courier New" size="2"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: red;">)</span></font><font face="Courier New" size="2"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;"></span></font></p>


<p class="MsoNormal" style=""><font color="red" face="Courier New" size="2"><span style="font-size: 10pt;">      at com.org.RuleRunner.runStatelessRules(</span></font><u><font color="navy" face="Courier New" size="2"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: navy;">RuleRunner.java:102</span></font></u><font color="red" face="Courier New" size="2"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: red;">)</span></font><font face="Courier New" size="2"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;"></span></font></p>


<p class="MsoNormal" style=""><font color="red" face="Courier New" size="2"><span style="font-size: 10pt;">      at com.org.RulesTest.main(</span></font><u><font color="navy" face="Courier New" size="2"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: navy;">RulesTest.java:40</span></font></u><font color="red" face="Courier New" size="2"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: red;">)</span></font></p>
Could some one please tell me if there is an alternative way for converting/loading .brl files (business guided rule) to my knowledge base ?<br>Or point me towards the correct download for <font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">org.apache.commons.io.FileUtils.<br>
<br><br>Please help me out. Thank you.<br>-M<br><br></span></font>