[rules-users] OutOfMemoryError with non-existence check in flow XOR split
heldeen
heldeen at overstock.com
Thu Mar 11 19:04:10 EST 2010
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-XOR-split-tp443126p443126.html
Sent from the Drools - User mailing list archive at Nabble.com.
More information about the rules-users
mailing list