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'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.
I'm pretty sure this issue is the same as Bug 733008
(https://bugzilla.redhat.com/show_bug.cgi?id=733008).
I have updated the class from Bug 733008 to reproduce the bug in Drools
5.4.0.Beta1:
http://drools.46999.n3.nabble.com/file/n3637279/AgentTest.java
AgentTest.java
It doesn't seem to be possible to scan a resource for changes at all. Even
if I execute ResourceFactory.getResourceChangeScannerService().scan();
directly, I get the same error message:
[2012-01-06 09:47:57,144:exception]
java.lang.IllegalStateException: reader does have a modified dateat
org.drools.io.impl.ReaderResource.getLastModified(ReaderResource.java:64)
at
org.drools.io.impl.ResourceChangeScannerImpl.scan(ResourceChangeScannerImpl.java:166)
at
org.drools.io.impl.ResourceChangeScannerImpl$ProcessChangeSet.run(ResourceChangeScannerImpl.java:311)
at java.lang.Thread.run(Thread.java:662)
(As a side note the error message should probably read: reader does /not/
have a modified date)
Regards
Dean
--
View this message in context: http://drools.46999.n3.nabble.com/Resource-Change-Scanner-Service-modified-date-error-tp3634802p3637279.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users