[
https://issues.jboss.org/browse/JBRULES-2932?page=com.atlassian.jira.plug...
]
Mark Proctor resolved JBRULES-2932.
-----------------------------------
Fix Version/s: 5.2.0.M2
Resolution: Done
I think I fixed this with some extra null checks
Regression: NullPointerException in PatternBuilder.build()
----------------------------------------------------------
Key: JBRULES-2932
URL:
https://issues.jboss.org/browse/JBRULES-2932
Project: Drools
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: drools-compiler (expert)
Affects Versions: 5.2.0.M1
Reporter: Laird Nelson
Assignee: Mark Proctor
Fix For: 5.2.0.M2
Actually using 5.2.0-SNAPSHOT as of today (March 24, 2011).
I get this:
{code}
Caused by: java.lang.NullPointerException
at org.drools.rule.builder.PatternBuilder.build(PatternBuilder.java:323)
at org.drools.rule.builder.PatternBuilder.build(PatternBuilder.java:268)
at org.drools.rule.builder.PatternBuilder.build(PatternBuilder.java:107)
at org.drools.rule.builder.GroupElementBuilder.build(GroupElementBuilder.java:65)
at org.drools.rule.builder.GroupElementBuilder.build(GroupElementBuilder.java:39)
at org.drools.rule.builder.GroupElementBuilder.build(GroupElementBuilder.java:65)
at org.drools.rule.builder.GroupElementBuilder.build(GroupElementBuilder.java:39)
at org.drools.rule.builder.GroupElementBuilder.build(GroupElementBuilder.java:65)
at org.drools.rule.builder.RuleBuilder.build(RuleBuilder.java:80)
at org.drools.compiler.PackageBuilder.addRule(PackageBuilder.java:1313)
at org.drools.compiler.PackageBuilder.addPackage(PackageBuilder.java:664)
at org.drools.compiler.PackageBuilder.addPackageFromDrl(PackageBuilder.java:310)
at org.drools.compiler.PackageBuilder.addKnowledgeResource(PackageBuilder.java:483)
at org.drools.builder.impl.KnowledgeBuilderImpl.add(KnowledgeBuilderImpl.java:28)
at
org.drools.agent.impl.KnowledgeAgentImpl.createPackageFromResource(KnowledgeAgentImpl.java:697)
at
org.drools.agent.impl.KnowledgeAgentImpl.createPackageFromResource(KnowledgeAgentImpl.java:675)
at
org.drools.agent.impl.KnowledgeAgentImpl.incrementalBuildResources(KnowledgeAgentImpl.java:882)
at
org.drools.agent.impl.KnowledgeAgentImpl.buildKnowledgeBase(KnowledgeAgentImpl.java:644)
at org.drools.agent.impl.KnowledgeAgentImpl.applyChangeSet(KnowledgeAgentImpl.java:188)
at org.drools.agent.impl.KnowledgeAgentImpl.applyChangeSet(KnowledgeAgentImpl.java:170)
{code}
This is on a monstrous rules file that has compiled fine for months.
The line in question says this:
{code}
for ( Iterator<BaseDescr> it = result.getDescrs().iterator(); it.hasNext(); ) {
{code}
I have not yet fired up the debugger to see which rule is causing the problem.
From reading other bug reports, it might be that getDescrs() returns null.
--
This message is automatically generated by JIRA.
For more information on JIRA, see:
http://www.atlassian.com/software/jira