[jboss-jira] [JBoss JIRA] Commented: (JBRULES-2786) NPE during template expansion with misplaced "template" statement

Wolfgang Laun (JIRA) jira-events at lists.jboss.org
Wed Nov 10 14:26:31 EST 2010


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

Wolfgang Laun commented on JBRULES-2786:
----------------------------------------

IExpected behaviour would be an error message indicating a user error.

Also, the documentation on template files is lacking clarity.


> NPE during template expansion with misplaced "template" statement
> -----------------------------------------------------------------
>
>                 Key: JBRULES-2786
>                 URL: https://jira.jboss.org/browse/JBRULES-2786
>             Project: Drools
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: drools-compiler
>    Affects Versions: 5.1.1.FINAL
>            Reporter: Wolfgang Laun
>            Assignee: Mark Proctor
>             Fix For: 5.2.0.M1
>
>         Attachments: event.tgz
>
>
> If the "template" statement does not precede the first rule in the template file, a NPE occurs:
> xception in thread "main" java.lang.NullPointerException
> 	at org.drools.template.parser.DefaultTemplateColumn.createCellCondition(DefaultTemplateColumn.java:68)
> 	at org.drools.template.parser.DefaultTemplateColumn.addCondition(DefaultTemplateColumn.java:91)
> 	at org.drools.template.parser.DefaultTemplateRuleBase.createColumnConditions(DefaultTemplateRuleBase.java:105)
> 	at org.drools.template.parser.DefaultTemplateRuleBase.createTemplateRule(DefaultTemplateRuleBase.java:98)
> 	at org.drools.template.parser.DefaultTemplateRuleBase.getDTRules(DefaultTemplateRuleBase.java:85)
> 	at org.drools.template.parser.DefaultTemplateRuleBase.<init>(DefaultTemplateRuleBase.java:64)
> 	at org.drools.template.parser.TemplateDataListener.<init>(TemplateDataListener.java:76)
> 	at org.drools.template.parser.TemplateDataListener.<init>(TemplateDataListener.java:52)
> 	at org.drools.template.ObjectDataCompiler.compile(ObjectDataCompiler.java:44)
> 	at resource.Main.compilePackage(Main.java:80)
> 	at resource.Main.main(Main.java:92)

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