NullPointerException in org.drools.rule.builder.PatternBuilder.getDeclarationsMap()
-----------------------------------------------------------------------------------
Key: JBRULES-2147
URL:
https://jira.jboss.org/jira/browse/JBRULES-2147
Project: JBoss Drools
Issue Type: Feature Request
Security Level: Public (Everyone can see)
Components: drools-compiler (expert)
Affects Versions: 5.0.1.FINAL
Environment: java 1.5, linux x64, jboss 4.0.5
Reporter: Juergen none
Assignee: Mark Proctor
I understand my rules/fact objects might not be proper (still searching), but resulting in
a NullPointerException is not proper as well
entry.getValue().getExtractor().getExtractToClass() yields NullPointerException, because
entry.getValue().getExtractor() is null
eclipse debug variable:
value org.drools.rule.Declaration (id=502)
identifier "schoolForm" (id=501)
internalFact false
pattern org.drools.rule.Pattern (id=508)
behaviors null
constraints java.util.ArrayList<E> (id=520)
declaration org.drools.rule.Declaration (id=521)
declarations java.util.HashMap<K,V> (id=522)
index 1
objectType org.drools.base.ClassObjectType (id=524)
offset 0
source null
readAccessor null
Stacktrace:
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
...
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:595)
Caused by: java.lang.NullPointerException
at
org.drools.rule.builder.PatternBuilder.getDeclarationsMap(PatternBuilder.java:641)
at org.drools.rule.builder.PatternBuilder.build(PatternBuilder.java:574)
at
org.drools.rule.builder.PatternBuilder.buildConstraint(PatternBuilder.java:244)
at org.drools.rule.builder.PatternBuilder.build(PatternBuilder.java:196)
at org.drools.rule.builder.PatternBuilder.build(PatternBuilder.java:104)
at org.drools.rule.builder.GroupElementBuilder.build(GroupElementBuilder.java:69)
at org.drools.rule.builder.RuleBuilder.build(RuleBuilder.java:68)
at org.drools.compiler.PackageBuilder.addRule(PackageBuilder.java:1159)
at org.drools.compiler.PackageBuilder.addPackage(PackageBuilder.java:649)
at org.drools.compiler.PackageBuilder.addPackageFromDrl(PackageBuilder.java:278)
at
org.drools.jsr94.rules.admin.LocalRuleExecutionSetProviderImpl.createRuleExecutionSet(LocalRuleExecutionSetProviderImpl.java:158)
at
org.drools.jsr94.rules.admin.LocalRuleExecutionSetProviderImpl.createRuleExecutionSet(LocalRuleExecutionSetProviderImpl.java:93)
...
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira