[jboss-jira] [JBoss JIRA] Resolved: (JBRULES-1073) CompositeContextEntry is raising NPE
Edson Tirelli (JIRA)
jira-events at lists.jboss.org
Sat Aug 11 14:37:01 EDT 2007
[ http://jira.jboss.com/jira/browse/JBRULES-1073?page=all ]
Edson Tirelli resolved JBRULES-1073.
------------------------------------
Resolution: Done
Problem was a mistake in the constructor where an incorrect variable declaration was shadowing the instance attribute:
public static class CompositeContextEntry
implements
ContextEntry {
public ContextEntry[] contextEntries;
private ContextEntry entry;
public CompositeContextEntry(final Restriction[] restrictions) {
final ContextEntry[] contextEntries = new ContextEntry[restrictions.length];
for ( int i = 0; i < restrictions.length; i++ ) {
contextEntries[i] = restrictions[i].getContextEntry();
}
}
Fixed.
> CompositeContextEntry is raising NPE
> ------------------------------------
>
> Key: JBRULES-1073
> URL: http://jira.jboss.com/jira/browse/JBRULES-1073
> Project: JBoss Rules
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: Reteoo
> Affects Versions: 4.0.0.GA
> Reporter: Edson Tirelli
> Assigned To: Edson Tirelli
> Fix For: 4.0.1
>
>
> Stack Trace:
> Exception in thread "main" java.lang.NullPointerException
> at org.drools.rule.AbstractCompositeRestriction$CompositeContextEntry.updateFromFactHandle(AbstractCompositeRestriction.java:104)
> at org.drools.common.DoubleBetaConstraints.updateFromFactHandle(DoubleBetaConstraints.java:138)
> at org.drools.reteoo.JoinNode.assertObject(JoinNode.java:158)
> at org.drools.reteoo.SingleObjectSinkAdapter.propagateAssertObject(SingleObjectSinkAdapter.java:20)
> at org.drools.reteoo.AlphaNode.assertObject(AlphaNode.java:130)
> at org.drools.reteoo.CompositeObjectSinkAdapter.propagateAssertObject(CompositeObjectSinkAdapter.java:308)
> at org.drools.reteoo.ObjectTypeNode.assertObject(ObjectTypeNode.java:168)
> at org.drools.reteoo.Rete.assertObject(Rete.java:168)
> at org.drools.reteoo.ReteooRuleBase.assertObject(ReteooRuleBase.java:190)
> at org.drools.reteoo.ReteooWorkingMemory.doInsert(ReteooWorkingMemory.java:70)
> at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:850)
> at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:824)
> at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:625)
> at org.drools.examples.GolfingExample.main(GolfingExample.java:32)
--
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