I have tried of using the sample coding given the link given by you:
But i am getting the following error:
org.springframework.beans.factory.BeanCreationException: Error
creating bean with name 'ruleBase' defined in ServletContext resource
[/WEB-INF/insurance-servlet.xml]: Initialization of bean failed;
nested exception is java.lang.RuntimeException: Operator '40' does not
exist for StringEvaluator
        
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:403)
        
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:233)
        
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:145)
        
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:277)
        
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:313)
        
org.springframework.web.context.support.AbstractRefreshableWebApplicationContext.refresh(AbstractRefreshableWebApplicationContext.java:139)
        
org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:306)
        
org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:251)
        
org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:220)
        
org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:112)
        javax.servlet.GenericServlet.init(GenericServlet.java:211)
        
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
        
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
        
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
        
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
        
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
        
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
        
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
        java.lang.Thread.run(Thread.java:595)
========================================================
My insurance-servlet.xml:
<beans>
        <!-- default handlermapping -->
        <bean id="beanNameUrlMapping"
class="org.springframework.web.servlet.handler.BeanNameUrlHandlerMapping"/>

        <bean name="/home.htm" class="com.sample.InsuranceController"
singleton="false">
                <property name="ruleBase">
                        <ref bean="ruleBase"/>
                </property>
                <property name="insurBean">
                        <ref bean="insurance"/>
                </property>
        </bean>

        <!-- View Resolver -->
        <bean id="viewResolver"
class="org.springframework.web.servlet.view.InternalResourceViewResolver">
                <property name="prefix">
                        <value>/WEB-INF/jsp/</value>                
                </property>
                <property name="suffix">
                        <value>.jsp</value>
                </property>               
        </bean>
        
        <!-- Bean -->     
        <bean id="insurance" class="com.sample.InsuranceBean"/>


        <bean id="ruleBase" class="com.sample.RuleBaseBeanFactory">
                <property name="drlResourceList">
                        <list>
                                <value 
type="org.springframework.core.io.Resource">classpath:/com/sample/Approval.drl</value>
                        </list>
                </property>

                <property name="packageBuilderConfiguration">
                        <bean 
class="org.drools.compiler.PackageBuilderConfiguration">
                                <property name="javaLanguageLevel" value="1.5"/>
                        </bean>
                </property>
        </bean>   
</beans>



On 2/19/07, Olenin, Vladimir (MOH) <[EMAIL PROTECTED]> wrote:
Check out 'Spring Modules' subproject - it has a DROOLS integration module.
Haven't used it myself yet, so not sure whether it's mature/compatible with
most recent release.

https://springmodules.dev.java.net/docs/reference/0.7/html/jsr94.html#d0e570
9

https://springmodules.dev.java.net/

Vlad


-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Niyas
Sent: 19 February 2007 09:49
To: rules-users@lists.jboss.org
Subject: [rules-users] Drools With Spring Framework Problem

Hi all,

I am in need of integrating Drools JBoss Rule Engine with Spring Framework.
I have tried sample rule engine examples in the Drools in the
standalone with the help od drools IDE for eclipse 3.2.
And I also tried some example in the Spring Framework,to know how it
works. I have tried some examples in IOC, MVC and JDBC in the spring
framework.

Now, I want to use both Drools and Spring Framework in such a way that
Spring will have the MVC application and it should validate the rules,
which written in the drools (.drl)

I don't know how to begin with/what are he configuration files needed
to setup. PLease if anyone have the sample coding on Drools with
Spring or any other links willl be very useful.

And also, guide me what are the things need to be know for Spring with
Drools. While I have searched in google, lots of things came up like:

Use JSR94... (which is mentioning to configure RuleServiceProvider,
RuleRuntime, RuleSet..and others..which seeme to be confusing and not
clear)

Whether there are any API for drools with spring that DROOLS is
supporting..like org.drools.spring.metadata.ArgumentMetadataSource. I
don't find these Drools API section
http://labs.jboss.com/file-access/default/members/jbossrules/freezone/docs/3
.0.5/apidocs/index.html
_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users

_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users

Reply via email to