FYI

On Mon, Jun 7, 2010 at 7:25 PM, <rules-users-requ...@lists.jboss.org> wrote:

> Send rules-users mailing list submissions to
>        rules-users@lists.jboss.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
>        https://lists.jboss.org/mailman/listinfo/rules-users
> or, via email, send a message with subject or body 'help' to
>        rules-users-requ...@lists.jboss.org
>
> You can reach the person managing the list at
>        rules-users-ow...@lists.jboss.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of rules-users digest..."
>
>
> Today's Topics:
>
>   1. Re: Error Loading Multiple Input Files (Esteban Aliverti)
>   2. Re: Error Loading Multiple Input Files (Giovanni Motta)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Mon, 7 Jun 2010 10:54:47 -0300
> From: Esteban Aliverti <esteban.alive...@gmail.com>
> Subject: Re: [rules-users] Error Loading Multiple Input Files
> To: Rules Users List <rules-users@lists.jboss.org>
> Message-ID:
>        <aanlktili_nadyptvkisr-a9egwwfx1wvozj2mspx0...@mail.gmail.com>
> Content-Type: text/plain; charset="windows-1252"
>
> The code you pasted doesn't even compile. The first line is wrong.
> It looks to me that the problem you are experiencing has nothing to do with
> drools itself. You can't even open the input file using a simple
> FileReader... No drools api involved there. Make sure you have your inputs
> files in the right place.
>
> Best,
>
> 2010/6/7 Fnu Mahalakshmi <fmahalaks...@nyx.com>
>
> >  Hi Greg,
> >
> >
> >
> > I have my input files inside the src directory of my eclipse project.
> >
> >
> >
> > I am passing the files as follows:
> >
> > private static final String DATA_INPUT_FILE = new String []{
> "Input1.*txt*",
> > ?Input2.txt?};
> >
> >
> >
> > *private* *static* *final* String *DATA_OUTPUT_FILE* = "Output.1.txt";
> >
> >
> >
> > *private* *static* *final* String *RULES_FILES* = new String []
> {"Rule1.drl",
> > ?Rules2.drl?};
> >
> >
> >
> > *public* *static* *void* main(String[] args) *throws* Exception {
> >
> > BufferedReader input =  new BufferedReader(new
> > FileReader(DATA_INPUT_FILE));
> >
> >        Converter c = *new* Converter(DATA_INPUT_FILE); // this reads my
> > input files
> >
> >           Vector<Object> v  = *new* Vector<Object>();
> >
> >           v = c.getFactInput();                     // loads all
> > information contained in the input files
> >
> >
> >
> >           *new* RuleRunner().runStatelessRules(*RULES_FILES*,*null*, v,*
> > null*);                               FileOutputStream output = new
> > FileOutputStream(DATA_OUTPUT_FILE);
> >
> >
> >
> >
> >
> > Error Log:
> >
> >
> >
> > Exception in thread "main" *java.io.FileNotFoundException*: Input1.txt
> > (The system cannot find the file specified)
> >
> >       at java.io.FileInputStream.open(*Native Method*)
> >
> >       at java.io.FileInputStream.<init>(Unknown Source)
> >
> >       at java.io.FileInputStream.<init>(Unknown Source)
> >
> >       at java.io.FileReader.<init>(Unknown Source)
> >
> >       at com.org.RulesTest.main(*RulesTest.java:29*)
> >
> >
> >
> >
> >
> > Can you tell me why that happens??
> >
> > The file is present.
> >
> > Thanks.
> >
> > 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. *
> >
> >
> > _______________________________________________
> > rules-users mailing list
> > rules-users@lists.jboss.org
> > https://lists.jboss.org/mailman/listinfo/rules-users
> >
> >
>
>
> --
> XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
>
> Esteban Aliverti
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL:
> http://lists.jboss.org/pipermail/rules-users/attachments/20100607/c5cfedf7/attachment.html
>
> ------------------------------
>
> Message: 2
> Date: Mon, 7 Jun 2010 15:55:09 +0200
> From: Giovanni Motta <motta...@gmail.com>
> Subject: Re: [rules-users] Error Loading Multiple Input Files
> To: Rules Users List <rules-users@lists.jboss.org>
> Message-ID:
>        <aanlktikwe5kekssxt4vupcdav4k7nedtead-hnnz6...@mail.gmail.com>
> Content-Type: text/plain; charset="windows-1252"
>
> Not a drools question, i guess...
> If the files are in the src directory, you probably have to configure them
> including the path (e.g. "src/Input1.txt").
> When running a java class / junit, eclipse sets the project directory as
> the
> current directory, so if you want to reach a file, you must supply the path
> from there.
> Hope it helps.
>
> 2010/6/7 Fnu Mahalakshmi <fmahalaks...@nyx.com>
>
> >  Hi Greg,
> >
> >
> >
> > I have my input files inside the src directory of my eclipse project.
> >
> >
> >
> > I am passing the files as follows:
> >
> > private static final String DATA_INPUT_FILE = new String []{
> "Input1.*txt*",
> > ?Input2.txt?};
> >
> >
> >
> > *private* *static* *final* String *DATA_OUTPUT_FILE* = "Output.1.txt";
> >
> >
> >
> > *private* *static* *final* String *RULES_FILES* = new String []
> {"Rule1.drl",
> > ?Rules2.drl?};
> >
> >
> >
> > *public* *static* *void* main(String[] args) *throws* Exception {
> >
> > BufferedReader input =  new BufferedReader(new
> > FileReader(DATA_INPUT_FILE));
> >
> >        Converter c = *new* Converter(DATA_INPUT_FILE); // this reads my
> > input files
> >
> >           Vector<Object> v  = *new* Vector<Object>();
> >
> >           v = c.getFactInput();                     // loads all
> > information contained in the input files
> >
> >
> >
> >           *new* RuleRunner().runStatelessRules(*RULES_FILES*,*null*, v,*
> > null*);                               FileOutputStream output = new
> > FileOutputStream(DATA_OUTPUT_FILE);
> >
> >
> >
> >
> >
> > Error Log:
> >
> >
> >
> > Exception in thread "main" *java.io.FileNotFoundException*: Input1.txt
> > (The system cannot find the file specified)
> >
> >       at java.io.FileInputStream.open(*Native Method*)
> >
> >       at java.io.FileInputStream.<init>(Unknown Source)
> >
> >       at java.io.FileInputStream.<init>(Unknown Source)
> >
> >       at java.io.FileReader.<init>(Unknown Source)
> >
> >       at com.org.RulesTest.main(*RulesTest.java:29*)
> >
> >
> >
> >
> >
> > Can you tell me why that happens??
> >
> > The file is present.
> >
> > Thanks.
> >
> > 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. *
> >
> >
> > _______________________________________________
> > rules-users mailing list
> > rules-users@lists.jboss.org
> > https://lists.jboss.org/mailman/listinfo/rules-users
> >
> >
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL:
> http://lists.jboss.org/pipermail/rules-users/attachments/20100607/18f68994/attachment.html
>
> ------------------------------
>
> _______________________________________________
> rules-users mailing list
> rules-users@lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
>
> End of rules-users Digest, Vol 43, Issue 27
> *******************************************
>



-- 
Amit  Bhardwaj
_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users

Reply via email to