Based upon what I understood from Drools fusion documentation, entry point
stream can source data from file stream, so it could process data in GB's.
Believe me this is not what I found, to my surprise I found out I got -

 

Exception in thread "main" java.lang.OutOfMemoryError: Java heap space

      at
java.util.GregorianCalendar.computeFields(GregorianCalendar.java:2020)

      at
java.util.GregorianCalendar.computeFields(GregorianCalendar.java:1996)

      at java.util.Calendar.setTimeInMillis(Calendar.java:1109)

      at java.util.GregorianCalendar.<init>(GregorianCalendar.java:576)

      at java.util.Calendar.createCalendar(Calendar.java:1011)

      at java.util.Calendar.getInstance(Calendar.java:948)

      at CashFlowTest.main(CashFlowTest.java:66)

 

 

I am reading a huge file in while loop, inside this loop object is being
constructed and inserted into entry point stream. Before even rules would
start firing, it goes straight into exception.

Like below-

 

 

            while ((readLine = bufferedReader.readLine()) != null) {

                  String transactionType = readLine.substring(13, 14);

                  String amount = readLine.substring(9, 12);

                  if ("C".equals(transactionType)) {

                        CashFlow wCashFlow = new
CashFlow(Calendar.getInstance()

                                    .getTime(), Double.valueOf(amount),
CREDIT, 1);

                         memoryEntryPoint.insert(wCashFlow);

                  } else {

                        CashFlow wCashFlow = new
CashFlow(Calendar.getInstance()

                                    .getTime(), Double.valueOf(amount),
DEBIT, 1);

                  }

            }

 

 

Unless I am doing something wrong here, I conclude it entry stream cannot
source GB data?

From: Aman [mailto:[email protected]] 
Sent: Sunday, October 03, 2010 10:06 PM
To: 'Rules Users List'
Subject: RE: [rules-users] WorkingMemoryEntryPoint NullpointerException?

 

Now I am using it. Thanks

 

From: [email protected]
[mailto:[email protected]] On Behalf Of Leandro Romero
Sent: Sunday, October 03, 2010 10:02 PM
To: Rules Users List
Subject: Re: [rules-users] WorkingMemoryEntryPoint NullpointerException?

 

Are you using that entry-point in your rules? That might be the problem.

_______________________________________________
rules-users mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/rules-users

Reply via email to