[
https://issues.jboss.org/browse/JBRULES-3347?page=com.atlassian.jira.plug...
]
Mario Fusco resolved JBRULES-3347.
----------------------------------
Fix Version/s: 5.3.2.Final
5.4.0.CR1
Resolution: Done
ResourceChangeScanner trying to scan rule file when instead the
change set contains a package only
--------------------------------------------------------------------------------------------------
Key: JBRULES-3347
URL:
https://issues.jboss.org/browse/JBRULES-3347
Project: Drools
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: drools-core
Affects Versions: 5.3.0.Final
Reporter: Michael Schnitzler
Assignee: Mario Fusco
Fix For: 5.3.2.Final, 5.4.0.CR1
Attachments: drools-test.zip
1.) Create a KnowledgeBase using a rule file (DRL) on the classpath. The rule file has to
contain a Drools function.
2.) Serialize the the KnowledgeBase to the file system.
3.) Create a changeset definition that adds the serialized package only.
4.) Create a client that creates a KnowledgeAgent and apply the changeset. The class path
should not contain the original rule files.
5.) Start the ResourceChangeScanner
This will lead to a NPE in the ResourceChangeScannerImpl:
Exception in thread "Thread-0" java.lang.NullPointerException
at org.drools.io.impl.ClassPathResource.getURL(ClassPathResource.java:124)
at org.drools.io.impl.ClassPathResource.getLastModified(ClassPathResource.java:139)
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(Unknown Source)
The reason for this seems to be:
In private method KnowledgeAgentImpl.buildResourceMapping the function's resource
(the DRL file) is retrieved and added to the registered resources . But the client is not
distributed with the rule file on its classpath.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see:
http://www.atlassian.com/software/jira