[jboss-jira] [JBoss JIRA] Commented: (JBRULES-2962) Knowledge Agent rebuilding KnowledgeBase with scanner/notifier does not work with declared facts

Esteban Aliverti (JIRA) jira-events at lists.jboss.org
Mon Apr 18 07:59:33 EDT 2011


    [ https://issues.jboss.org/browse/JBRULES-2962?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12596132#comment-12596132 ] 

Esteban Aliverti commented on JBRULES-2962:
-------------------------------------------

We are already working on this. The problem is that each time the agent compiles a resource containing a declared fact type, a new instance of this fact type is added to classloader (after all, declared fat types are converted to java POJOs internally). When rules using these fact types are modified in the kbase (by modification I mean, a new version is added), there is a ClassCastException because of the multiple definitions existing in the classloader.

Could you please post the stacktrace to make sure that this is the problem? Try using a KnowledgeAgentEventListener to get agent's errors.

> Knowledge Agent rebuilding KnowledgeBase with scanner/notifier does not work with declared facts
> ------------------------------------------------------------------------------------------------
>
>                 Key: JBRULES-2962
>                 URL: https://issues.jboss.org/browse/JBRULES-2962
>             Project: Drools
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: drools-core
>    Affects Versions: 5.1.1.FINAL, 5.2.0.M1
>            Reporter: Ross Hall
>            Assignee: Esteban Aliverti
>
> When reloading rules in a KnowledgeAgent declared facts will cause ClassCastExceptions when new-instance is set to false. When new-instance is set to true, the KnowledgeBase is rebuilt, however declared facts are not recognized and associated rules will not fire. Rules not using declared facts will fire normally. Using POJOs works fine.
> In both cases the KnowledgeAgent will build the rule base the first time, the issue only seems to occur when the changeset resources are modified and are detected by the resource notifier and scanner.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the jboss-jira mailing list