[rules-users] Entry point stream OutOfMemoryError?
Aman
boy18nj at gmail.com
Sun Oct 3 22:27:42 EDT 2010
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:boy18nj at gmail.com]
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: rules-users-bounces at lists.jboss.org
[mailto:rules-users-bounces at lists.jboss.org] 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20101003/816e1da9/attachment.html
More information about the rules-users
mailing list