Hi Heath,
You say that you "insert a ValidationResult() fact if something is not
valid". Do you insert a ValidationResult(valid == true) when something is
valid? Could it be that when your facts pass through validation successfully
there is an issue? Have you tried using the Drools Audit View to look at the
logs? When I've encountered OOMEs they have been caused by looping,
blackholing while waiting for a condition that can never be met or just
putting too many facts into a session. It's hard to say more without
debugging through it myself :)
Enda
On Fri, Mar 12, 2010 at 12:04 AM, heldeen <heldeen(a)overstock.com> wrote:
I am using drools marshalling for persistence and am getting an OOME with
my
simple rule flow. I have a custom CommandService that persists at the end
of
each execution. (I am not using JPA :-( ).
In the rule flow I have a split that checks for the non-existence of a
simple pojo using "not ValidationResult()" as one of the constraints. The
other constraint is ValidationResult(valid == false). I get an
OutOfMemoryError using the "not" in one of the constraints. Changing "not
ValidationResult()" to "ValidationResult(valid == true)" results in
normal
operation.
The flow is essentially Start->ValidationRuleFlowGroup->XOR Split->Valid
Action XOR Invalid Action -> End. The ValidationRuleFlowGroup has a simple
set of rules that will insert a ValidationResult() fact if something is not
valid.
Anyone have any idea why checking for the non-existence of a fact causes
this error. I'll post the pojo and the stack trace below.
public class ValidationResult {
private boolean isValid;
private String message;
public boolean isValid() {
return isValid;
}
public void setValid(boolean isValid) {
this.isValid = isValid;
}
public String getMessage() {
return message;
}
public void setMessage(String message) {
this.message = message;
}
}
java.lang.OutOfMemoryError: Java heap space
at java.util.Arrays.copyOf(Arrays.java:2786)
at
java.io.ByteArrayOutputStream.write(ByteArrayOutputStream.java:94)
at
java.io.ObjectOutputStream$BlockDataOutputStream.drain(ObjectOutputStream.java:1838)
at
java.io.ObjectOutputStream$BlockDataOutputStream.write(ObjectOutputStream.java:1769)
at java.io.DataOutputStream.writeInt(DataOutputStream.java:182)
at
java.io.ObjectOutputStream$BlockDataOutputStream.writeInt(ObjectOutputStream.java:1904)
at java.io.ObjectOutputStream.writeInt(ObjectOutputStream.java:769)
at
org.drools.marshalling.impl.OutputMarshaller.writeLeftTuple(OutputMarshaller.java:459)
at
org.drools.marshalling.impl.OutputMarshaller.writeInitialFactHandleLeftTuples(OutputMarshaller.java:356)
at
org.drools.marshalling.impl.OutputMarshaller.writeFactHandles(OutputMarshaller.java:251)
at
org.drools.marshalling.impl.OutputMarshaller.writeSession(OutputMarshaller.java:85)
at
org.drools.marshalling.impl.DefaultMarshaller.marshall(DefaultMarshaller.java:117)
Thanks,
Heath
--
View this message in context:
http://n3.nabble.com/OutOfMemoryError-with-non-existence-check-in-flow-XO...
Sent from the Drools - User mailing list archive at
Nabble.com.
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
--
Enda J Diggins