[
https://issues.jboss.org/browse/DROOLS-1540?page=com.atlassian.jira.plugi...
]
Fabio Bonfante edited comment on DROOLS-1540 at 5/13/19 8:51 AM:
-----------------------------------------------------------------
I add just two cents on the "issue" sharing my experience on another
corner-case... (sadly) Java serialization.
I was able to use the documented work-around, I've a spring-devtools.properties with:
{noformat}
restart.include.drools-core=/drools-core-7.0.0.Final.jar
restart.include.drools-compiler=/drools-compiler-7.0.0.Final.jar
restart.include.kie-api=/kie-api-7.0.0.Final.jar
restart.include.kie-ci=/kie-ci-7.0.0.Final.jar
restart.include.kie-internal=/kie-internal-7.0.0.Final.jar
{noformat}
But in a rule using java serialization, I got an amazing:
{noformat}
Caused by: java.lang.ClassCastException: com.example.OrderREO cannot be cast to
com.example.OrderREO
at
rules.com.example.CloneWithServiceCode.cloneWithServiceCode(CloneWithServiceCode.java:55)
~[na:na]
at
rules.com.example.Rule_My_Rule_621849765706.defaultConsequence(My_Rule_621849765706.java:9)
~[na:na]
at
rules.com.example.Rule_My_Rule_621849765706DefaultConsequenceInvokerGenerated.evaluate(Unknown
Source) ~[na:na]
at rules.com.example.Rule_My_Rule_621849765706DefaultConsequenceInvoker.evaluate(Unknown
Source) ~[na:na]
at org.drools.core.phreak.RuleExecutor.innerFireActivation(RuleExecutor.java:431)
~[drools-core-7.0.0.Final.jar:7.0.0.Final]
... 129 common frames omitted
{noformat}
Given that I'll have to wipe-out every form of Java Serialization from the rules...
(the Object.clone() was so tempting for our business-rules team... and they didn't
knows the drawbacks) I would like to know if I missed to specify some jar in the
spring-devtools.properties.
Thank's in advance.
was (Author: fabio.bonfante):
I add just two cents on the "issue" sharing my experience on another
corner-case... (sadly) Java serialization.
I was able to use the documented work-around, I've a spring-devtools.properties with:
{{restart.include.drools-core=/drools-core-7.0.0.Final.jar
restart.include.drools-compiler=/drools-compiler-7.0.0.Final.jar
restart.include.kie-api=/kie-api-7.0.0.Final.jar
restart.include.kie-ci=/kie-ci-7.0.0.Final.jar
restart.include.kie-internal=/kie-internal-7.0.0.Final.jar
}}
But in a rule using java serialization, I got an amazing:
{{Caused by: java.lang.ClassCastException: com.example.OrderREO cannot be cast to
com.example.OrderREO
at
rules.com.example.CloneWithServiceCode.cloneWithServiceCode(CloneWithServiceCode.java:55)
~[na:na]
at
rules.com.example.Rule_My_Rule_621849765706.defaultConsequence(My_Rule_621849765706.java:9)
~[na:na]
at
rules.com.example.Rule_My_Rule_621849765706DefaultConsequenceInvokerGenerated.evaluate(Unknown
Source) ~[na:na]
at rules.com.example.Rule_My_Rule_621849765706DefaultConsequenceInvoker.evaluate(Unknown
Source) ~[na:na]
at org.drools.core.phreak.RuleExecutor.innerFireActivation(RuleExecutor.java:431)
~[drools-core-7.0.0.Final.jar:7.0.0.Final]
... 129 common frames omitted}}
Given that I'll have to wipe-out every form of Java Serialization from the rules...
(the Object.clone() was so tempting for our business-rules team... and they didn't
knows the drawbacks) I would like to know if I missed to specify some jar in the
spring-devtools.properties.
Thank's in advance.
Drools does not work with spring-boot-devtools
----------------------------------------------
Key: DROOLS-1540
URL:
https://issues.jboss.org/browse/DROOLS-1540
Project: Drools
Issue Type: Bug
Components: core engine
Affects Versions: 6.5.0.Final, 7.20.0.Final
Reporter: G Xiong
Assignee: Mario Fusco
Priority: Critical
Attachments: complete.zip
Drools does work with spring-boot-devtools.
If you add in pom.xml the following, no rules will be fired in Drools.
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
</dependency>
if you comment out this, then rules will be fired in Drools.
--
This message was sent by Atlassian Jira
(v7.12.1#712002)