Hi Vinodkiran!

What I did was this - I embarked on a *pure* process and then merged the results. My goal was to create a *pure* Maven project without any specific natures of any kind imposed upon them (in Eclipse) which would run a Drools KIE function as well as a Spring MVC WEB App function from that single Maven project. 

Prework: (A) I created a standard Drools test project using a Eclipse Drools KIE *Nature* and got it running. (B) I created a standard Spring MVC WEB project using the Eclipse Spring 3 *Nature* and got that running properly as well. These would be inspiration for their pure Maven equivalents counterparts.

First: I created a pure Maven Drools KIE project and got that running with the standard DroolsTest and corresponding Sample.drl running as expected. So to be clear it was a Maven project that just so happened to run Drools KIE in it. Execution took place in Eclipse

Second: I created a totally different pure Maven Spring MVC WEB project and got that running locally using Tomcat7. Again - it was a pure Maven project that just so happened to run a Spring 3.2.3 MVC Web App in it and deploying it as a WAR to a local Tomcat7 installation. Execution took place through a web browser: http://localhost:8080/maven-spring

Third: I created another totally different pure Maven project which was a combination of the (1) pure Maven Drools KIE project and the (2) pure Maven Spring MVC WEB project. I copied the appropriate directory structures over from the individual projects to their respective places in the combination project and (after a bit of fiddling) was able to run *each* (Drools and Spring) projects functionality independently - directly from the single (combination) Maven project. Execution for the spring portion initiated through a web browser: http://localhost:8080/maven-spring-drools, and for the Drools portion from the IDE.

Forth: Integration - this is where I started having the problems we are corresponding about. The Drools doc tells us to use variants of the below code to tie Drools KIE and Spring together - except it *never* tells us where to put it. 

<kie:kmodule id="sample_module">
  <kie:kbase name="kbase1" packages="org.drools.spring.sample">
  </kie:kbase>
</kie:kmodule>

<bean id="kiePostProcessor" class="org.kie.spring.KModuleBeanFactoryPostProcessor"/>


I found references to putting it in the Spring application-config.xml file so I tried it there. Then I received the following error:

ERROR:
No setter found for property 'kBaseName' in class 'org.kie.spring.factorybeans.KBaseFactoryBean' 
[config set: maven-spring-drools/web-context application-config.xml
/maven-spring-drools/src/main/resources/spring line 8 Spring Beans Problem

That's when Mark suspected the current code looks for the different xml, depending on the container. i.e. spring looks for kmodule-spring.xml. Perhaps what is needed is to fallback to kmodule.xml if that is not present. (I haven't tested that yet).


In any case I tried another avenue toward integration and that is programmatically integrate Drools KIE into the Spring MVC Web App Controllers - which as it turned out  (after a bit of tweeking) - it work quite well.

I'm still very curious as to how to accomplish the integration the way the documentation articulates, but I quite glad it can be done programmatically as well.

If I can help out in any way just ask ....

-matt



On Mon, Apr 7, 2014 at 9:49 PM, vinodkiran [via Drools] <[hidden email]> wrote:
Are you having both kmodule.xml and your spring configuration file? With spring, you can configure all your kie resources without the need for a separate kmodule.xml.


Can you provide me with the following?

1. Full stack trace
2. your spring configuration file and kmodule.xml




If you reply to this email, your message will be added to the discussion below:
http://drools.46999.n3.nabble.com/No-setter-found-for-property-kBaseName-in-class-org-kie-spring-factorybeans-KBaseFactoryBean-tp4029143p4029146.html
To unsubscribe from No setter found for property 'kBaseName' in class 'org.kie.spring.factorybeans.KBaseFactoryBean', click here.
NAML



--
#########################################################
Matthew R. Versaggi, President & CEO
Versaggi Information Systems, Inc.
Adjunct Professor of eBusiness DePaul University
Email: mailto:[hidden email], [hidden email]
M: 630-292-8422 
LinkedIn:  http://www.linkedin.com/in/versaggi
About Me: http://www.matt-versaggi.com/resume/
#########################################################


View this message in context: Re: No setter found for property 'kBaseName' in class 'org.kie.spring.factorybeans.KBaseFactoryBean'
Sent from the Drools: User forum mailing list archive at Nabble.com.