FYI<br><br>
<div class="gmail_quote">On Mon, Jun 7, 2010 at 7:25 PM, <span dir="ltr"><<a href="mailto:rules-users-request@lists.jboss.org">rules-users-request@lists.jboss.org</a>></span> wrote:<br>
<blockquote style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" class="gmail_quote">Send rules-users mailing list submissions to<br> <a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
<br>To subscribe or unsubscribe via the World Wide Web, visit<br> <a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>or, via email, send a message with subject or body 'help' to<br>
<a href="mailto:rules-users-request@lists.jboss.org">rules-users-request@lists.jboss.org</a><br><br>You can reach the person managing the list at<br> <a href="mailto:rules-users-owner@lists.jboss.org">rules-users-owner@lists.jboss.org</a><br>
<br>When replying, please edit your Subject line so it is more specific<br>than "Re: Contents of rules-users digest..."<br><br><br>Today's Topics:<br><br> 1. Re: Error Loading Multiple Input Files (Esteban Aliverti)<br>
2. Re: Error Loading Multiple Input Files (Giovanni Motta)<br><br><br>----------------------------------------------------------------------<br><br>Message: 1<br>Date: Mon, 7 Jun 2010 10:54:47 -0300<br>From: Esteban Aliverti <<a href="mailto:esteban.aliverti@gmail.com">esteban.aliverti@gmail.com</a>><br>
Subject: Re: [rules-users] Error Loading Multiple Input Files<br>To: Rules Users List <<a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a>><br>Message-ID:<br> <<a href="mailto:AANLkTilI_naDypTVkiSr-a9EGwwfX1WvoZj2mspX0zJR@mail.gmail.com">AANLkTilI_naDypTVkiSr-a9EGwwfX1WvoZj2mspX0zJR@mail.gmail.com</a>><br>
Content-Type: text/plain; charset="windows-1252"<br><br>The code you pasted doesn't even compile. The first line is wrong.<br>It looks to me that the problem you are experiencing has nothing to do with<br>drools itself. You can't even open the input file using a simple<br>
FileReader... No drools api involved there. Make sure you have your inputs<br>files in the right place.<br><br>Best,<br><br>2010/6/7 Fnu Mahalakshmi <<a href="mailto:FMahalakshmi@nyx.com">FMahalakshmi@nyx.com</a>><br>
<br>> Hi Greg,<br>><br>><br>><br>> I have my input files inside the src directory of my eclipse project.<br>><br>><br>><br>> I am passing the files as follows:<br>><br>> private static final String DATA_INPUT_FILE = new String []{ "Input1.*txt*",<br>
> ?Input2.txt?};<br>><br>><br>><br>> *private* *static* *final* String *DATA_OUTPUT_FILE* = "Output.1.txt";<br>><br>><br>><br>> *private* *static* *final* String *RULES_FILES* = new String [] {"Rule1.drl",<br>
> ?Rules2.drl?};<br>><br>><br>><br>> *public* *static* *void* main(String[] args) *throws* Exception {<br>><br>> BufferedReader input = new BufferedReader(new<br>> FileReader(DATA_INPUT_FILE));<br>
><br>> Converter c = *new* Converter(DATA_INPUT_FILE); // this reads my<br>> input files<br>><br>> Vector<Object> v = *new* Vector<Object>();<br>><br>> v = c.getFactInput(); // loads all<br>
> information contained in the input files<br>><br>><br>><br>> *new* RuleRunner().runStatelessRules(*RULES_FILES*,*null*, v,*<br>> null*); FileOutputStream output = new<br>
> FileOutputStream(DATA_OUTPUT_FILE);<br>><br>><br>><br>><br>><br>> Error Log:<br>><br>><br>><br>> Exception in thread "main" *java.io.FileNotFoundException*: Input1.txt<br>> (The system cannot find the file specified)<br>
><br>> at java.io.FileInputStream.open(*Native Method*)<br>><br>> at java.io.FileInputStream.<init>(Unknown Source)<br>><br>> at java.io.FileInputStream.<init>(Unknown Source)<br>
><br>> at java.io.FileReader.<init>(Unknown Source)<br>><br>> at com.org.RulesTest.main(*RulesTest.java:29*)<br>><br>><br>><br>><br>><br>> Can you tell me why that happens??<br>
><br>> The file is present.<br>><br>> Thanks.<br>><br>> M<br>><br>> ------------------------------<br>><br>> *Please consider the environment before printing this email.*<br>><br>> *Visit our website at <a href="http://www.nyse.com/" target="_blank">http://www.nyse.com</a><br>
> *****************************************************************************<br>><br>> Note: The information contained in this message and any attachment to it is<br>> privileged, confidential and protected from disclosure. If the reader of<br>
> this message is not the intended recipient, or an employee or agent<br>> responsible for delivering this message to the intended recipient, you are<br>> hereby notified that any dissemination, distribution or copying of this<br>
> communication is strictly prohibited. If you have received this<br>> communication in error, please notify the sender immediately by replying to<br>> the message, and please delete it from your system. Thank you. NYSE<br>
> Euronext. *<br>><br>><br>> _______________________________________________<br>> rules-users mailing list<br>> <a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>> <a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
><br>><br><br><br>--<br>XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX<br><br>Esteban Aliverti<br>-------------- next part --------------<br>An HTML attachment was scrubbed...<br>URL: <a href="http://lists.jboss.org/pipermail/rules-users/attachments/20100607/c5cfedf7/attachment.html" target="_blank">http://lists.jboss.org/pipermail/rules-users/attachments/20100607/c5cfedf7/attachment.html</a><br>
<br>------------------------------<br><br>Message: 2<br>Date: Mon, 7 Jun 2010 15:55:09 +0200<br>From: Giovanni Motta <<a href="mailto:mottagio@gmail.com">mottagio@gmail.com</a>><br>Subject: Re: [rules-users] Error Loading Multiple Input Files<br>
To: Rules Users List <<a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a>><br>Message-ID:<br> <<a href="mailto:AANLkTikWe5KEKSSxT4vuPCDav4k7NedTeAD-HNNz6Aa1@mail.gmail.com">AANLkTikWe5KEKSSxT4vuPCDav4k7NedTeAD-HNNz6Aa1@mail.gmail.com</a>><br>
Content-Type: text/plain; charset="windows-1252"<br><br>Not a drools question, i guess...<br>If the files are in the src directory, you probably have to configure them<br>including the path (e.g. "src/Input1.txt").<br>
When running a java class / junit, eclipse sets the project directory as the<br>current directory, so if you want to reach a file, you must supply the path<br>from there.<br>Hope it helps.<br><br>2010/6/7 Fnu Mahalakshmi <<a href="mailto:FMahalakshmi@nyx.com">FMahalakshmi@nyx.com</a>><br>
<br>> Hi Greg,<br>><br>><br>><br>> I have my input files inside the src directory of my eclipse project.<br>><br>><br>><br>> I am passing the files as follows:<br>><br>> private static final String DATA_INPUT_FILE = new String []{ "Input1.*txt*",<br>
> ?Input2.txt?};<br>><br>><br>><br>> *private* *static* *final* String *DATA_OUTPUT_FILE* = "Output.1.txt";<br>><br>><br>><br>> *private* *static* *final* String *RULES_FILES* = new String [] {"Rule1.drl",<br>
> ?Rules2.drl?};<br>><br>><br>><br>> *public* *static* *void* main(String[] args) *throws* Exception {<br>><br>> BufferedReader input = new BufferedReader(new<br>> FileReader(DATA_INPUT_FILE));<br>
><br>> Converter c = *new* Converter(DATA_INPUT_FILE); // this reads my<br>> input files<br>><br>> Vector<Object> v = *new* Vector<Object>();<br>><br>> v = c.getFactInput(); // loads all<br>
> information contained in the input files<br>><br>><br>><br>> *new* RuleRunner().runStatelessRules(*RULES_FILES*,*null*, v,*<br>> null*); FileOutputStream output = new<br>
> FileOutputStream(DATA_OUTPUT_FILE);<br>><br>><br>><br>><br>><br>> Error Log:<br>><br>><br>><br>> Exception in thread "main" *java.io.FileNotFoundException*: Input1.txt<br>> (The system cannot find the file specified)<br>
><br>> at java.io.FileInputStream.open(*Native Method*)<br>><br>> at java.io.FileInputStream.<init>(Unknown Source)<br>><br>> at java.io.FileInputStream.<init>(Unknown Source)<br>
><br>> at java.io.FileReader.<init>(Unknown Source)<br>><br>> at com.org.RulesTest.main(*RulesTest.java:29*)<br>><br>><br>><br>><br>><br>> Can you tell me why that happens??<br>
><br>> The file is present.<br>><br>> Thanks.<br>><br>> M<br>><br>> ------------------------------<br>><br>> *Please consider the environment before printing this email.*<br>><br>> *Visit our website at <a href="http://www.nyse.com/" target="_blank">http://www.nyse.com</a><br>
> *****************************************************************************<br>><br>> Note: The information contained in this message and any attachment to it is<br>> privileged, confidential and protected from disclosure. If the reader of<br>
> this message is not the intended recipient, or an employee or agent<br>> responsible for delivering this message to the intended recipient, you are<br>> hereby notified that any dissemination, distribution or copying of this<br>
> communication is strictly prohibited. If you have received this<br>> communication in error, please notify the sender immediately by replying to<br>> the message, and please delete it from your system. Thank you. NYSE<br>
> Euronext. *<br>><br>><br>> _______________________________________________<br>> rules-users mailing list<br>> <a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>> <a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
><br>><br>-------------- next part --------------<br>An HTML attachment was scrubbed...<br>URL: <a href="http://lists.jboss.org/pipermail/rules-users/attachments/20100607/18f68994/attachment.html" target="_blank">http://lists.jboss.org/pipermail/rules-users/attachments/20100607/18f68994/attachment.html</a><br>
<br>------------------------------<br><br>_______________________________________________<br>rules-users mailing list<br><a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br><a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
<br><br>End of rules-users Digest, Vol 43, Issue 27<br>*******************************************<br></blockquote></div><br><br clear="all"><br>-- <br>Amit Bhardwaj<br><br>