[
https://issues.redhat.com/browse/DROOLS-4888?page=com.atlassian.jira.plug...
]
Mario Fusco resolved DROOLS-4888.
---------------------------------
Resolution: Cannot Reproduce
I cannot reproduce this problem. The project that you sent works perfectly for me and when
I try to launch the spring-boot app it generates the output that I'm pasting below. Do
you have a different output? if so can you please paste it?
{code}
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v2.2.2.RELEASE)
2019-12-20 17:30:46.167 INFO 7204 --- [ main]
c.b.test.spring.drools.SpringDroolsApp : Starting SpringDroolsApp on new-host with PID
7204 (/home/mfusco/Downloads/springdrools/target/classes started by mfusco in
/home/mfusco/Downloads/springdrools)
2019-12-20 17:30:46.169 INFO 7204 --- [ main]
c.b.test.spring.drools.SpringDroolsApp : No active profile set, falling back to default
profiles: default
2019-12-20 17:30:46.820 INFO 7204 --- [ main]
o.k.s.KModuleBeanFactoryPostProcessor : ::
BeanFactoryPostProcessor::postProcessBeanFactory called ::
2019-12-20 17:30:46.823 WARN 7204 --- [ main]
o.d.c.k.b.impl.ClasspathKieProject : Unable to find pom.properties in
/home/mfusco/Downloads/springdrools/target/classes
2019-12-20 17:30:46.828 INFO 7204 --- [ main]
o.d.c.k.b.impl.ClasspathKieProject : Recursed up folders, found and used pom.xml
/home/mfusco/Downloads/springdrools/pom.xml
2019-12-20 17:30:46.828 INFO 7204 --- [ main]
o.k.s.KModuleBeanFactoryPostProcessor : Found project with releaseId:
cn.beausoft.test:spring-drools:1.0
2019-12-20 17:30:46.908 INFO 7204 --- [ main]
o.k.s.KModuleBeanFactoryPostProcessor : Adding KieModule from
/home/mfusco/Downloads/springdrools/target/classes to repository.
2019-12-20 17:30:47.152 INFO 7204 --- [ main]
o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 1235 (http)
2019-12-20 17:30:47.157 INFO 7204 --- [ main]
o.apache.catalina.core.StandardService : Starting service [Tomcat]
2019-12-20 17:30:47.158 INFO 7204 --- [ main]
org.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache
Tomcat/9.0.29]
2019-12-20 17:30:47.215 INFO 7204 --- [ main]
o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded
WebApplicationContext
2019-12-20 17:30:47.215 INFO 7204 --- [ main] o.s.web.context.ContextLoader
: Root WebApplicationContext: initialization completed in 999 ms
2019-12-20 17:30:47.929 INFO 7204 --- [ main]
o.s.s.concurrent.ThreadPoolTaskExecutor : Initializing ExecutorService
'applicationTaskExecutor'
2019-12-20 17:30:48.087 INFO 7204 --- [ main] o.s.s.c.ThreadPoolTaskScheduler
: Initializing ExecutorService 'taskScheduler'
2019-12-20 17:30:48.130 INFO 7204 --- [ main]
o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat started on port(s): 1235 (http) with
context path ''
2019-12-20 17:30:48.134 INFO 7204 --- [ main]
c.b.test.spring.drools.SpringDroolsApp : Started SpringDroolsApp in 2.297 seconds (JVM
running for 2.764)
{code}
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)