L.S.,

The DroolsComponent doesn't have a ruleBaseResource property, the
DroolsEndpoint does.  Usually, the easiest way to use the JBI components in
a static configuration file is by adding the namespace for the component and
using a <drools:component><drools:endpoint.../></drools:component> in the
<sm:component/> tag you have (instead of using the <bean/> thing).

This will allow you to configure the drools endpoint exactly as you'll find
documented in the relevant pages on the site.


Regards,

Gert


kokkolo wrote:
> 
> Hi,
> 
> I'm trying to create a rule engine component and start it statically from
> servicemix.xml. Here is my snippet:
> 
> <sm:activationSpec id="HelloRuleComponent" 
>       service="sim:HelloRuleComponent">
>    <sm:component>
>     <bean xmlns="http://xbean.org/schemas/spring/1.0";
>     class="org.apache.servicemix.drools.DroolsComponent">
>        <property name="ruleBaseResource" value="classpath:/HelloRule.drl"
> />
>       </bean>
>      </sm:component>
>     </sm:activationSpec>
> 
> When I start servicemix I get the exception saying "No property
> 'ruleBaseResource' found" (see below). 
> 
> I tried using org.apache.servicemix.component.drools.DroolsComponent
> instead of 
> org.apache.servicemix.drools.DroolsComponent but in that case I get some
> SAX parsers exceptions, which made me think that only rule resorce in xml
> format is allowed in that case.
> 
> The question is: Is it possible, to use drl file from servciemix.xml or
> should I use xBeans?
> 
> I'm using servicemix-3.2.2
> 
> Thanks,
> Frane.
> 
> org.springframework.beans.factory.BeanCreationException: Error creating
> bean with name 'jbi' defined in class path resource [stasim2.xml]: Cannot
> create inner bean 'sm:activationSpec#1976011' of type
> [org.apache.servicemix.jbi.container.ActivationSpec] while setting bean
> property 'activationSpecs' with key [8]; nested exception is
> org.springframework.beans.factory.BeanCreationException: Error creating
> bean with name 'sm:activationSpec#1976011' defined in class path resource
> [stasim2.xml]: Cannot create inner bean
> 'org.apache.servicemix.drools.DroolsComponent' of type
> [org.apache.servicemix.drools.DroolsComponent] while setting constructor
> argument with index 1; nested exception is
> org.springframework.beans.factory.BeanCreationException: Error creating
> bean with name 'org.apache.servicemix.drools.DroolsComponent' defined in
> class path resource [stasim2.xml]: Initialization of bean failed; nested
> exception is org.springframework.beans.InvalidPropertyException: Invalid
> property 'ruleBaseResource' of bean class
> [org.apache.servicemix.drools.DroolsComponent]: No property
> 'ruleBaseResource' found
> [...]
> 


-----
---
Gert Vanthienen
http://www.anova.be
-- 
View this message in context: 
http://www.nabble.com/Loading-drl-rule-file-as-a-ruleBaseResource-in-servicemix.xml-tp19089356p19096731.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.

Reply via email to