[jboss-jira] [JBoss JIRA] Closed: (JBRULES-1581) Invalid dialect name causes NullPointerException in BRMS and Eclipse plug-in rule editor

Mark Proctor (JIRA) jira-events at lists.jboss.org
Fri Apr 25 21:43:19 EDT 2008


     [ http://jira.jboss.com/jira/browse/JBRULES-1581?page=all ]

Mark Proctor closed JBRULES-1581.
---------------------------------

    Fix Version/s: 4.0.7
                   5.0.0-M1
       Resolution: Done

> Invalid dialect name causes NullPointerException in BRMS and Eclipse plug-in rule editor
> ----------------------------------------------------------------------------------------
>
>                 Key: JBRULES-1581
>                 URL: http://jira.jboss.com/jira/browse/JBRULES-1581
>             Project: JBoss Drools
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: drools-brms, Eclipse IDE
>    Affects Versions: 4.0.4
>         Environment: Windows XP SP2, Sun JRE 1.5.0_13
>            Reporter: Shahad Ahmed
>         Assigned To: Mark Proctor
>             Fix For: 4.0.7, 5.0.0-M1
>
>
> If you specify an invalid dialect attribute in a rule, or as a package dialect then the eclipse plug-in (and also BRMS) reports a java.lang.NullPointerException
> Either one of the two dialect used in the example below causes the NullPointerException:
> package defaultPackage
> import java.lang.Integer;
> dialect "javaxxx"
> rule "Examaple"
> 	auto-focus "true"
> 	dialect " javaxxx "
> 	when
> 		p : Integer( intValue == "10" )
> 	then
> 		retract( p );
> end
> In the BRMS if you try to validate the above rule or build the package you get an error with the stack shown below. It's not really a big issue other than the fact that the error message gives you absolutely no clue as to the cause of the error, or where it is located. It's only when I looked at the source code that I realized it was due to an invalid dialect name.
> An error occurred executing the action. 
> Details 
> java.lang.NullPointerException
>  at org.drools.rule.builder.RuleBuildContext.<init>(RuleBuildContext.java:126)
>  at org.drools.compiler.PackageBuilder.addRule(PackageBuilder.java:441)
>  at org.drools.compiler.PackageBuilder.addPackage(PackageBuilder.java:304)
>  at org.drools.compiler.PackageBuilder.addPackageFromDrl(PackageBuilder.java:167)
> <More Omitted>

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

        



More information about the jboss-jira mailing list