For Drools 5.0 I moved away from async methods on the main interfaces, as it just got messy repeating ever method with an async version. Instead I plan to add a single async equivalent of the CommandExecutor.execute() method, and all async operations can be done that way. Much cleaner.

Mark
Edson Tirelli wrote:

   Hey Greg, please do open the JIRA.

   Thanks
       Edson

2009/5/27 Greg Barton <greg_barton@yahoo.com>

At seemingly random times I'm getting this exception:

Exception in thread "Thread-5" java.lang.NullPointerException
       at org.drools.common.AbstractWorkingMemory.update(AbstractWorkingMemory.java:1387)
       at org.drools.common.AbstractWorkingMemory.update(AbstractWorkingMemory.java:1350)
       at org.drools.concurrent.UpdateObject.execute(UpdateObject.java:46)
       at org.drools.concurrent.CommandExecutor.run(CommandExecutor.java:78)
       at java.lang.Thread.run(Thread.java:619)

I've only gotten the exception when using StatefulSession.asyncUpdate() from a separate thread.

AbstractWorkingMemory.java:1387 is wrapped in an if statement that checks whether maintainTms==true, so setting that to false has apparently avoided the problem. (Can't be 100% sure, but it has been runnign for a few hours without exception.) The FactHandles I'm passing in to StatefulSession.asyncUpdate() are never null, so I can only guess that InternalFactHandle.getEqualityKey() is sometimes returning false.

Do you want a JIRA on this?  I can't recreate it reliably.




_______________________________________________
rules-dev mailing list
rules-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-dev



--
 Edson Tirelli
 JBoss Drools Core Development
 JBoss, a division of Red Hat @ www.jboss.com

_______________________________________________ rules-dev mailing list rules-dev@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-dev