[jboss-jira] [JBoss JIRA] (JBRULES-3282) ResourceChangeScanner does not call listener.exception(throwable) if the scan method throws a RuntimeException or Error

RH Bugzilla Integration (Commented) (JIRA) jira-events at lists.jboss.org
Thu Nov 10 04:43:45 EST 2011


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

RH Bugzilla Integration commented on JBRULES-3282:
--------------------------------------------------

Geoffrey De Smet <gdesmet at redhat.com> made a comment on [bug 741219|https://bugzilla.redhat.com/show_bug.cgi?id=741219]

Drools-compiler's org.drools.compiler.PackageBuilder#addKnowledgeResource method for some types (such as DTABLE, PKG, CHANGE_SET, ..)
replaces the original resource with a ReaderResource.

Part 1, adding delegateToResource code to the ReaderResource fixes the getLastModified() problem, but it causes

Exception in thread "Thread-7" java.lang.RuntimeException: Unknown resource type: null
	at org.drools.compiler.PackageBuilder.addKnowledgeResource(PackageBuilder.java:699)

because somehow the ReaderResource and the original Resource have added to KnowledgeAgentImpl.registeredResources.
                
> ResourceChangeScanner does not call listener.exception(throwable) if the scan method throws a RuntimeException or Error
> -----------------------------------------------------------------------------------------------------------------------
>
>                 Key: JBRULES-3282
>                 URL: https://issues.jboss.org/browse/JBRULES-3282
>             Project: Drools
>          Issue Type: Enhancement
>      Security Level: Public(Everyone can see) 
>            Reporter: Geoffrey De Smet
>            Assignee: Geoffrey De Smet
>             Fix For: 5.4.0.Beta1
>
>
> For example, ChangeSetTest succeeds, but in the system.out you get:
> {code}
> Exception in thread "Thread-9" java.lang.IllegalStateException: reader does have a modified date
> 	at 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)
> {code}

--
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

        


More information about the jboss-jira mailing list