<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Michael Neale wrote:
<blockquote
 cite="mid:96ab3ced0902181638v79cb1256k488d7bf76e4baa63@mail.gmail.com"
 type="cite">
  <pre wrap="">So from the filesystem it won't pick up changes? (does it throw the
same exception).
  </pre>
</blockquote>
I believe the exception&nbsp; shown is a red herring, as the looping thread
of the scanner is interrupted as part of the stop() process and we log
that exception, incase the exception was caused by something else.<br>
<br>
Mark<br>
<blockquote
 cite="mid:96ab3ced0902181638v79cb1256k488d7bf76e4baa63@mail.gmail.com"
 type="cite">
  <pre wrap="">

On Thu, Feb 19, 2009 at 5:34 AM, Dan Seaver <a class="moz-txt-link-rfc2396E" href="mailto:dan.seaver@ge.com">&lt;dan.seaver@ge.com&gt;</a> wrote:
  </pre>
  <blockquote type="cite">
    <pre wrap="">Mark,
I have some more information for you. The exception occurs when I issue:

agent.monitorResourceChangeEvents(true|false)

If I comment out that code, I don't get the exception, but I don't get
changes either. I tried it with both the Guvnor repository and with a
deployed package on the file system.

I won't have time to create the test you requested until the weekend. Let me
know if you still want it.

Dan


Mark Proctor wrote:
    </pre>
    <blockquote type="cite">
      <pre wrap="">Dan Seaver wrote:
      </pre>
      <blockquote type="cite">
        <pre wrap="">I setup a KnowledgeAgent using the example code in the JavaDoc for
KnowledgeAgentFactory to access a compiled package in Guvnor. The package
runs fine, but changes to the package are not picked up. I believe this
is
due to the ChangeSet notification thread being interrupted. But why?

        </pre>
      </blockquote>
      <pre wrap="">Hmm that's not good. I have the following unit test:
<a class="moz-txt-link-freetext" href="http://anonsvn.labs.jboss.com/labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/agent/KnowledgeAgentTest.java">http://anonsvn.labs.jboss.com/labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/agent/KnowledgeAgentTest.java</a>

Could you provide an update for new tests for detecting url changes?
When making the test you might find it easier to look at the previous
ruleagent tests:
<a class="moz-txt-link-freetext" href="http://anonsvn.labs.jboss.com/labs/jbossrules/trunk/drools-core/src/test/java/org/drools/agent/URLScannerTest.java">http://anonsvn.labs.jboss.com/labs/jbossrules/trunk/drools-core/src/test/java/org/drools/agent/URLScannerTest.java</a>

Mark
      </pre>
      <blockquote type="cite">
        <pre wrap="">Also, I'm getting some messages about failing to read schema document. I
think it is caused by the xml for the ChangeSet, but I'm using the
example
from the JavaDocs.

        </pre>
      </blockquote>
      <pre wrap="">We haven't provided an XSD yet, so it'll provide schema validation
issues, those can be ignored.
      </pre>
      <blockquote type="cite">
        <pre wrap="">Here's a snippet from the log:

[2009:02:48 23:02:905:info] KnowledegAgent has started listening for
ChangeSet notifications
[2009:02:48 23:02:905:info] KnowledgAgent created, with configuration:
monitorChangeSetEvents=true scanResources=true scanDirectories=true
[2009:02:48 23:02:905:exception
java.lang.RuntimeException: KnowledgeAgent ChangeSet notification thread
has
been interrupted
     at
org.drools.agent.impl.KnowledgeAgentImpl$ChangeSetNotificationDetector.run(KnowledgeAgentImpl.java:465)
     at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.InterruptedException
     at
java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.reportInterruptAfterWait(Unknown
Source)
     at
java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(Unknown
Source)
     at java.util.concurrent.LinkedBlockingQueue.take(Unknown Source)
     at
org.drools.agent.impl.KnowledgeAgentImpl$ChangeSetNotificationDetector.run(KnowledgeAgentImpl.java:463)
     ... 1 more
[2009:02:48 23:02:937:info] KnowledegAgent has stopped listening for
ChangeSet notifications
(null: 1, 207): schema_reference.4: Failed to read schema document
'drools-change-set-5.0.xsd', because 1) could not find the document; 2)
the
document could not be read; 3) the root element of the document is not
&lt;xsd:schema&gt;.
(null: 1, 207): cvc-elt.1: Cannot find the declaration of element
'change-set'.
(null: 1, 216): schema_reference.4: Failed to read schema document
'drools-change-set-5.0.xsd', because 1) could not find the document; 2)
the
document could not be read; 3) the root element of the document is not
&lt;xsd:schema&gt;.
(null: 1, 343): schema_reference.4: Failed to read schema document
'drools-change-set-5.0.xsd', because 1) could not find the document; 2)
the
document could not be read; 3) the root element of the document is not
&lt;xsd:schema&gt;.
[2009:02:48 23:02:390:info] KnowledgAgent applying ChangeSet


        </pre>
      </blockquote>
      <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>
    <pre wrap="">--
View this message in context: <a class="moz-txt-link-freetext" href="http://www.nabble.com/Problem-using-KnowledgeAgent-tp22073944p22085204.html">http://www.nabble.com/Problem-using-KnowledgeAgent-tp22073944p22085204.html</a>
Sent from the drools - user mailing list archive at Nabble.com.

_______________________________________________
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>
  <pre wrap=""><!---->


  </pre>
</blockquote>
<br>
</body>
</html>