Hello Everybody, I've used Drools5.1.0 and I have following Config In Spring :
<drools:resource id="profileChangeProcess" type="DRF" source="classpath:/process/profilechangeprocess.rf"></drools:resource> <drools:resource id="documentsRule" type="DRL" source="classpath:/rules/documentsrule.drl" /> <drools:resource id="ChangeSet" type="CHANGE_SET" source="classpath:/ChangeSet.xml"></drools:resource> <drools:resource-change-scanner id="scanner" interval="10" /> <drools:kagent id="agent" kbase="knowledgeBase" new-instance="true"> <drools:resources> <drools:resource ref="profileChangeProcess"></drools:resource> <drools:resource ref="documentsRule"></drools:resource> <drools:resource ref="ChangeSet"></drools:resource> </drools:resources> </drools:kagent> <drools:kbase id="knowledgeBase"></drools:kbase> now when i run the code i get following exception : org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'kSession': Error setting property values; nested exception is org.springframework.beans.NotWritablePropertyException: Invalid property 'knowledgeAgent' of bean class [org.drools.container.spring.beans.StatefulKnowledgeSessionBeanFactory]: Bean property 'knowledgeAgent' is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter? at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1341) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1067) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:511) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:450) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:290) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:287) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:189) at org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:820) at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:762) at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:680) at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:475) ... 30 more Caused by: org.springframework.beans.NotWritablePropertyException: Invalid property 'knowledgeAgent' of bean class [org.drools.container.spring.beans.StatefulKnowledgeSessionBeanFactory]: Bean property 'knowledgeAgent' is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter? at org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:1012) at org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:857) at org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:76) at org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:58) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1338) ... 41 more any help or pointers to examples may help............. ----- Keep Working >> KiranP -- View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Drools-Spring-Config-for-Knowledge-Agent-tp1634280p1634280.html Sent from the Drools - User mailing list archive at Nabble.com. _______________________________________________ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users