[rules-users] OutOfMemoryError with non-existence check in flow XOR split

Kris Verlaenen Kris.Verlaenen at cs.kuleuven.be
Mon Mar 15 19:06:11 EDT 2010


Heath,

This seems to be caused by an issue in persisting the current rule state
when using a Not rule in a specific combination (and not specifically to
your use of ruleflows).  I have opened a JIRA for you and we will fix
this asap.

https://jira.jboss.org/jira/browse/JBRULES-2453

Kris


Quoting heldeen <heldeen at overstock.com>:

> 
> 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.
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
> 




Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm



More information about the rules-users mailing list