Could you please share with us how are you adding your resources to the agent? According to what you are saying I assume you are using a ReaderResource. According to Drools code, ReaderResource doesn&#39;t support most of org.drools.io.internal.InternalResource methods. Some of these methods (i.e. getLastModified()) are used by ResourceScanner to check if a resource has actually changed.<div>

So if we take a look at ReaderResource.getLastModified() we will see this:</div><div><br></div><div>public long getLastModified() {</div><div>    throw new IllegalStateException( &quot;reader does have a modified date&quot; );</div>

<div>} </div><div><br></div><div>You can find the whole source code here: <a href="https://github.com/droolsjbpm/drools/blob/master/drools-core/src/main/java/org/drools/io/impl/ReaderResource.java">https://github.com/droolsjbpm/drools/blob/master/drools-core/src/main/java/org/drools/io/impl/ReaderResource.java</a></div>

<div><br></div><div>So, don&#39;t expect this to work :)</div><div><br></div><div>There are 2 things you can do:</div><div><ol><li>Submit a patch for ReaderResource.java implementing all the unimplemented methods :) </li>

<li>Use a different Resource like UrlResource, FileResource, InputStreamResource, etc. </li></ol></div><div>In my opinion, Bug 733008 must be reopened until someone (maybe you Dean) provides a correct implementation of ReaderResource. </div>

<div><br></div><div>Best Regards,</div><div><br>XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX<br><br>Esteban Aliverti<br>- Developer @ <a href="http://www.plugtree.com" target="_blank">http://www.plugtree.com </a><br>- Blog @ <a href="http://ilesteban.wordpress.com" target="_blank">http://ilesteban.wordpress.com</a><br>


<br><br><div class="gmail_quote">On Fri, Jan 6, 2012 at 8:53 AM, Dean <span dir="ltr">&lt;<a href="mailto:dean@qualica.com">dean@qualica.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

I&#39;m pretty sure this issue is the same as Bug 733008<br>
(<a href="https://bugzilla.redhat.com/show_bug.cgi?id=733008" target="_blank">https://bugzilla.redhat.com/show_bug.cgi?id=733008</a>).<br>
<br>
I have updated the class from Bug 733008 to reproduce the bug in Drools<br>
5.4.0.Beta1:<br>
<br>
<a href="http://drools.46999.n3.nabble.com/file/n3637279/AgentTest.java" target="_blank">http://drools.46999.n3.nabble.com/file/n3637279/AgentTest.java</a><br>
AgentTest.java<br>
<br>
It doesn&#39;t seem to be possible to scan a resource for changes at all. Even<br>
if I execute ResourceFactory.getResourceChangeScannerService().scan();<br>
directly, I get the same error message:<br>
<br>
<a href="tel:%5B2012-01-06%2009" value="+12012010609">[2012-01-06 09</a>:47:57,144:exception]<br>
<div class="im">java.lang.IllegalStateException: reader does have a modified date<br>
</div>        at<br>
org.drools.io.impl.ReaderResource.getLastModified(ReaderResource.java:64)<br>
        at<br>
org.drools.io.impl.ResourceChangeScannerImpl.scan(ResourceChangeScannerImpl.java:166)<br>
        at<br>
org.drools.io.impl.ResourceChangeScannerImpl$ProcessChangeSet.run(ResourceChangeScannerImpl.java:311)<br>
        at java.lang.Thread.run(Thread.java:662)<br>
<br>
(As a side note the error message should probably read: reader does /not/<br>
have a modified date)<br>
<br>
Regards<br>
<span class="HOEnZb"><font color="#888888"><br>
Dean<br>
<br>
<br>
--<br>
View this message in context: <a href="http://drools.46999.n3.nabble.com/Resource-Change-Scanner-Service-modified-date-error-tp3634802p3637279.html" target="_blank">http://drools.46999.n3.nabble.com/Resource-Change-Scanner-Service-modified-date-error-tp3634802p3637279.html</a><br>


</font></span><div class="HOEnZb"><div class="h5">Sent from the Drools: User forum mailing list archive at Nabble.com.<br>
_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
</div></div></blockquote></div><br></div>