[jboss-jira] [JBoss JIRA] (DROOLS-4888) spring boot and drools integration occur path error and cannot load rule

韩 济蓬 (Jira) issues at jboss.org
Thu Dec 19 02:09:00 EST 2019


韩 济蓬 created DROOLS-4888:
----------------------------

             Summary: spring boot and drools integration occur path error and cannot load rule
                 Key: DROOLS-4888
                 URL: https://issues.redhat.com/browse/DROOLS-4888
             Project: Drools
          Issue Type: Bug
          Components: docs, integration
    Affects Versions: 7.30.0.Final
            Reporter: 韩 济蓬
            Assignee: Mario Fusco


I'm trying to run drools 7.30.0.Final with Spring Boot 2.2.2.RELEASE.I configured drools as the documentation says. My drools-config.xml configuration file is where I keep the drools beans and looks like this:

{code:xml}
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:kie="http://drools.org/schema/kie-spring"
       xsi:schemaLocation="http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans.xsd http://drools.org/schema/kie-spring http://drools.org/schema/kie-spring.xsd">
    <kie:kmodule id="sample_module">
        <kie:kbase name="testRules" packages="rules" declarativeAgenda="true">
            <kie:ksession name="ksession1" type="stateless"/>
            <kie:ksession name="ksession2" scope="prototype">
                <kie:ruleRuntimeEventListener ref="mockRuleRuntimeEventListener" />
                <kie:consoleLogger />
            </kie:ksession>
        </kie:kbase>
    </kie:kmodule>

    <!-- https://docs.jboss.org/drools/release/7.30.0.Final/drools-docs/html_single/index.html#_important_note -->
    <!-- <bean id="kiePostProcessor" class="org.kie.spring.KModuleBeanFactoryPostProcessor"/> -->
    <bean class="org.kie.spring.annotations.KModuleAnnotationPostProcessor"/>
</beans>
{code}

occur a warn looks: 

2019-12-19 14:44:25.231  WARN 9916 --- [           main] o.d.c.kie.builder.impl.KieProject        : No files found for KieBase testRules

when i try debug org.kie.spring.KModuleBeanFactoryPostProcessor. Trace to ZipKieModule at line 133. cannot uncompress,get variable urlPath value is "/BOOT-INF/classes" jarFile values is "\Users\user\Desktop\springdrools\target\spring-drools-1.0.jar!\BOOT-INF\classes". lead to cannot load resource.




--
This message was sent by Atlassian Jira
(v7.13.8#713008)



More information about the jboss-jira mailing list