<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix">The bug was caused by one of the
      InputStreams that was not closed properly which caused the
      knowledgeAgent to block. <br>
      I think my issues are solved now. <br>
      <br>
      Thanks for looking into this.<br>
      Kind Regards,<br>
      <br>
      Op 31/07/2013 14:19, De Rooms Brecht schreef:<br>
    </div>
    <blockquote cite="mid:51F900C5.2000900@vub.ac.be" type="cite">
      <meta content="text/html; charset=ISO-8859-1"
        http-equiv="Content-Type">
      <div class="moz-cite-prefix">Hello David and thanks for
        responding.<br>
        I know it supports these event listeners and I use them. In my
        program, I have two knowledge agents and the first one
        (preprocessing) will read the file, preprocess a DRL and then
        write a second modified DRL file in a folder that is monitored
        by the second one. When I modify the original DRL file <b>(1.</b>
        in prints below<b>)</b> monitored by the preprocessing agent,
        everything works fine and the rule is triggered<b> (</b><b>2.)</b>.
        However, when I delete a file <b> (</b><b>3.)</b>, the
        knowledgeAgent just blocks after AfterChangeSetAppliedEvent and
        does not do anything anymore.. If I send new data in the
        knowledgeAgent it does not react anymore. <br>
        <br>
        I would expect to get a stacktrace of what went wrong but I do
        not get any info besides of the systemeventlistener or
        knowledgeagentlistener. Is there any way I can get a stacktrace?<br>
        Kind Regards,<br>
        De Rooms Brecht<br>
        <br>
        <u><b>1. Resources Changed =&gt; Modified:&nbsp; [[FileResource
            file='knowledge\realtimeKnowledge\test.brules.testRule.drl']]</b></u><br>
        <small><i>&nbsp;&nbsp;&nbsp; eventListener 1:::
            ==&gt;[BeforeResourceProcessedEvent(RESOURCE_REMOVED):
            [FileResource
            file='knowledge\realtimeKnowledge\test.brules.testRule.drl']]</i><i><br>
          </i><i>&nbsp;&nbsp;&nbsp; eventListener 1:::
            ==&gt;[AfterResourceProcessedEvent(RESOURCE_REMOVED):
            [FileResource
            file='knowledge\realtimeKnowledge\test.brules.testRule.drl']]</i><i><br>
          </i><i>&nbsp;&nbsp;&nbsp; eventListener 1:::
            ==&gt;[AfterChangeSetProcessedEvent:
            ChangeSetImpl{resourcesRemoved=[], resourcesAdded=[],
            resourcesModified=[[FileResource
            file='knowledge\realtimeKnowledge\test.brules.testRule.drl']],
            knowledgeDefinitionsRemoved=[]}]</i><i><br>
          </i><i>&nbsp;&nbsp;&nbsp; eventListener 1:::
            ==&gt;[ResourceCompilationFailedEvent:
            org.drools.builder.impl.KnowledgeBuilderImpl@70d0d127]</i><i><br>
          </i><i>&nbsp;&nbsp;&nbsp; eventListener 1:::
            ==&gt;[KnowledgeBaseUpdatedEvent:
            org.drools.impl.KnowledgeBaseImpl@49669be]</i><i><br>
          </i><i>&nbsp;&nbsp;&nbsp; eventListener 1:::
            ==&gt;[AfterChangeSetAppliedEvent:
            ChangeSetImpl{resourcesRemoved=[], resourcesAdded=[],
            resourcesModified=[[FileResource
            file='knowledge\realtimeKnowledge\test.brules.testRule.drl']],
            knowledgeDefinitionsRemoved=[]}]</i><i><br>
          </i><i>&nbsp;&nbsp;&nbsp; eventListener 2:::
            ==&gt;[BeforeChangeSetAppliedEvent:
            ChangeSetImpl{resourcesRemoved=[], resourcesAdded=[],
            resourcesModified=[[FileResource
            file='knowledge\packaged\test.brules.testRule.drl']], &nbsp;&nbsp;&nbsp;
            knowledgeDefinitionsRemoved=[]}]</i><i><br>
          </i><i>&nbsp;&nbsp;&nbsp; eventListener 2:::
            ==&gt;[BeforeResourceProcessedEvent(RESOURCE_REMOVED):
            [FileResource
            file='knowledge\packaged\test.brules.testRule.drl']]</i><i><br>
          </i><i>&nbsp;&nbsp;&nbsp; eventListener 2:::
            ==&gt;[AfterResourceProcessedEvent(RESOURCE_REMOVED):
            [FileResource
            file='knowledge\packaged\test.brules.testRule.drl']]</i><i><br>
          </i><i>&nbsp;&nbsp;&nbsp; eventListener 2:::
            ==&gt;[AfterChangeSetProcessedEvent:
            ChangeSetImpl{resourcesRemoved=[], resourcesAdded=[],
            resourcesModified=[[FileResource
            file='knowledge\packaged\test.brules.testRule.drl']],
            knowledgeDefinitionsRemoved=[]}]</i><i><br>
          </i><i>&nbsp;&nbsp;&nbsp; eventListener 2:::
            ==&gt;[KnowledgeBaseUpdatedEvent:
            org.drools.impl.KnowledgeBaseImpl@11c834d1]</i></small><br>
        <br>
        <u><b>2. Rules are triggered when the PKG file its knowledge is
            updated:</b></u><br>
        <small><i>&nbsp;&nbsp;&nbsp; Changed This Rule::: Got Event: TestEvent(
            number=5, message=doesDynamicEventTypeWork? )</i><i><br>
          </i><i>&nbsp;&nbsp;&nbsp; Changed This Rule::: Got Event: TestEvent(
            number=4, message=doesDynamicEventTypeWork? )</i><i><br>
          </i><i>&nbsp;&nbsp;&nbsp; Changed This Rule::: Got Event: TestEvent(
            number=2, message=doesDynamicEventTypeWork? )</i><i><br>
          </i><i>&nbsp;&nbsp;&nbsp; Changed This Rule::: Got Event: TestEvent(
            number=1, message=doesDynamicEventTypeWork? )</i><i><br>
          </i><i>&nbsp;&nbsp;&nbsp; Changed This Rule::: Got Event: TestEvent(
            number=2, message=doesDynamicEventTypeWork? )</i><i><br>
          </i><i>&nbsp;&nbsp;&nbsp; Changed This Rule::: Got Event: TestEvent(
            number=1, message=doesDynamicEventTypeWork? )</i><i><br>
          </i><i>&nbsp;&nbsp;&nbsp; Changed This Rule::: Got Event: TestEvent(
            number=2, message=doesDynamicEventTypeWork? )</i><i><br>
          </i><i>&nbsp;&nbsp;&nbsp; Changed This Rule::: Got Event: TestEvent(
            number=1, message=doesDynamicEventTypeWork? )</i><i><br>
          </i><i><br>
          </i><i>&nbsp;&nbsp;&nbsp; eventListener 2:::
            ==&gt;[AfterChangeSetAppliedEvent:
            ChangeSetImpl{resourcesRemoved=[], resourcesAdded=[],
            resourcesModified=[[FileResource
            file='knowledge\packaged\test.brules.testRule.drl']], &nbsp;&nbsp;&nbsp;
            &nbsp;&nbsp;&nbsp; knowledgeDefinitionsRemoved=[]}]</i><i><br>
          </i><i>&nbsp;&nbsp;&nbsp; eventListener 1:::
            ==&gt;[BeforeChangeSetAppliedEvent:
            ChangeSetImpl{resourcesRemoved=[[FileResource
            file='knowledge\realtimeKnowledge\test.brules.testRule.drl']],
            resourcesAdded=[], &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; resourcesModified=[],
            knowledgeDefinitionsRemoved=[]}]</i><i><br>
          </i><i>&nbsp;&nbsp;&nbsp; eventListener 1:::
            ==&gt;[BeforeChangeSetProcessedEvent:
            ChangeSetImpl{resourcesRemoved=[[FileResource
            file='knowledge\realtimeKnowledge\test.brules.testRule.drl']],
            resourcesAdded=[], resourcesModified=[],
            knowledgeDefinitionsRemoved=[]}]</i></small><br>
        <br>
        <br>
        <u><b>3. </b></u><u><b>Resources Changed =&gt; </b></u><u><b>
            Removed:&nbsp;&nbsp; [[FileResource
            file='knowledge\realtimeKnowledge\test.brules.testRule.drl']]</b></u><br>
        <small><i>&nbsp;&nbsp;&nbsp; eventListener 1:::
            ==&gt;[BeforeResourceProcessedEvent(RESOURCE_MODIFIED):
            [FileResource
            file='knowledge\realtimeKnowledge\test.brules.testRule.drl']]</i><i><br>
          </i><i>&nbsp;&nbsp;&nbsp; eventListener 1:::
            ==&gt;[AfterResourceProcessedEvent(RESOURCE_MODIFIED):
            [FileResource
            file='knowledge\realtimeKnowledge\test.brules.testRule.drl']]</i><i><br>
          </i><i>&nbsp;&nbsp;&nbsp; eventListener 1:::
            ==&gt;[AfterChangeSetProcessedEvent:
            ChangeSetImpl{resourcesRemoved=[[FileResource
            file='knowledge\realtimeKnowledge\test.brules.testRule.drl']],
            resourcesAdded=[], resourcesModified=[], &nbsp;&nbsp;&nbsp;
            knowledgeDefinitionsRemoved=[]}]</i><i><br>
          </i><i>&nbsp;&nbsp;&nbsp; eventListener 1:::
            ==&gt;[KnowledgeBaseUpdatedEvent:
            org.drools.impl.KnowledgeBaseImpl@49669be]</i><i><br>
          </i><i>&nbsp;&nbsp;&nbsp; eventListener 1:::
            ==&gt;[AfterChangeSetAppliedEvent:
            ChangeSetImpl{resourcesRemoved=[[FileResource
            file='knowledge\realtimeKnowledge\test.brules.testRule.drl']],
            resourcesAdded=[], resourcesModified=[],
            knowledgeDefinitionsRemoved=[]}]</i></small><br>
        <br>
        <font color="#cc0000">&nbsp;.... and then it was quiet....</font><br>
        <br>
        Op 31/07/2013 09:42, Davide Sottara schreef:<br>
      </div>
      <blockquote cite="mid:51F8BFFD.1030207@gmail.com" type="cite">
        <pre wrap="">The KA logs to a SystemEventListener, and supports a dedicated event
listener for
additions/updates/etc...

You can do:

kagent.setSystemEventListener( new PrintStreamSystemEventListener() );
kagent.addEventListener( new DebugKnowledgeAgentEventListener(  ) );



On 07/30/2013 01:55 AM, De Rooms Brecht wrote:
</pre>
        <blockquote type="cite">
          <pre wrap="">Dear Drools users,

I have been testing with the KnowledgeAgent from version 5.4 and 5.5. It 
monitors a changeset and is set to incrementally build the 
knowledgebase. I noticed that it sometimes crashes but never throws out 
errors. This happens for example when I define a type two times and when 
I remove a file. Does anyone experience similar behaviour and has an 
idea of how I could see the errors? I already tried to check the errors 
by building it myself using a knowledgebuilder before I update the file 
that the knowledgeAgent monitors but that's quite a dirty solution.

Kind Regards,
De Rooms Brecht
_______________________________________________
rules-users mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a>

</pre>
        </blockquote>
        <pre wrap="">_______________________________________________
rules-users mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a>

</pre>
      </blockquote>
      <br>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
rules-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a>
<a class="moz-txt-link-freetext" href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a></pre>
    </blockquote>
    <br>
  </body>
</html>