Details
-
Bug
-
Resolution: Done
-
Minor
-
5.2.0.M1
-
-
Workaround Exists
-
-
Low
Description
An exception occurs if you define a stateful ksession AFTER a kagent in spring's config file.
The problem is that drools-spring will try to set the kagent attribute of the session. This attribute only exists for stateless ksessions.
The exception you get is:
Exception in thread "main"
org.springframework.beans.factory.BeanCreationException: Error creating bean
with name 'ksession2': 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.