Hi,
Thanks for your help as always. I did look at it a little more closer.
The caused error is as follows :-
INFO | jvm 1 | 2007/09/14 16:46:33 | Caused by:
java.lang.NullPointerException
INFO | jvm 1 | 2007/09/14 16:46:33 | at
com.makesys.fs.is.dnpiac.vendorBehaviour.snmp.Rule_Cisco_Systems_0.returnValue0
(Rule_Cisco_Systems_0.java:14)
INFO | jvm 1 | 2007/09/14 16:46:33 | at
com.makesys.fs.is.dnpiac.vendorBehaviour.snmp.Rule_Cisco_Systems_0ReturnValue0Invoker.evaluate
(Rule_Cisco_Systems_0ReturnValue0Invoker.java:19)
INFO | jvm 1 | 2007/09/14 16:46:33 | at
org.drools.rule.PredicateConstraint.isAllowed(PredicateConstraint.java:191)
INFO | jvm 1 | 2007/09/14 16:46:33 | ... 28 more
INFO | jvm 1 | 2007/09/14 16:46:33 | org.drools.spi.ConsequenceException:
org.drools.RuntimeDroolsException: Exception executing predicate
com.makesys.fs.is.dnpiac.vendorBehaviour.snmp.Rule_Cisco_Systems_0ReturnValue0Invoker@39d31fda
INFO | jvm 1 | 2007/09/14 16:46:33 | at
org.drools.common.DefaultAgenda.fireActivation(DefaultAgenda.java:549)
INFO | jvm 1 | 2007/09/14 16:46:33 | at
org.drools.common.DefaultAgenda.fireNextItem(DefaultAgenda.java:509)
INFO | jvm 1 | 2007/09/14 16:46:33 | at
org.drools.common.AbstractWorkingMemory.fireAllRules(
AbstractWorkingMemory.java:430)
INFO | jvm 1 | 2007/09/14 16:46:33 | at
org.drools.common.AbstractWorkingMemory.fireAllRules(
AbstractWorkingMemory.java:392)
INFO | jvm 1 | 2007/09/14 16:46:33 | at
com.makesys.fs.is.dnpiac.vendorBehaviour.snmp.SnmpVendorBehaviourDetermination.determineVendorType
(SnmpVendorBehaviourDetermination.java:45)
INFO | jvm 1 | 2007/09/14 16:46:33 | at
com.makesys.fs.is.dnpiac.DNPIACTask.vendorTypeRuleSNMP(DNPIACTask.java:487)
INFO | jvm 1 | 2007/09/14 16:46:33 | at
com.makesys.fs.is.dnpiac.DNPIACTask.determineVendorTypeFromSNMP(
DNPIACTask.java:512)
INFO | jvm 1 | 2007/09/14 16:46:33 | at
com.makesys.fs.is.dnpiac.DNPIACTask.determineVendorType(DNPIACTask.java:556)
INFO | jvm 1 | 2007/09/14 16:46:33 | at
com.makesys.fs.is.dnpiac.DNPIACTask.processNode(DNPIACTask.java:262)
INFO | jvm 1 | 2007/09/14 16:46:33 | at
com.makesys.fs.is.dnpiac.DNPIACTask.performTask(DNPIACTask.java:171)
INFO | jvm 1 | 2007/09/14 16:46:33 | at
com.makesys.common.utilities.threads.ServiceThread.service(
ServiceThread.java:187)
INFO | jvm 1 | 2007/09/14 16:46:33 | at
com.makesys.common.utilities.threads.ServiceThread.runTask(
ServiceThread.java:233)
INFO | jvm 1 | 2007/09/14 16:46:33 | at
com.makesys.common.utilities.threads.DisposableServiceThread.run(
DisposableServiceThread.java:126)
INFO | jvm 1 | 2007/09/14 16:46:33 | at java.lang.Thread.run(Unknown Source)
Based on the above I realized that it is complaining about a NPE. Not sure,
if it is happening in the lhs or rhs ?.
Is there something that tells you where this happens. I least think I have a
couple of things to try out.
-Krishnan
rule "Generate Cisco object"
salience 100
when
eval (vendorObj != null)
eval (SnmpHelper.getSysObjectId(vendorObj.getPing
()).matches(".*\\.1\\.3\\.6\\.1\\.4\\.1\\.9.*"))
then
CiscoBaseObject baseObj = new CiscoBaseObject();
baseObj.initialize(vendorObj.getPing(), vendorObj.getDp(),
vendorObj.getNodeInfo());
insert(baseObj);
end
On 9/18/07, Edson Tirelli <tirelli(a)post.com> wrote:
Krushnan,
Isn't there a "cause by" down the stack trace? Current code for
raising the exception is:
try {
return this.expression.evaluate( object,
null,
this.previousDeclarations,
this.localDeclarations,
workingMemory );
} catch ( final Exception e ) {
throw new RuntimeDroolsException( "Exception executing
predicate " + this.expression,
e );
}
All we can say for sure from the exception stack trace snippet you
provided is that it was raised in a rule named "Rule Cisco Systems", in the
first return value predicate.
We need to improve that a bit I think.
[]s
Edson
2007/9/18, Krishnan <krishiyer(a)gmail.com>:
>
>
> Hi all,
>
> When exceptions occur during runtime of drools, is there a list of
> things to see to understand what may be causing
> this to happen ? I know it is a very generic question. I want to see if
> there is a methodical way to understand what
> to look for ?.
>
> org.drools.RuntimeDroolsException: Exception executing predicate
>
com.makesys.fs.is.dnpiac.vendorBehaviour.snmp.Rule_Cisco_Systems_0ReturnValue0Invoker@39d31fda
> INFO | jvm 1 | 2007/09/14 16:46:33 | at
> org.drools.rule.PredicateConstraint.isAllowed(PredicateConstraint.java
> :197)
> INFO | jvm 1 | 2007/09/14 16:46:33 | at
> org.drools.reteoo.AlphaNode.assertObject(AlphaNode.java:122)
> INFO | jvm 1 | 2007/09/14 16:46:33 | at
> org.drools.reteoo.CompositeObjectSinkAdapter.propagateAssertObject(
> CompositeObjectSinkAdapter.java:317)
> INFO | jvm 1 | 2007/09/14 16:46:33 | at
> org.drools.reteoo.AlphaNode.assertObject(AlphaNode.java:130)
> INFO | jvm 1 | 2007/09/14 16:46:33 | at
> org.drools.reteoo.SingleObjectSinkAdapter.propagateAssertObject(
> SingleObjectSinkAdapter.java:20)
> INFO | jvm 1 | 2007/09/14 16:46:33 | at
> org.drools.reteoo.ObjectTypeNode.assertObject(ObjectTypeNode.java:168)
> INFO | jvm 1 | 2007/09/14 16:46:33 | at
> org.drools.reteoo.Rete.assertObject(Rete.java:168)
> INFO | jvm 1 | 2007/09/14 16:46:33 | at
> org.drools.reteoo.ReteooRuleBase.assertObject(ReteooRuleBase.java:190)
> INFO | jvm 1 | 2007/09/14 16:46:33 | at
> org.drools.reteoo.ReteooWorkingMemory.doInsert (ReteooWorkingMemory.java
> :70)
> INFO | jvm 1 | 2007/09/14 16:46:33 | at
> org.drools.common.AbstractWorkingMemory.insert(
> AbstractWorkingMemory.java:848)
> INFO | jvm 1 | 2007/09/14 16:46:33 | at
> org.drools.common.AbstractWorkingMemory.insert (
> AbstractWorkingMemory.java:822)
> INFO | jvm 1 | 2007/09/14 16:46:33 | at
> org.drools.base.DefaultKnowledgeHelper.insert(
> DefaultKnowledgeHelper.java:60)
> INFO | jvm 1 | 2007/09/14 16:46:33 | at
> org.drools.base.DefaultKnowledgeHelper.insert (
> DefaultKnowledgeHelper.java:54)
>
> Any help is appreciated ?
>
> thanks,
> Krishnan.
>
> --
> Sivaramakrishna Iyer Krishnan (Anand)
>
> Never assume the obvious is true.
> - William Safire
> _______________________________________________
> rules-users mailing list
> rules-users(a)lists.jboss.org
>
https://lists.jboss.org/mailman/listinfo/rules-users
>
>
--
Edson Tirelli
Software Engineer - JBoss Rules Core Developer
Office: +55 11 3529-6000
Mobile: +55 11 9287-5646
JBoss, a division of Red Hat @
www.jboss.com
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
--
Sivaramakrishna Iyer Krishnan (Anand)
Never assume the obvious is true.
- William Safire