[
https://issues.redhat.com/browse/DROOLS-4888?page=com.atlassian.jira.plug...
]
韩 济蓬 commented on DROOLS-4888:
------------------------------
I use the spring-boot-maven-plugin to execute the package command and generate the jar
file. When running the jar, I couldn't find the DRL file. I don't have a computer
with me now, so I can paste the output next Monday.
When I tried to debug the jar file remotely, it displayed the information I pasted in the
first message
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
Priority: Major
Attachments: springdrools.zip
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_singl...
-->
<!-- <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)