Re: [rules-users] Drools 5.1.0.M2 - BPMN2 process issue - Eclipse plugin. -- The method getTextContent() is undefined for the type Node
by Vijay K Pandey
I created a sample project to run a very simple rule flow (BPMN process), I got the similar error which the plugin is reporting. My env is SUN JDK 6. Here is the exception I get? Any clue guys.
Exception in thread "main" java.lang.Error: Unresolved compilation problems:
The method getTextContent() is undefined for the type Node
The method getTextContent() is undefined for the type Node
at org.drools.bpmn2.xml.StartEventHandler.handleNode(StartEventHandler.java:46)
at org.drools.bpmn2.xml.AbstractNodeHandler.end(AbstractNodeHandler.java:77)
at org.drools.xml.ExtensibleXmlParser.endElement(ExtensibleXmlParser.java:420)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(AbstractSAXParser.java:601)
at com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(AbstractXMLDocumentParser.java:180)
at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.emptyElement(XMLSchemaValidator.java:739)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:377)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2755)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:648)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:140)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:511)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:808)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:119)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:395)
at org.drools.xml.ExtensibleXmlParser.read(ExtensibleXmlParser.java:295)
at org.drools.xml.ExtensibleXmlParser.read(ExtensibleXmlParser.java:174)
at org.drools.compiler.xml.XmlProcessReader.read(XmlProcessReader.java:44)
at org.drools.compiler.ProcessBuilder.addProcessFromFile(ProcessBuilder.java:222)
at org.drools.compiler.PackageBuilder.addProcessFromXml(PackageBuilder.java:415)
at org.drools.compiler.PackageBuilder.addKnowledgeResource(PackageBuilder.java:475)
at org.drools.compiler.PackageBuilder.addKnowledgeResource(PackageBuilder.java:517)
at org.drools.builder.impl.KnowledgeBuilderImpl.add(KnowledgeBuilderImpl.java:28)
Thanks
Vijay
From: Vijay K Pandey
Sent: Sunday, June 06, 2010 11:43 PM
To: Rules Users List
Subject: Drools 5.1.0.M2 - BPMN2 process issue - Eclipse plugin. -- The method getTextContent() is undefined for the type Node
Hi,
I just downloaded the Drools 5.1.0.M2 (have been using the snapshot version of around 16th April 2010) - created a sample "rule flow file(start-->user task-->end) - bpmn2 version". But when I clicked the file to open it gave the following error (image attached)
"The method getTextContent() is undefined for the type Node" .
I understand this error is related to org.w3c.dom.Node where this method was added as part of DOM Level 3 and available in JDK 5+ . My project and eclipse is configured against JDK 6+ . Not sure why this error with M2.
May be it is because of the drools-bpmn2.jar included in the drools eclipse plugin? Can someone shed some light that where it might be going wrong.
[cid:image001.png@01CB0668.994E92E0]
Thanks
Vijay
14 years, 5 months
Fusion: Group By
by Andreas Bauer
Hi,
I was wondering how you can achieve a "group by" like this
select tickDataFeed, stddev(price)
from StockTickEvent(symbol='IBM').win:length(10)
where volume > 1000
group by tickDataFeed
having stddev(price) > 0.8
I thought of using accumulate or collect, but I'm not sure of the exact syntax. What I tried up to now
rule "test"
when
$event : CountEvent() over window:time( 15s ) from entry-point "Stream"
$grouped : Integer() from accumulate (CountEvent($c1:count), count($c1))
then ...
But that doesn't work. Any hints?
Best regards,
Andi
--
GMX DSL: Internet-, Telefon- und Handy-Flat ab 19,99 EUR/mtl.
Bis zu 150 EUR Startguthaben inklusive! http://portal.gmx.net/de/go/dsl
14 years, 5 months
Re: [rules-users] Multiple Object Referencing error
by Fnu Mahalakshmi
Hi David,
I am giving it the input exactly as I put up. It seems to be fine.
Could it be because there are new objects of room formed even though the attributes they hold are similar???
Thank you
M
-----Original Message-----
From: rules-users-bounces(a)lists.jboss.org [mailto:rules-users-bounces@lists.jboss.org] On Behalf Of rules-users-request(a)lists.jboss.org
Sent: Monday, June 07, 2010 5:12 PM
To: rules-users(a)lists.jboss.org
Subject: rules-users Digest, Vol 43, Issue 31
Send rules-users mailing list submissions to
rules-users(a)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-request(a)lists.jboss.org
You can reach the person managing the list at
rules-users-owner(a)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: Exception using persistence (Robert)
2. Multiple Object Referencing problem (Fnu Mahalakshmi)
3. Re: Multiple Object Referencing problem (David Sinclair)
----------------------------------------------------------------------
Message: 1
Date: Mon, 07 Jun 2010 20:49:45 +0200
From: Robert <robert.weissmann(a)web.de>
Subject: Re: [rules-users] Exception using persistence
To: "Rules Users List" <rules-users(a)lists.jboss.org>, "Mark Proctor"
<mproctor(a)codehaus.org>, "PAYET, Manuel" <manuel.payet(a)capgemini.com>
Message-ID: <op.vdx087wrgqrarf(a)ntnbrwe.rgb.systemagmbh.de>
Content-Type: text/plain; charset=iso-8859-15; format=flowed;
delsp=yes
For additional information:
JPAKnowledgeService.newStatefulKnowledgeSession uses
org.drools.persistence.session.SingleSessionCommandService
where "java:comp/UserTransaction" is used (I checked the drools source
code). Looks like there is no way to change this.
I just wonder that I am the only one having this problem.
As I said "comp/UserTransaction" works, but "java:comp/UserTransaction"
doesn't, but in the docs "java:comp/UserTransaction" is used !?!?!?
Cheers, Rob.
Am 07.06.2010, 16:22 Uhr, schrieb PAYET, Manuel
<manuel.payet(a)capgemini.com>:
> It's probably that your transaction manager, for an odd reason, doesn't
> bind with the good name;
> You can do the following workaround:
>
> Final InitialContext initContext = new InitialContext();
> initContext.bind("java:comp/UserTransaction",initContext.lookup("comp/UserTransaction"));
>
> And voila, those two jndi name should point to the same object.
>
> I stress the fact that what I've written hasn't been tested.
>
> -----Message d'origine-----
> De : rules-users-bounces(a)lists.jboss.org
> [mailto:rules-users-bounces@lists.jboss.org] De la part de Robert
> Envoy? : lundi 7 juin 2010 16:16
> ? : rules-users(a)lists.jboss.org; Mark Proctor
> Objet : Re: [rules-users] Exception using persistence
>
> Hi,
>
> still struggling with this one (see below),
>
> but I did a slide change in the test-code
>
> try {
> val env = new java.util.Hashtable[String, String]
> env.put(Context.INITIAL_CONTEXT_FACTORY,
> "bitronix.tm.jndi.BitronixInitialContextFactory")
> val ctx = new InitialContext(env)
> val ut1 : UserTransaction = (ctx.lookup(
> "java:comp/UserTransaction")).asInstanceOf[UserTransaction]
> } catch {
> case ex: Exception => ex.printStackTrace()
> }
>
> (Sorry, code is in Scala, but should not be a problem to read it).
>
> Instead of "java:comp/UserTransaction" (as written in the docs) I wrote
> "comp/UserTransaction" and it works.
>
> But since this is some test-code and I am able to do the look-up as I
> want ("comp/UserTransaction"), as soon as I use
>
>
> JPAKnowledgeService.newStatefulKnowledgeSession( kbase, null, env )
>
>
> I have no influence anymore (its drools-code ;-) and it looks like its
> using internally "java:comp/UserTransaction".
>
>
> Is there any way to change this (setting it) ?
>
> Cheers, Rob
>
>
>
> Am 01.06.2010, 23:54 Uhr, schrieb Robert <robert.weissmann(a)web.de>:
>
>> Well, I tried this but it does not work.
>>
>> Checking additionally the BitronixInitialContextFactory API where it
>> says:
>>
>> ---------------------------------------------
>> "Implementation of InitialContextFactory that allows lookup of
>> transaction manager and registered resources.
>>
>> The easiest way to use this provider is to create a jndi.properties
>> file in your classpath with this content:
>> java.naming.factory.initial=bitronix.tm.jndi.BitronixInitialContextFac
>> tory Alternatively, you can create a InitialContext object with an
>> environment pointing to this class:
>> Hashtable env = new Hashtable();
>> env.put(Context.INITIAL_CONTEXT_FACTORY,
>> "bitronix.tm.jndi.BitronixInitialContextFactory");
>> Context ctx = new InitialContext(env);
>>
>> The transaction manager can be looked up at the standard URL
>> java:comp/UserTransaction while resources can be looked up using their
>> unique name as set in ResourceBean.getUniqueName(). "
>> ---------------------------------------------
>>
>>
>> So, I tried the following ( Its in Scala, but shouldn't be a problem
>> to
>> read):
>>
>> try {
>> val env = new java.util.Hashtable[String, String]
>> env.put(Context.INITIAL_CONTEXT_FACTORY,
>> "bitronix.tm.jndi.BitronixInitialContextFactory");
>> val ctx = new InitialContext(env);
>> val ut1 : UserTransaction = (ctx.lookup(
>> "java:comp/UserTransaction"
>> )).asInstanceOf[UserTransaction]
>> } catch {
>> case ex: Exception => ex.printStackTrace()
>> }
>>
>>
>> But still getting the same problem as before at line "val ut1 : ...".
>>
>> What I do not get is that the Bitronix API says that the standard URL
>> is "java:comp/UserTransaction", but its somehow not found !?!?!?
>>
>> Any ideas ?
>>
>> Cheers, Rob.
>>
>>
>>
>> Am 31.05.2010, 02:54 Uhr, schrieb Mark Proctor <mproctor(a)codehaus.org>:
>>
>>> On 30/05/2010 20:28, Robert wrote:
>>>> Hi, I followed the instructions on setting up the persistence in the
>>>> drools flow doc, but I get the following exception:
>>>>
>>>>
>>>> Exception in thread "main" java.lang.RuntimeException: Could not
>>>> commit session
>>>> at
>>>> org.drools.persistence.session.SingleSessionCommandService.<init>(SingleSessionCommandService.java:133)
>>>> at
>>>> org.drools.persistence.jpa.impl.JPAKnowledgeServiceProviderImpl.newStatefulKnowledgeSession(JPAKnowledgeServiceProviderImpl.java:44)
>>>> at
>>>> org.drools.persistence.jpa.JPAKnowledgeService.newStatefulKnowledgeSession(JPAKnowledgeService.java:93)
>>>> at
>>>> com.rob.server.core.process.drools.tasks.DroolsProcessHandler.<init>(DroolsProcessHandler.scala:130)
>>>> at
>>>> com.rob.server.core.process.drools.tasks.StartDroolsProcessHandler$.main(DroolsProcessHandler.scala:33)
>>>> at
>>>> com.rob.server.core.process.drools.tasks.StartDroolsProcessHandler.m
>>>> ain(DroolsProcessHandler.scala) Caused by:
>>>> javax.naming.NameNotFoundException; remaining name 'UserTransaction'
>>>> at
>>>> org.eclipse.jetty.jndi.NamingContext.lookup(NamingContext.java:576)
>>>> at
>>>> org.eclipse.jetty.jndi.NamingContext.lookup(NamingContext.java:663)
>>>> at
>>>> org.eclipse.jetty.jndi.NamingContext.lookup(NamingContext.java:678)
>>>> at
>>>> org.eclipse.jetty.jndi.java.javaRootURLContext.lookup(javaRootURLContext.java:110)
>>>> at javax.naming.InitialContext.lookup(InitialContext.java:392)
>>>> at
>>>> org.drools.persistence.session.SingleSessionCommandService.<init>(SingleSessionCommandService.java:109)
>>>> ... 5 more
>>>>
>>>>
>>>> I have no idea what this means. I guess SingleSessionCommandService
>>>> is looking up for "UserTransaction", but whats the "UserTransaction" ?
>>>>
>>> You need to configure JTA and JNDI, it uses the standard JNDI lookup
>>> mechanism to find the UserTransaction it's to be associated with. See
>>> javadocs example here:
>>> http://hudson.jboss.org/hudson/job/drools/lastSuccessfulBuild/artifac
>>> t/trunk/target/javadocs/stable/drools-api/org/drools/persistence/jpa/
>>> JPAKnowledgeService.html
>>>
>>> Each transaction framework has a different way to be configured, some
>>> are simpler than others.
>>>
>>> Mark
>>>> Cheers, Rob.
>>>>
>>>>
>>>
>>>
>>> _______________________________________________
>>> rules-users mailing list
>>> rules-users(a)lists.jboss.org
>>> https://lists.jboss.org/mailman/listinfo/rules-users
>>
>>
>
>
> --
> Erstellt mit Operas revolution?rem E-Mail-Modul:
> http://www.opera.com/mail/
> _______________________________________________
> rules-users mailing list
> rules-users(a)lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
>
>
>
>
>
> This message contains information that may be privileged or confidential
> and is the property of the Capgemini Group. It is
> intended only for the person to whom it is addressed. If you are not the
> intended recipient, you are not authorized to
> read, print, retain, copy, disseminate, distribute, or use this message
> or any part thereof. If you receive this message
> in error, please notify the sender immediately and delete all copies of
> this message.
>
>
> _______________________________________________
> rules-users mailing list
> rules-users(a)lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
--
Erstellt mit Operas revolution?rem E-Mail-Modul: http://www.opera.com/mail/
------------------------------
Message: 2
Date: Mon, 7 Jun 2010 17:04:19 -0400
From: Fnu Mahalakshmi <FMahalakshmi(a)nyx.com>
Subject: [rules-users] Multiple Object Referencing problem
To: "'rules-users(a)lists.jboss.org'" <rules-users(a)lists.jboss.org>
Message-ID:
<994758E35590274E955FA75763C5AA5002D01084(a)MTEXMBXP01.ad.NYX.com>
Content-Type: text/plain; charset="us-ascii"
Hi,
I am trying out this example from the book :
public class Room {
private String name
// getter and setter methods here
}
public classs Sprinkler {
private Room room;
private boolean on;
// getter and setter methods here
}
public class Fire {
private Room room;
// getter and setter methods here
}
I load 2 input files: 1. with data of fire and Room { f1, r1;f2, r2}
2. with data of sprinkler and Room { " ", r1; " " , r2}
I am writing rule " if fire exists in room start sprinkler" { so if f1 and r1 in this case: I should get s1, r1 }
when
Fire($room : room)
$sprinkler : Sprinkler( room == $room, modified == false )
Then
$sprinkler.setmodified(true);
modify( $sprinkler ) { setSprinkle( "s1" ) };
end
But this gives me error:
Exception in thread "main" java.lang.NullPointerException
at java.io.Writer.write(Unknown Source)
at com.org.RulesTest.main(RulesTest.java:58)
>From what I observed this rule is not getting fired at all.
I want this rule to be fired on the data in my second input file.
The rules for my first input file get executed properly.
Can any1 tell me where I am going wrong??
Is there any way in which we can use the modified data { after rules are fired on the first input data and it is modified}to fire another set of rules on the same input depending on the next input file???
Thank you.
-M
</pre>
<P><hr size=1></P>
<P><STRONG><font color=green>Please consider the environment before printing this email.</font></STRONG></P>
<P><STRONG>Visit our website at <a href="http://www.nyse.com">http://www.nyse.com</a> <br>
*****************************************************************************
<br>
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.
</STRONG></P><pre>
14 years, 5 months
Re: [rules-users] rules-users Digest, Vol 43, Issue 27
by amit bhardwaj
FYI
On Mon, Jun 7, 2010 at 7:25 PM, <rules-users-request(a)lists.jboss.org> wrote:
> Send rules-users mailing list submissions to
> rules-users(a)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-request(a)lists.jboss.org
>
> You can reach the person managing the list at
> rules-users-owner(a)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.aliverti(a)gmail.com>
> Subject: Re: [rules-users] Error Loading Multiple Input Files
> To: Rules Users List <rules-users(a)lists.jboss.org>
> Message-ID:
> <AANLkTilI_naDypTVkiSr-a9EGwwfX1WvoZj2mspX0zJR(a)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 <FMahalakshmi(a)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(a)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/c5cfedf...
>
> ------------------------------
>
> Message: 2
> Date: Mon, 7 Jun 2010 15:55:09 +0200
> From: Giovanni Motta <mottagio(a)gmail.com>
> Subject: Re: [rules-users] Error Loading Multiple Input Files
> To: Rules Users List <rules-users(a)lists.jboss.org>
> Message-ID:
> <AANLkTikWe5KEKSSxT4vuPCDav4k7NedTeAD-HNNz6Aa1(a)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 <FMahalakshmi(a)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(a)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/18f6899...
>
> ------------------------------
>
> _______________________________________________
> rules-users mailing list
> rules-users(a)lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
>
> End of rules-users Digest, Vol 43, Issue 27
> *******************************************
>
--
Amit Bhardwaj
14 years, 5 months
Re: [rules-users] Error Loading Input Files
by Fnu Mahalakshmi
Hi Greg,
It was my mistake and a very basic java question. But you need not be rude for that.
-M
-----Original Message-----
From: rules-users-bounces(a)lists.jboss.org [mailto:rules-users-bounces@lists.jboss.org] On Behalf Of rules-users-request(a)lists.jboss.org
Sent: Monday, June 07, 2010 10:44 AM
To: rules-users(a)lists.jboss.org
Subject: rules-users Digest, Vol 43, Issue 28
Send rules-users mailing list submissions to
rules-users(a)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-request(a)lists.jboss.org
You can reach the person managing the list at
rules-users-owner(a)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 Input Files. (Fnu Mahalakshmi)
2. Re: Exception using persistence (Robert)
3. Re: Exception using persistence (PAYET, Manuel)
4. Re: Error Loading Input Files. (Greg Barton)
----------------------------------------------------------------------
Message: 1
Date: Mon, 7 Jun 2010 10:01:23 -0400
From: Fnu Mahalakshmi <FMahalakshmi(a)nyx.com>
Subject: Re: [rules-users] Error Loading Input Files.
To: "'rules-users(a)lists.jboss.org'" <rules-users(a)lists.jboss.org>
Message-ID:
<994758E35590274E955FA75763C5AA5002D0107B(a)MTEXMBXP01.ad.NYX.com>
Content-Type: text/plain; charset="us-ascii"
Hi Thomas,
Thanks a lot for the help.
I am also facing problem in uploading my modified working memory back to my output file.
Once the rules are fired and the data in my working memory is modified how do I reupload it to my text file?
I store all my data in a vector which loads it to the working memory.
Could you point me towards some documentation which explains it?
Thanks so much.
M
-----Original Message-----
From: rules-users-bounces(a)lists.jboss.org [mailto:rules-users-bounces@lists.jboss.org] On Behalf Of rules-users-request(a)lists.jboss.org
Sent: Monday, June 07, 2010 9:53 AM
To: rules-users(a)lists.jboss.org
Subject: rules-users Digest, Vol 43, Issue 26
Send rules-users mailing list submissions to
rules-users(a)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-request(a)lists.jboss.org
You can reach the person managing the list at
rules-users-owner(a)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 (Fnu Mahalakshmi)
2. Re: Error Loading Multiple Input Files (Swindells, Thomas)
----------------------------------------------------------------------
Message: 1
Date: Mon, 7 Jun 2010 09:41:39 -0400
From: Fnu Mahalakshmi <FMahalakshmi(a)nyx.com>
Subject: Re: [rules-users] Error Loading Multiple Input Files
To: "'rules-users(a)lists.jboss.org'" <rules-users(a)lists.jboss.org>
Message-ID:
<994758E35590274E955FA75763C5AA5002D0107A(a)MTEXMBXP01.ad.NYX.com>
Content-Type: text/plain; charset="us-ascii"
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
</pre>
<P><hr size=1></P>
<P><STRONG><font color=green>Please consider the environment before printing this email.</font></STRONG></P>
<P><STRONG>Visit our website at <a href="http://www.nyse.com">http://www.nyse.com</a> <br>
*****************************************************************************
<br>
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.
</STRONG></P><pre>
14 years, 5 months
Re: [rules-users] Error Loading Input Files.
by Fnu Mahalakshmi
Hi Thomas,
Thanks a lot for the help.
I am also facing problem in uploading my modified working memory back to my output file.
Once the rules are fired and the data in my working memory is modified how do I reupload it to my text file?
I store all my data in a vector which loads it to the working memory.
Could you point me towards some documentation which explains it?
Thanks so much.
M
-----Original Message-----
From: rules-users-bounces(a)lists.jboss.org [mailto:rules-users-bounces@lists.jboss.org] On Behalf Of rules-users-request(a)lists.jboss.org
Sent: Monday, June 07, 2010 9:53 AM
To: rules-users(a)lists.jboss.org
Subject: rules-users Digest, Vol 43, Issue 26
Send rules-users mailing list submissions to
rules-users(a)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-request(a)lists.jboss.org
You can reach the person managing the list at
rules-users-owner(a)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 (Fnu Mahalakshmi)
2. Re: Error Loading Multiple Input Files (Swindells, Thomas)
----------------------------------------------------------------------
Message: 1
Date: Mon, 7 Jun 2010 09:41:39 -0400
From: Fnu Mahalakshmi <FMahalakshmi(a)nyx.com>
Subject: Re: [rules-users] Error Loading Multiple Input Files
To: "'rules-users(a)lists.jboss.org'" <rules-users(a)lists.jboss.org>
Message-ID:
<994758E35590274E955FA75763C5AA5002D0107A(a)MTEXMBXP01.ad.NYX.com>
Content-Type: text/plain; charset="us-ascii"
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
</pre>
<P><hr size=1></P>
<P><STRONG><font color=green>Please consider the environment before printing this email.</font></STRONG></P>
<P><STRONG>Visit our website at <a href="http://www.nyse.com">http://www.nyse.com</a> <br>
*****************************************************************************
<br>
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.
</STRONG></P><pre>
14 years, 5 months
Re: [rules-users] Error Loading Multiple Input Files
by Fnu Mahalakshmi
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
</pre>
<P><hr size=1></P>
<P><STRONG><font color=green>Please consider the environment before printing this email.</font></STRONG></P>
<P><STRONG>Visit our website at <a href="http://www.nyse.com">http://www.nyse.com</a> <br>
*****************************************************************************
<br>
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.
</STRONG></P><pre>
14 years, 5 months
how to fire a subset of rules in KB?
by wenjinchao
Hi all,
I'm a newbie for drools.
And i want to know how to fire a subset of rules in KB,
suppose there are three rules named A,B,C, and I want to fire rule A only.
by the way,
suppose there is a drl file containing rule, and i have set up KB, and call fireAllRules through statefulKnowledgeSession. After that, the rule file is changed, how to load rules dynamicly?
Is there any solution?
Thanks in advance!
best regards.
2010-06-07
wenjinchao
14 years, 5 months
Drools 5.1.0.M2 - BPMN2 process issue - Eclipse plugin. -- The method getTextContent() is undefined for the type Node
by Vijay K Pandey
Hi,
I just downloaded the Drools 5.1.0.M2 (have been using the snapshot version of around 16th April 2010) - created a sample "rule flow file(start-->user task-->end) - bpmn2 version". But when I clicked the file to open it gave the following error (image attached)
"The method getTextContent() is undefined for the type Node" .
I understand this error is related to org.w3c.dom.Node where this method was added as part of DOM Level 3 and available in JDK 5+ . My project and eclipse is configured against JDK 6+ . Not sure why this error with M2.
May be it is because of the drools-bpmn2.jar included in the drools eclipse plugin? Can someone shed some light that where it might be going wrong.
[cid:image001.png@01CB05D0.DAC32670]
Thanks
Vijay
14 years, 5 months
Re: [rules-users] Error Loading multiple input files
by Greg Barton
How are you translating the input file into POJOs? Not being able to find a file on your system has little to do with drools.
Can you list the code that throws the FileNotFoundException?
GreG
On Jun 6, 2010, at 9:09 PM, Mahalakshmi <mr2809(a)nyu.edu> wrote:
Hi,
I have 3 separate text files with my input data. I need to load all the input files data to my working memory and then fire the rules on this data.
I am able to work with just 1 input file. But when I try to add multiple files - which I tried by adding an array of input files - my program terminates giving me a FileNotFoundException.
Same problem occurs if I try to add an multiple .drl files ( different rule files).
Can you guys please help me. Not understanding how to solve this error.
Also, how can I add my modified data to a new file. My new file gets created and the rules which are fired do modify my data as required ( printed it on the console)
But how do I store this information back to my working memory and print it out to my output file.
All my input files have only 1 field in common otherwise are not related.
Is it a better option to have all data in only 1 input file??
Thanks you.
-M
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
14 years, 5 months