[jboss-jira] [JBoss JIRA] Updated: (JBRULES-1996) NPE when using directory scanner and drl is incorrect.

Mark Proctor (JIRA) jira-events at lists.jboss.org
Thu Jul 22 17:52:41 EDT 2010


     [ https://jira.jboss.org/browse/JBRULES-1996?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mark Proctor updated JBRULES-1996:
----------------------------------

    Fix Version/s: 5.2.0.M1
                       (was: 4.0.8)


These issues where all marked for 4.0.8, we no longer maintain the 4.0.x branch in the community. I'm moving them to 5.2.0.M2, so they can be checked that they no longer cause a problem there, and fixed if they do. If you require these fixed at the 4.0.x branch level, then please contact sales at jboss.com for subscription based support.

> NPE when using directory scanner and drl is incorrect.
> ------------------------------------------------------
>
>                 Key: JBRULES-1996
>                 URL: https://jira.jboss.org/browse/JBRULES-1996
>             Project: Drools
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: drools-core
>    Affects Versions: 4.0.7
>         Environment: Sun JDK 1.5.0_11, Kubuntu Linux 8.10, x86, 32-bit
>            Reporter: Przemyslaw Rozycki
>            Assignee: Mark Proctor
>             Fix For: 5.2.0.M1
>
>         Attachments: DirectoryScanner.java.2.patch, DirectoryScanner.java.patch
>
>
> When I use rule agent with directory scanner, and the rule that is being scanned contains a bug, then I receive a NPE instead of error message:
> java.lang.NullPointerException
>         at org.drools.agent.FileScanner.readPackage(FileScanner.java:102)
>         at org.drools.agent.FileScanner.getChangeSet(FileScanner.java:79)
>         at org.drools.agent.FileScanner.loadPackageChanges(FileScanner.java:57)
>         at org.drools.agent.DirectoryScanner.loadPackageChanges(DirectoryScanner.java:43)
>         at org.drools.agent.RuleAgent.checkForChanges(RuleAgent.java:330)
>         at org.drools.agent.RuleAgent.refreshRuleBase(RuleAgent.java:298)
>         at org.drools.agent.RuleAgent.configure(RuleAgent.java:284)
>         at org.drools.agent.RuleAgent.init(RuleAgent.java:208)
>         at org.drools.agent.RuleAgent.newRuleAgent(RuleAgent.java:176)
>         at org.drools.agent.RuleAgent.newRuleAgent(RuleAgent.java:164)
> ... (further entries of stack trace contains my application's lines)
> When I looked into code I found that DirectoryScanner object, used by the agent uses FileScanner object to scan each file in a directory. And the file scanner does not have a listener set. That's why the NPE is thrown. 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the jboss-jira mailing list