[rules-users] Agenda events in a Stateless session

Mark Proctor mproctor at codehaus.org
Tue Mar 3 06:07:20 EST 2009


David Boaz wrote:
> Hi all,
>
> Im developing using drools version 5.0.0.M5. My application uses a stateless
> session. I tried to assign an AgendaEventListener to the session, but failed
> with a NPE.
> This is my code structure:
> KnowledgeBase kb =...;
> StatelessKnowledgeSession session = kb.newStatelessKnowledgeSession();
> session.getAgendaEventListeners().add(new DebugAgendaEventListener());
> ==>NPE!
>
> java.lang.NullPointerException
> 	at
> org.drools.impl.StatelessKnowledgeSessionImpl.getAgendaEventListeners(StatelessKnowledgeSessionImpl.java:123)
>
> Am I doing something wrong, or is it an error in drools?
>   
no, it's a bug and fixed in trunk.
> Thanks, David
>   





More information about the rules-users mailing list