Hi ,
I've below rule set up in Guvnor . This rule works fine when other java
application starts up and fetched the rule from Guvnor using knowledge Agent
.
rule "EL-AH-RESTRICT-LOGIN"
no-loop true
dialect "mvel"
when
lcki : LoginChallengeKI( eval( (lcki.getWS_RiskScore() >=
790 && (lcki.getWS_RiskScore() - lcki.getAvgRiskScore()) >= 500) ||
(lcki.getWS_RiskScore() >= 750 && ((lcki.getWS_RiskScore() -
lcki.getWS_RiskScore())/lcki.getWS_RiskScore()) >= 4) ||
(lcki.getWS_RiskScore() >= 750 && lcki.getWS_RiskScore() <= 350 ) ),
userEquityBalance >= 40 , hadPreviousChallenge == false , eval(
!lcki.getValidCookies().contains(lcki.getWS_Cookie()) &&
!lcki.getValidCookies().contains(lcki.getWS_FlashCookie()) ), eval(
lcki.getWS_IPAddr() != lcki.getIpAddr1() && lcki.getWS_IPAddr() !=
lcki.getIpAddr2() ), eval( lcki.getWS_Cookie() != lcki.getCookie1() &&
lcki.getWS_Cookie() != lcki.getCookie2() ), eval( lcki.getWS_FlashCookie()
!= lcki.getFlashCookie1() && lcki.getWS_FlashCookie() !=
lcki.getFlashCookie2() ), eval( lcki.getWS_GeoCity() != lcki.getGeoCity1()
&& lcki.getWS_GeoCity() != lcki.getGeoCity2() ), eval(
CheckAfterHour(lcki.WS_EventTimeStamp) ))
then
lcki.setRuleIDMapValue("ACT03","EL-AH-RESTRICT-LOGIN");
lcki.setChallenge(true);
lcki.setGenerateAlert(true);
end
But if i make any change in the in the guvnor and build the pkg then other
application throws below exception
org.drools.RuntimeDroolsException: Exception executing predicate
(lcki.getWS_RiskScore() >= 790 && (lcki.getWS_RiskScore() -
lcki.getAvgRiskScore()) >= 500) || (lcki.getWS_RiskScore() >= 750 &&
((lcki.getWS_RiskScore() - lcki.getWS_RiskScore())/lcki.getWS_RiskScore())
= 4) || (lcki.getWS_RiskScore() >= 750 &&
lcki.getWS_RiskScore() <= 350 )
at
org.drools.rule.PredicateConstraint.isAllowed(PredicateConstraint.java:298)
at org.drools.reteoo.AlphaNode.assertObject(AlphaNode.java:130)
at
org.drools.reteoo.CompositeObjectSinkAdapter.doPropagateAssertObject(CompositeObjectSinkAdapter.java:450)
at
org.drools.reteoo.CompositeObjectSinkAdapter.propagateAssertObject(CompositeObjectSinkAdapter.java:378)
at
org.drools.reteoo.ObjectTypeNode.assertObject(ObjectTypeNode.java:193)
at
org.drools.reteoo.EntryPointNode.assertObject(EntryPointNode.java:191)
at
org.drools.common.NamedEntryPoint.insert(NamedEntryPoint.java:332)
at
org.drools.common.NamedEntryPoint.insert(NamedEntryPoint.java:293)
at
org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:905)
at
org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:864)
at
org.drools.impl.StatefulKnowledgeSessionImpl.insert(StatefulKnowledgeSessionImpl.java:255)
at
com.etrade.jws.actimize.rule.RuleServiceImpl.applyLoginRules(RuleServiceImpl.java:38)
at
com.etrade.jws.actimize.service.LoginChallengeImpl.getLoginChallengeDecision(LoginChallengeImpl.java:130)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at
org.apache.cxf.service.invoker.AbstractInvoker.performInvocation(AbstractInvoker.java:173)
at
org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:89)
at
org.apache.cxf.jaxws.JAXWSMethodInvoker.invoke(JAXWSMethodInvoker.java:60)
at
org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:75)
at
org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:58)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown
Source)
at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at
org.apache.cxf.workqueue.SynchronousExecutor.execute(SynchronousExecutor.java:37)
at
org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:106)
at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:244)
at
org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:110)
at
org.apache.cxf.transport.servlet.ServletDestination.invoke(ServletDestination.java:98)
at
org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:423)
at
org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:178)
at
org.apache.cxf.transport.servlet.AbstractCXFServlet.invoke(AbstractCXFServlet.java:142)
at
org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:179)
at
org.apache.cxf.transport.servlet.AbstractHTTPServlet.doPost(AbstractHTTPServlet.java:103)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
at
org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:159)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:291)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:602)
at
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NullPointerException
at
org.drools.rule.PredicateConstraint.isAllowed(PredicateConstraint.java:291)
... 48 more
org.drools.RuntimeDroolsException: Exception executing predicate
(lcki.getWS_RiskScore() >= 790 && (lcki.getWS_RiskScore() -
lcki.getAvgRiskScore()) >= 500) || (lcki.getWS_RiskScore() >= 750 &&
((lcki.getWS_RiskScore() - lcki.getWS_RiskScore())/lcki.getWS_RiskScore())
= 4) || (lcki.getWS_RiskScore() >= 750 &&
lcki.getWS_RiskScore() <= 350 )
at
org.drools.rule.PredicateConstraint.isAllowed(PredicateConstraint.java:298)
at org.drools.reteoo.AlphaNode.assertObject(AlphaNode.java:130)
at
org.drools.reteoo.CompositeObjectSinkAdapter.doPropagateAssertObject(CompositeObjectSinkAdapter.java:450)
at
org.drools.reteoo.CompositeObjectSinkAdapter.propagateAssertObject(CompositeObjectSinkAdapter.java:378)
at
org.drools.reteoo.ObjectTypeNode.assertObject(ObjectTypeNode.java:193)
at
org.drools.reteoo.EntryPointNode.assertObject(EntryPointNode.java:191)
at
org.drools.common.NamedEntryPoint.insert(NamedEntryPoint.java:332)
at
org.drools.common.NamedEntryPoint.insert(NamedEntryPoint.java:293)
at
org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:905)
at
org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:864)
at
org.drools.impl.StatefulKnowledgeSessionImpl.insert(StatefulKnowledgeSessionImpl.java:255)
at
com.etrade.jws.actimize.rule.RuleServiceImpl.applyLoginRules(RuleServiceImpl.java:38)
at
com.etrade.jws.actimize.service.LoginChallengeImpl.getLoginChallengeDecision(LoginChallengeImpl.java:130)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at
org.apache.cxf.service.invoker.AbstractInvoker.performInvocation(AbstractInvoker.java:173)
at
org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:89)
at
org.apache.cxf.jaxws.JAXWSMethodInvoker.invoke(JAXWSMethodInvoker.java:60)
at
org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:75)
at
org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:58)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown
Source)
at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at
org.apache.cxf.workqueue.SynchronousExecutor.execute(SynchronousExecutor.java:37)
at
org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:106)
at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:244)
at
org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:110)
at
org.apache.cxf.transport.servlet.ServletDestination.invoke(ServletDestination.java:98)
at
org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:423)
at
org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:178)
at
org.apache.cxf.transport.servlet.AbstractCXFServlet.invoke(AbstractCXFServlet.java:142)
at
org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:179)
at
org.apache.cxf.transport.servlet.AbstractHTTPServlet.doPost(AbstractHTTPServlet.java:103)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
at
org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:159)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:291)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:602)
at
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NullPointerException
at
org.drools.rule.PredicateConstraint.isAllowed(PredicateConstraint.java:291)
... 48 more
--
View this message in context:
http://drools.46999.n3.nabble.com/java-lang-NullPointerException-at-org-d...
Sent from the Drools: User forum mailing list archive at
Nabble.com.