[JBoss JIRA] (WFWIP-357) No autoupdate for EAP_RUNTIME_IMAGE in eap-s2i-build template
by Jan Blizňák (Jira)
[ https://issues.redhat.com/browse/WFWIP-357?page=com.atlassian.jira.plugin... ]
Jan Blizňák edited comment on WFWIP-357 at 9/18/20 4:32 AM:
------------------------------------------------------------
This can be probably fixed just by adding additional trigger to either of BuildConfigs, eg. equivalent of this:
{code:java}
oc set triggers bc autoupgrading-app --from-image=eap7-runtime-imagestream:latest
{code}
But design decision needs to be made:
# leave as is (probably not? - contrary to analysis)
## no rebuild when _only_ runtime image gets updated - we can argue how big issue it is as theoretically what needs to go to runtime image most likely is needed for builder image too, so it gets updated
# add trigger to the second-in-chain BuildConfig
## quicker as only one build is triggered and intermediate resources reused
## requires intermediate imagestream to exist
## doesn't suffer from duplicated rebuild
# add trigger to the first-in-chain BuildConfig
## safer as everything is build from scratch
## slower as two builds need to be done
## could suffer from double rebuild - when both builder and runtime image is updated
was (Author: jbliznak):
This can be probably fixed just by adding additional trigger to either of BuildConfigs, eg. equivalent of this:
{code:java}
oc set triggers bc autoupgrading-app --from-image=eap7-runtime-imagestream:latest
{code}
But design decision needs to be made:
# leave as is (probably not? - contrary to analysis)
## no rebuild when _only_ runtime image gets updated - we can argue how big issue it is as theoretically what needs to go to runtime image most likely is needed for builder image too, so it gets updated
# add trigger to the second-in-chan BuildConfig
## quicker as only one build is triggered and intermediate resources reused
## requires intermediate imagestream to exist
## doesn't suffer from duplicated rebuild
# add trigger to the first-in-chain BuildConfig
## safer as everything is build from scratch
## slower as two builds need to be done
## could suffer from double rebuild - when both builder and runtime image is updated
> No autoupdate for EAP_RUNTIME_IMAGE in eap-s2i-build template
> -------------------------------------------------------------
>
> Key: WFWIP-357
> URL: https://issues.redhat.com/browse/WFWIP-357
> Project: WildFly WIP
> Issue Type: Bug
> Components: OpenShift
> Reporter: Jan Blizňák
> Assignee: Jeff Mesnil
> Priority: Major
>
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
5 years, 10 months
[JBoss JIRA] (DROOLS-5453) Add/Fix pmml(s) to kie-pmml-regression tests
by Gabriele Cardosi (Jira)
[ https://issues.redhat.com/browse/DROOLS-5453?page=com.atlassian.jira.plug... ]
Gabriele Cardosi closed DROOLS-5453.
------------------------------------
> Add/Fix pmml(s) to kie-pmml-regression tests
> --------------------------------------------
>
> Key: DROOLS-5453
> URL: https://issues.redhat.com/browse/DROOLS-5453
> Project: Drools
> Issue Type: Task
> Reporter: Gabriele Cardosi
> Assignee: Gabriele Cardosi
> Priority: Major
> Labels: TrustyAI
> Attachments: LinearRegressionSampleWithTransformations.pmml, LogisticRegression.pmml, order-approval.pmml
>
>
> Add attached pmml(s) to kie-pmml-regression-tests and verify
> 1) it works *without* model name
> 2) results are equals to the jpmml evaluator ones
> 3) outputfields are fixed and correctly populated
> Also fix/verify all tests with the indication
>
> {code:java}
> // TODO {gcardosi} TO BE FIXED WITH DROOLS-5453
> {code}
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
5 years, 10 months
[JBoss JIRA] (DROOLS-5652) String relational comparison fails with executable-model
by Toshiya Kobayashi (Jira)
[ https://issues.redhat.com/browse/DROOLS-5652?page=com.atlassian.jira.plug... ]
Toshiya Kobayashi updated DROOLS-5652:
--------------------------------------
Description:
String relational comparison fails with executable-model
{noformat}
Person( name > "Bob" )
{noformat}
generates Predicate like this:
{code:java}
@org.drools.compiler.kie.builder.MaterializedLambda()
public enum LambdaPredicate23581163B2FDAA9B650DDB3B8C587DE2 implements org.drools.model.functions.Predicate1<org.drools.modelcompiler.domain.Person> {
...
@Override()
public boolean test(org.drools.modelcompiler.domain.Person _this) throws java.lang.Exception {
return org.drools.modelcompiler.util.EvaluationUtil.greaterThanStringsAsNumbers(_this.getName(), "Bob");
}
}
{code}
then, fails with this error:
{noformat}
java.lang.RuntimeException: java.lang.NumberFormatException: Character J is neither a decimal digit number, decimal point, nor "e" notation exponential mark.
at org.drools.modelcompiler.constraints.ConstraintEvaluator.evaluate(ConstraintEvaluator.java:95)
at org.drools.modelcompiler.constraints.LambdaConstraint.isAllowed(LambdaConstraint.java:133)
at org.drools.core.reteoo.AlphaNode.assertObject(AlphaNode.java:136)
...
Caused by: java.lang.NumberFormatException: Character J is neither a decimal digit number, decimal point, nor "e" notation exponential mark.
at java.base/java.math.BigDecimal.<init>(BigDecimal.java:518)
at java.base/java.math.BigDecimal.<init>(BigDecimal.java:401)
at java.base/java.math.BigDecimal.<init>(BigDecimal.java:834)
at org.drools.modelcompiler.util.EvaluationUtil.greaterThanStringsAsNumbers(EvaluationUtil.java:113)
at defaultpkg.P23.LambdaPredicate23581163B2FDAA9B650DDB3B8C587DE2.test(LambdaPredicate23581163B2FDAA9B650DDB3B8C587DE2.java:17)
at defaultpkg.P23.LambdaPredicate23581163B2FDAA9B650DDB3B8C587DE2.test(LambdaPredicate23581163B2FDAA9B650DDB3B8C587DE2.java:8)
at org.drools.model.functions.Predicate1$Impl.test(Predicate1.java:39)
at org.drools.modelcompiler.constraints.ConstraintEvaluator.evaluate(ConstraintEvaluator.java:92)
... 48 more
{noformat}
FYI) It should be supported
https://docs.jboss.org/drools/release/latest/drools-docs/html_single/inde...
{noformat}
4.1.8.6. Supported operators in DRL pattern constraints
<, <=, >, >=
Use these operators on properties with natural ordering. For example, for Date fields, the < operator means before, and for String fields, the operator means alphabetically before. These properties apply only to comparable properties.
Example constraints with before operator
Person( birthDate < $otherBirthDate )
Person( firstName < $otherFirstName )
{noformat}
was:
String relational comparison fails with executable-model
{noformat}
Person( name > "Bob" )
{noformat}
generates Predicate like this:
{code:java}
@org.drools.compiler.kie.builder.MaterializedLambda()
public enum LambdaPredicate23581163B2FDAA9B650DDB3B8C587DE2 implements org.drools.model.functions.Predicate1<org.drools.modelcompiler.domain.Person> {
...
@Override()
public boolean test(org.drools.modelcompiler.domain.Person _this) throws java.lang.Exception {
return org.drools.modelcompiler.util.EvaluationUtil.greaterThanStringsAsNumbers(_this.getName(), "Bob");
}
}
{code}
then, fails with this error:
{noformat}
java.lang.RuntimeException: java.lang.NumberFormatException: Character J is neither a decimal digit number, decimal point, nor "e" notation exponential mark.
at org.drools.modelcompiler.constraints.ConstraintEvaluator.evaluate(ConstraintEvaluator.java:95)
at org.drools.modelcompiler.constraints.LambdaConstraint.isAllowed(LambdaConstraint.java:133)
at org.drools.core.reteoo.AlphaNode.assertObject(AlphaNode.java:136)
...
Caused by: java.lang.NumberFormatException: Character J is neither a decimal digit number, decimal point, nor "e" notation exponential mark.
at java.base/java.math.BigDecimal.<init>(BigDecimal.java:518)
at java.base/java.math.BigDecimal.<init>(BigDecimal.java:401)
at java.base/java.math.BigDecimal.<init>(BigDecimal.java:834)
at org.drools.modelcompiler.util.EvaluationUtil.greaterThanStringsAsNumbers(EvaluationUtil.java:113)
at defaultpkg.P23.LambdaPredicate23581163B2FDAA9B650DDB3B8C587DE2.test(LambdaPredicate23581163B2FDAA9B650DDB3B8C587DE2.java:17)
at defaultpkg.P23.LambdaPredicate23581163B2FDAA9B650DDB3B8C587DE2.test(LambdaPredicate23581163B2FDAA9B650DDB3B8C587DE2.java:8)
at org.drools.model.functions.Predicate1$Impl.test(Predicate1.java:39)
at org.drools.modelcompiler.constraints.ConstraintEvaluator.evaluate(ConstraintEvaluator.java:92)
... 48 more
{noformat}
> String relational comparison fails with executable-model
> --------------------------------------------------------
>
> Key: DROOLS-5652
> URL: https://issues.redhat.com/browse/DROOLS-5652
> Project: Drools
> Issue Type: Bug
> Components: executable model
> Affects Versions: 7.43.1.Final
> Reporter: Toshiya Kobayashi
> Assignee: Toshiya Kobayashi
> Priority: Major
>
> String relational comparison fails with executable-model
> {noformat}
> Person( name > "Bob" )
> {noformat}
> generates Predicate like this:
> {code:java}
> @org.drools.compiler.kie.builder.MaterializedLambda()
> public enum LambdaPredicate23581163B2FDAA9B650DDB3B8C587DE2 implements org.drools.model.functions.Predicate1<org.drools.modelcompiler.domain.Person> {
> ...
> @Override()
> public boolean test(org.drools.modelcompiler.domain.Person _this) throws java.lang.Exception {
> return org.drools.modelcompiler.util.EvaluationUtil.greaterThanStringsAsNumbers(_this.getName(), "Bob");
> }
> }
> {code}
> then, fails with this error:
> {noformat}
> java.lang.RuntimeException: java.lang.NumberFormatException: Character J is neither a decimal digit number, decimal point, nor "e" notation exponential mark.
> at org.drools.modelcompiler.constraints.ConstraintEvaluator.evaluate(ConstraintEvaluator.java:95)
> at org.drools.modelcompiler.constraints.LambdaConstraint.isAllowed(LambdaConstraint.java:133)
> at org.drools.core.reteoo.AlphaNode.assertObject(AlphaNode.java:136)
> ...
> Caused by: java.lang.NumberFormatException: Character J is neither a decimal digit number, decimal point, nor "e" notation exponential mark.
> at java.base/java.math.BigDecimal.<init>(BigDecimal.java:518)
> at java.base/java.math.BigDecimal.<init>(BigDecimal.java:401)
> at java.base/java.math.BigDecimal.<init>(BigDecimal.java:834)
> at org.drools.modelcompiler.util.EvaluationUtil.greaterThanStringsAsNumbers(EvaluationUtil.java:113)
> at defaultpkg.P23.LambdaPredicate23581163B2FDAA9B650DDB3B8C587DE2.test(LambdaPredicate23581163B2FDAA9B650DDB3B8C587DE2.java:17)
> at defaultpkg.P23.LambdaPredicate23581163B2FDAA9B650DDB3B8C587DE2.test(LambdaPredicate23581163B2FDAA9B650DDB3B8C587DE2.java:8)
> at org.drools.model.functions.Predicate1$Impl.test(Predicate1.java:39)
> at org.drools.modelcompiler.constraints.ConstraintEvaluator.evaluate(ConstraintEvaluator.java:92)
> ... 48 more
> {noformat}
> FYI) It should be supported
> https://docs.jboss.org/drools/release/latest/drools-docs/html_single/inde...
> {noformat}
> 4.1.8.6. Supported operators in DRL pattern constraints
> <, <=, >, >=
> Use these operators on properties with natural ordering. For example, for Date fields, the < operator means before, and for String fields, the operator means alphabetically before. These properties apply only to comparable properties.
> Example constraints with before operator
> Person( birthDate < $otherBirthDate )
> Person( firstName < $otherFirstName )
> {noformat}
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
5 years, 10 months
[JBoss JIRA] (DROOLS-5652) String relational comparison fails with executable-model
by Toshiya Kobayashi (Jira)
[ https://issues.redhat.com/browse/DROOLS-5652?page=com.atlassian.jira.plug... ]
Toshiya Kobayashi updated DROOLS-5652:
--------------------------------------
Sprint: 2020 Week 37-39 (from Sep 7)
> String relational comparison fails with executable-model
> --------------------------------------------------------
>
> Key: DROOLS-5652
> URL: https://issues.redhat.com/browse/DROOLS-5652
> Project: Drools
> Issue Type: Bug
> Components: executable model
> Affects Versions: 7.43.1.Final
> Reporter: Toshiya Kobayashi
> Assignee: Toshiya Kobayashi
> Priority: Major
>
> String relational comparison fails with executable-model
> {noformat}
> Person( name > "Bob" )
> {noformat}
> generates Predicate like this:
> {code:java}
> @org.drools.compiler.kie.builder.MaterializedLambda()
> public enum LambdaPredicate23581163B2FDAA9B650DDB3B8C587DE2 implements org.drools.model.functions.Predicate1<org.drools.modelcompiler.domain.Person> {
> ...
> @Override()
> public boolean test(org.drools.modelcompiler.domain.Person _this) throws java.lang.Exception {
> return org.drools.modelcompiler.util.EvaluationUtil.greaterThanStringsAsNumbers(_this.getName(), "Bob");
> }
> }
> {code}
> then, fails with this error:
> {noformat}
> java.lang.RuntimeException: java.lang.NumberFormatException: Character J is neither a decimal digit number, decimal point, nor "e" notation exponential mark.
> at org.drools.modelcompiler.constraints.ConstraintEvaluator.evaluate(ConstraintEvaluator.java:95)
> at org.drools.modelcompiler.constraints.LambdaConstraint.isAllowed(LambdaConstraint.java:133)
> at org.drools.core.reteoo.AlphaNode.assertObject(AlphaNode.java:136)
> ...
> Caused by: java.lang.NumberFormatException: Character J is neither a decimal digit number, decimal point, nor "e" notation exponential mark.
> at java.base/java.math.BigDecimal.<init>(BigDecimal.java:518)
> at java.base/java.math.BigDecimal.<init>(BigDecimal.java:401)
> at java.base/java.math.BigDecimal.<init>(BigDecimal.java:834)
> at org.drools.modelcompiler.util.EvaluationUtil.greaterThanStringsAsNumbers(EvaluationUtil.java:113)
> at defaultpkg.P23.LambdaPredicate23581163B2FDAA9B650DDB3B8C587DE2.test(LambdaPredicate23581163B2FDAA9B650DDB3B8C587DE2.java:17)
> at defaultpkg.P23.LambdaPredicate23581163B2FDAA9B650DDB3B8C587DE2.test(LambdaPredicate23581163B2FDAA9B650DDB3B8C587DE2.java:8)
> at org.drools.model.functions.Predicate1$Impl.test(Predicate1.java:39)
> at org.drools.modelcompiler.constraints.ConstraintEvaluator.evaluate(ConstraintEvaluator.java:92)
> ... 48 more
> {noformat}
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
5 years, 10 months
[JBoss JIRA] (DROOLS-5652) String relational comparison fails with executable-model
by Toshiya Kobayashi (Jira)
[ https://issues.redhat.com/browse/DROOLS-5652?page=com.atlassian.jira.plug... ]
Toshiya Kobayashi updated DROOLS-5652:
--------------------------------------
Description:
String relational comparison fails with executable-model
{noformat}
Person( name > "Bob" )
{noformat}
generates Predicate like this:
{code:java}
@org.drools.compiler.kie.builder.MaterializedLambda()
public enum LambdaPredicate23581163B2FDAA9B650DDB3B8C587DE2 implements org.drools.model.functions.Predicate1<org.drools.modelcompiler.domain.Person> {
...
@Override()
public boolean test(org.drools.modelcompiler.domain.Person _this) throws java.lang.Exception {
return org.drools.modelcompiler.util.EvaluationUtil.greaterThanStringsAsNumbers(_this.getName(), "Bob");
}
}
{code}
then, fails with this error:
{noformat}
java.lang.RuntimeException: java.lang.NumberFormatException: Character J is neither a decimal digit number, decimal point, nor "e" notation exponential mark.
at org.drools.modelcompiler.constraints.ConstraintEvaluator.evaluate(ConstraintEvaluator.java:95)
at org.drools.modelcompiler.constraints.LambdaConstraint.isAllowed(LambdaConstraint.java:133)
at org.drools.core.reteoo.AlphaNode.assertObject(AlphaNode.java:136)
...
Caused by: java.lang.NumberFormatException: Character J is neither a decimal digit number, decimal point, nor "e" notation exponential mark.
at java.base/java.math.BigDecimal.<init>(BigDecimal.java:518)
at java.base/java.math.BigDecimal.<init>(BigDecimal.java:401)
at java.base/java.math.BigDecimal.<init>(BigDecimal.java:834)
at org.drools.modelcompiler.util.EvaluationUtil.greaterThanStringsAsNumbers(EvaluationUtil.java:113)
at defaultpkg.P23.LambdaPredicate23581163B2FDAA9B650DDB3B8C587DE2.test(LambdaPredicate23581163B2FDAA9B650DDB3B8C587DE2.java:17)
at defaultpkg.P23.LambdaPredicate23581163B2FDAA9B650DDB3B8C587DE2.test(LambdaPredicate23581163B2FDAA9B650DDB3B8C587DE2.java:8)
at org.drools.model.functions.Predicate1$Impl.test(Predicate1.java:39)
at org.drools.modelcompiler.constraints.ConstraintEvaluator.evaluate(ConstraintEvaluator.java:92)
... 48 more
{noformat}
was:
String relational comparison fails with executable-model
{noformat}
Person( name > "Bob" )
{noformat}
generates Predicate like this:
{code:java}
@org.drools.compiler.kie.builder.MaterializedLambda()
public enum LambdaPredicate3B9CCAE898D00108D2F033D685F4C75B implements org.drools.model.functions.Predicate1<org.drools.modelcompiler.domain.Person> {
...
@Override()
public boolean test(org.drools.modelcompiler.domain.Person _this) throws java.lang.Exception {
return org.drools.modelcompiler.util.EvaluationUtil.greaterThanStringsAsNumbers(_this.getName(), "Bob");
}
}
{code}
then, fails with this error:
{noformat}
[ERROR] testStringComparison[PATTERN_DSL](org.drools.modelcompiler.CompilerTest) Time elapsed: 2.563 s <<< ERROR!
java.lang.RuntimeException: java.lang.NumberFormatException: Character J is neither a decimal digit number, decimal point, nor "e" notation exponential mark.
at org.drools.modelcompiler.constraints.ConstraintEvaluator.evaluate(ConstraintEvaluator.java:95)
at org.drools.modelcompiler.constraints.LambdaConstraint.isAllowed(LambdaConstraint.java:133)
at org.drools.core.reteoo.AlphaNode.assertObject(AlphaNode.java:136)
...
Caused by: java.lang.NumberFormatException: Character J is neither a decimal digit number, decimal point, nor "e" notation exponential mark.
at java.base/java.math.BigDecimal.<init>(BigDecimal.java:518)
at java.base/java.math.BigDecimal.<init>(BigDecimal.java:401)
at java.base/java.math.BigDecimal.<init>(BigDecimal.java:834)
at org.drools.modelcompiler.util.EvaluationUtil.greaterThanStringsAsNumbers(EvaluationUtil.java:113)
at defaultpkg.P3B.LambdaPredicate3B9CCAE898D00108D2F033D685F4C75B.test(LambdaPredicate3B9CCAE898D00108D2F033D685F4C75B.java:17)
at defaultpkg.P3B.LambdaPredicate3B9CCAE898D00108D2F033D685F4C75B.test(LambdaPredicate3B9CCAE898D00108D2F033D685F4C75B.java:8)
at org.drools.model.functions.Predicate1$Impl.test(Predicate1.java:39)
at org.drools.modelcompiler.constraints.ConstraintEvaluator.evaluate(ConstraintEvaluator.java:92)
... 48 more
{noformat}
> String relational comparison fails with executable-model
> --------------------------------------------------------
>
> Key: DROOLS-5652
> URL: https://issues.redhat.com/browse/DROOLS-5652
> Project: Drools
> Issue Type: Bug
> Components: executable model
> Affects Versions: 7.43.1.Final
> Reporter: Toshiya Kobayashi
> Assignee: Toshiya Kobayashi
> Priority: Major
>
> String relational comparison fails with executable-model
> {noformat}
> Person( name > "Bob" )
> {noformat}
> generates Predicate like this:
> {code:java}
> @org.drools.compiler.kie.builder.MaterializedLambda()
> public enum LambdaPredicate23581163B2FDAA9B650DDB3B8C587DE2 implements org.drools.model.functions.Predicate1<org.drools.modelcompiler.domain.Person> {
> ...
> @Override()
> public boolean test(org.drools.modelcompiler.domain.Person _this) throws java.lang.Exception {
> return org.drools.modelcompiler.util.EvaluationUtil.greaterThanStringsAsNumbers(_this.getName(), "Bob");
> }
> }
> {code}
> then, fails with this error:
> {noformat}
> java.lang.RuntimeException: java.lang.NumberFormatException: Character J is neither a decimal digit number, decimal point, nor "e" notation exponential mark.
> at org.drools.modelcompiler.constraints.ConstraintEvaluator.evaluate(ConstraintEvaluator.java:95)
> at org.drools.modelcompiler.constraints.LambdaConstraint.isAllowed(LambdaConstraint.java:133)
> at org.drools.core.reteoo.AlphaNode.assertObject(AlphaNode.java:136)
> ...
> Caused by: java.lang.NumberFormatException: Character J is neither a decimal digit number, decimal point, nor "e" notation exponential mark.
> at java.base/java.math.BigDecimal.<init>(BigDecimal.java:518)
> at java.base/java.math.BigDecimal.<init>(BigDecimal.java:401)
> at java.base/java.math.BigDecimal.<init>(BigDecimal.java:834)
> at org.drools.modelcompiler.util.EvaluationUtil.greaterThanStringsAsNumbers(EvaluationUtil.java:113)
> at defaultpkg.P23.LambdaPredicate23581163B2FDAA9B650DDB3B8C587DE2.test(LambdaPredicate23581163B2FDAA9B650DDB3B8C587DE2.java:17)
> at defaultpkg.P23.LambdaPredicate23581163B2FDAA9B650DDB3B8C587DE2.test(LambdaPredicate23581163B2FDAA9B650DDB3B8C587DE2.java:8)
> at org.drools.model.functions.Predicate1$Impl.test(Predicate1.java:39)
> at org.drools.modelcompiler.constraints.ConstraintEvaluator.evaluate(ConstraintEvaluator.java:92)
> ... 48 more
> {noformat}
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
5 years, 10 months
[JBoss JIRA] (DROOLS-5652) String relational comparison fails with executable-model
by Toshiya Kobayashi (Jira)
[ https://issues.redhat.com/browse/DROOLS-5652?page=com.atlassian.jira.plug... ]
Toshiya Kobayashi updated DROOLS-5652:
--------------------------------------
Description:
String relational comparison fails with executable-model
{noformat}
Person( name > "Bob" )
{noformat}
generates Predicate like this:
{code:java}
@org.drools.compiler.kie.builder.MaterializedLambda()
public enum LambdaPredicate3B9CCAE898D00108D2F033D685F4C75B implements org.drools.model.functions.Predicate1<org.drools.modelcompiler.domain.Person> {
...
@Override()
public boolean test(org.drools.modelcompiler.domain.Person _this) throws java.lang.Exception {
return org.drools.modelcompiler.util.EvaluationUtil.greaterThanStringsAsNumbers(_this.getName(), "Bob");
}
}
{code}
then, fails with this error:
{noformat}
[ERROR] testStringComparison[PATTERN_DSL](org.drools.modelcompiler.CompilerTest) Time elapsed: 2.563 s <<< ERROR!
java.lang.RuntimeException: java.lang.NumberFormatException: Character J is neither a decimal digit number, decimal point, nor "e" notation exponential mark.
at org.drools.modelcompiler.constraints.ConstraintEvaluator.evaluate(ConstraintEvaluator.java:95)
at org.drools.modelcompiler.constraints.LambdaConstraint.isAllowed(LambdaConstraint.java:133)
at org.drools.core.reteoo.AlphaNode.assertObject(AlphaNode.java:136)
...
Caused by: java.lang.NumberFormatException: Character J is neither a decimal digit number, decimal point, nor "e" notation exponential mark.
at java.base/java.math.BigDecimal.<init>(BigDecimal.java:518)
at java.base/java.math.BigDecimal.<init>(BigDecimal.java:401)
at java.base/java.math.BigDecimal.<init>(BigDecimal.java:834)
at org.drools.modelcompiler.util.EvaluationUtil.greaterThanStringsAsNumbers(EvaluationUtil.java:113)
at defaultpkg.P3B.LambdaPredicate3B9CCAE898D00108D2F033D685F4C75B.test(LambdaPredicate3B9CCAE898D00108D2F033D685F4C75B.java:17)
at defaultpkg.P3B.LambdaPredicate3B9CCAE898D00108D2F033D685F4C75B.test(LambdaPredicate3B9CCAE898D00108D2F033D685F4C75B.java:8)
at org.drools.model.functions.Predicate1$Impl.test(Predicate1.java:39)
at org.drools.modelcompiler.constraints.ConstraintEvaluator.evaluate(ConstraintEvaluator.java:92)
... 48 more
{noformat}
was:
String relational comparison fails with executable-model
{noformat}
Person( name >= "Bob" )
{noformat}
generates Predicate like this:
{code:java}
@org.drools.compiler.kie.builder.MaterializedLambda()
public enum LambdaPredicate3B9CCAE898D00108D2F033D685F4C75B implements org.drools.model.functions.Predicate1<org.drools.modelcompiler.domain.Person> {
...
@Override()
public boolean test(org.drools.modelcompiler.domain.Person _this) throws java.lang.Exception {
return org.drools.modelcompiler.util.EvaluationUtil.greaterThanStringsAsNumbers(_this.getName(), "Bob");
}
}
{code}
then, fails with this error:
{noformat}
[ERROR] testStringComparison[PATTERN_DSL](org.drools.modelcompiler.CompilerTest) Time elapsed: 2.563 s <<< ERROR!
java.lang.RuntimeException: java.lang.NumberFormatException: Character J is neither a decimal digit number, decimal point, nor "e" notation exponential mark.
at org.drools.modelcompiler.constraints.ConstraintEvaluator.evaluate(ConstraintEvaluator.java:95)
at org.drools.modelcompiler.constraints.LambdaConstraint.isAllowed(LambdaConstraint.java:133)
at org.drools.core.reteoo.AlphaNode.assertObject(AlphaNode.java:136)
...
Caused by: java.lang.NumberFormatException: Character J is neither a decimal digit number, decimal point, nor "e" notation exponential mark.
at java.base/java.math.BigDecimal.<init>(BigDecimal.java:518)
at java.base/java.math.BigDecimal.<init>(BigDecimal.java:401)
at java.base/java.math.BigDecimal.<init>(BigDecimal.java:834)
at org.drools.modelcompiler.util.EvaluationUtil.greaterThanStringsAsNumbers(EvaluationUtil.java:113)
at defaultpkg.P3B.LambdaPredicate3B9CCAE898D00108D2F033D685F4C75B.test(LambdaPredicate3B9CCAE898D00108D2F033D685F4C75B.java:17)
at defaultpkg.P3B.LambdaPredicate3B9CCAE898D00108D2F033D685F4C75B.test(LambdaPredicate3B9CCAE898D00108D2F033D685F4C75B.java:8)
at org.drools.model.functions.Predicate1$Impl.test(Predicate1.java:39)
at org.drools.modelcompiler.constraints.ConstraintEvaluator.evaluate(ConstraintEvaluator.java:92)
... 48 more
{noformat}
> String relational comparison fails with executable-model
> --------------------------------------------------------
>
> Key: DROOLS-5652
> URL: https://issues.redhat.com/browse/DROOLS-5652
> Project: Drools
> Issue Type: Bug
> Components: executable model
> Affects Versions: 7.43.1.Final
> Reporter: Toshiya Kobayashi
> Assignee: Toshiya Kobayashi
> Priority: Major
>
> String relational comparison fails with executable-model
> {noformat}
> Person( name > "Bob" )
> {noformat}
> generates Predicate like this:
> {code:java}
> @org.drools.compiler.kie.builder.MaterializedLambda()
> public enum LambdaPredicate3B9CCAE898D00108D2F033D685F4C75B implements org.drools.model.functions.Predicate1<org.drools.modelcompiler.domain.Person> {
> ...
> @Override()
> public boolean test(org.drools.modelcompiler.domain.Person _this) throws java.lang.Exception {
> return org.drools.modelcompiler.util.EvaluationUtil.greaterThanStringsAsNumbers(_this.getName(), "Bob");
> }
> }
> {code}
> then, fails with this error:
> {noformat}
> [ERROR] testStringComparison[PATTERN_DSL](org.drools.modelcompiler.CompilerTest) Time elapsed: 2.563 s <<< ERROR!
> java.lang.RuntimeException: java.lang.NumberFormatException: Character J is neither a decimal digit number, decimal point, nor "e" notation exponential mark.
> at org.drools.modelcompiler.constraints.ConstraintEvaluator.evaluate(ConstraintEvaluator.java:95)
> at org.drools.modelcompiler.constraints.LambdaConstraint.isAllowed(LambdaConstraint.java:133)
> at org.drools.core.reteoo.AlphaNode.assertObject(AlphaNode.java:136)
> ...
> Caused by: java.lang.NumberFormatException: Character J is neither a decimal digit number, decimal point, nor "e" notation exponential mark.
> at java.base/java.math.BigDecimal.<init>(BigDecimal.java:518)
> at java.base/java.math.BigDecimal.<init>(BigDecimal.java:401)
> at java.base/java.math.BigDecimal.<init>(BigDecimal.java:834)
> at org.drools.modelcompiler.util.EvaluationUtil.greaterThanStringsAsNumbers(EvaluationUtil.java:113)
> at defaultpkg.P3B.LambdaPredicate3B9CCAE898D00108D2F033D685F4C75B.test(LambdaPredicate3B9CCAE898D00108D2F033D685F4C75B.java:17)
> at defaultpkg.P3B.LambdaPredicate3B9CCAE898D00108D2F033D685F4C75B.test(LambdaPredicate3B9CCAE898D00108D2F033D685F4C75B.java:8)
> at org.drools.model.functions.Predicate1$Impl.test(Predicate1.java:39)
> at org.drools.modelcompiler.constraints.ConstraintEvaluator.evaluate(ConstraintEvaluator.java:92)
> ... 48 more
> {noformat}
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
5 years, 10 months