[rules-users] java.lang.NullPointerException at org.drools.rule.PredicateConstraint.isAllowed(PredicateConstraint.java:291)

prem.kishore imprem at gmail.com
Tue Jun 19 22:49:45 EDT 2012


Thanks Vincent .I did tried the rule after replacing the getter on the fact
object . Still the same issue . Rule works fine when other application
starts up and continue to work  unless rule is modified in the guvnor . I am
using drool spring integration for automatic reloading of the rules from
guvnor . As soon i made any change in the guvnor rule and rule is refreshed
in the other application it starts throwing npe when rule is evaluated .
below is the my drool spirng config .

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xmlns:context="http://www.springframework.org/schema/context"
xmlns:drools="http://drools.org/schema/drools-spring"
	xmlns:util="http://www.springframework.org/schema/util"
	xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
    http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-2.5.xsd
    http://drools.org/schema/drools-spring
http://drools.org/schema/drools-spring-1.3.0.xsd
    http://www.springframework.org/schema/util
http://www.springframework.org/schema/util/spring-util-2.0.xsd"
	default-autowire="byName">
	<drools:kbase id="kbase1" />
	<drools:kagent id="kagent1" kbase="kbase1" new-instance="false">
		<drools:resources>
			<drools:resource type="PKG"
source="http://sit135w86m7.etrade.com/org.drools.guvnor.Guvnor/package/EnhanceLogin/LATEST"
				basic-authentication="enabled" username="admin" password="admin"  />
				
		</drools:resources>
	</drools:kagent>
	<bean
class="org.springframework.beans.factory.config.MethodInvokingFactoryBean">
		<property name="targetObject">
			<bean
class="org.springframework.beans.factory.config.MethodInvokingFactoryBean">
				<property name="targetClass" value="java.lang.System" />
				<property name="targetMethod" value="getProperties" />
			</bean>
		</property>
		<property name="targetMethod" value="putAll" />
		<property name="arguments">
			<util:properties>
				<prop
key="drools.resource.urlcache">#{systemEnvironment['CATALINA_BASE']}/conf</prop>
			</util:properties>
		</property>
	</bean>
	<drools:ksession id="ksession1" type="stateful" kbase="kbase1" />
	<bean id="ruleServiceImpl"
class="com.etrade.jws.actimize.rule.RuleServiceImpl">
		<property name="ksession" ref="ksession1" />
		<property name="kbase" ref="kbase1" />
	</bean>
	<drools:resource-change-scanner id="scanner" interval="60" />
	<bean class="com.etrade.jws.actimize.rule.ResourceChangeScannerStarter"
depends-on="scanner" />
</beans>

--
View this message in context: http://drools.46999.n3.nabble.com/java-lang-NullPointerException-at-org-drools-rule-PredicateConstraint-isAllowed-PredicateConstraint--tp4018078p4018083.html
Sent from the Drools: User forum mailing list archive at Nabble.com.


More information about the rules-users mailing list