[rules-users] No setter found for property 'kBaseName' in class 'org.kie.spring.factorybeans.KBaseFactoryBean'

profversaggi profversaggi at gmail.com
Mon Apr 7 21:50:14 EDT 2014


Thanks Mark! I'll try that (*kmodule-spring.xml*) today ....


In the mean time I answered one of my own questions:

> Moreover - *do I have to do it this way?* The project executes the Spring
> MVC 
> Web App just fine and the Drools KIE test case runs perfectly in the same 
> Maven project. *Can't I just integrate them programmatically instead?*

The answer is *yes*,  I can do it programmatically instead. I tested running
the simple DroolsTest code in one of the Spring MVC Controllers (just for
kicks and giggles) and after fixing the thorny problem articulated below ... 
IT Worked!

I was able to *enter form data in a Spring MVC Web app and have it execute
Drools KIE on the back end*....


There was an error which warrants articulating for posterity sake - here it
is below:

I was Trying to get Drools to execute from Spring MVC WEB in Pure Maven
Project (no added natures of any kind) and ran head first into this problem:

*ERROR KieContainerImpl - Unknown KieSession name: ksession-rules*

Initial RND: (some direction - but no solutions)

Unknown KieSession name in drools 6.0 (while trying to add drools to
existing maven/eclipse project) 
http://drools.46999.n3.nabble.com/Null-pointer-exception-when-adding-drools-to-existing-project-td4027944.html#a4028011

Related Problem (... but a big clue):

*WARN ClasspathKieProject - Unable to load pom.properties tried recursing
down from/Apache-Tomcat7/webapps/maven-spring-drools/WEB-INF/classes*

SOLUTION:

As it turns out, creating the directory *WEB-INF/classes* and placing the
files* pom.properties* and *pom.xml* in it *solves the problem*. The clue
came from this link:
http://drools.46999.n3.nabble.com/Drools-6-Unable-to-build-index-of-kmodule-xml-td4026791.html
- where Mark Proctor indicated that the project has to be a maven project,
and it *needs to find pom.properties*.

As soon as the KIE finds the *pom.properties* file, it figures out the
KieSession name and the problem is solved.

Note: I'd suspect you'd have to manually keep that POM.XML file updated but
the pom.properties file never changes.

This has been my experience - hope it helps someone....



--
View this message in context: http://drools.46999.n3.nabble.com/No-setter-found-for-property-kBaseName-in-class-org-kie-spring-factorybeans-KBaseFactoryBean-tp4029143p4029147.html
Sent from the Drools: User forum mailing list archive at Nabble.com.


More information about the rules-users mailing list