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

Shahad Ahmed (JIRA) jira-events at lists.jboss.org
Thu Apr 24 11:19:08 EDT 2008


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


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