Hi,

 

I am getting an error reading .brl files.

Using this snippet of code for converting from brl to drl

import org.apache.commons.io.*; 
String fileName = "GuidedRule.brl"; 
File file = new File(fileName); 
String fileAsString         = FileUtils.readFileToString(file); 
                        
BRXMLPersistence read = (BRXMLPersistence) BRXMLPersistence.getInstance(); 
BRDRLPersistence write = (BRDRLPersistence) BRDRLPersistence.getInstance(); 
              
String outputDRL = write.marshal(read.unmarshal(fileAsString));
 String drlFilePath = "drlFile.drl";
 File drlFile = new File(drlFilePath);
 FileUtils.writeStringToFile(drlFile, outputDRL);
 builder.addPackageFromDrl(new
InputStreamReader(RuleRunner.class.getResourceAsStream(drlFilePath)));

 

 

For this, I added commons-logging-1.1.1.jar file to my classpath. But still FileUtils is not getting resolved.

SO am unable to use FileUtils to convert input to String format.

 

Is there any other way to do this??? Why am I getting the error even after adding the jar to my classpath???

 

Please Help,

Thank you.

M




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.