[Red Hat JIRA] (DROOLS-5934) NullPointerException at ConstraintEvaluator.findPatternAndRequiredDeclaration() in accumulate with exec-model
by Amit Nijhawan (Jira)
[ https://issues.redhat.com/browse/DROOLS-5934?page=com.atlassian.jira.plug... ]
Amit Nijhawan deleted DROOLS-5934:
----------------------------------
> NullPointerException at ConstraintEvaluator.findPatternAndRequiredDeclaration() in accumulate with exec-model
> -------------------------------------------------------------------------------------------------------------
>
> Key: DROOLS-5934
> URL: https://issues.redhat.com/browse/DROOLS-5934
> Project: Drools
> Issue Type: Bug
> Components: executable model
> Affects Versions: 7.48.0.Final
> Reporter: Amit Nijhawan
> Assignee: Toshiya Kobayashi
> Priority: Major
>
> With exec-model, a rule like this:
> {noformat}
> when
> Number( ) from accumulate (
> FactA( $valueA : value )
> and
> FactB( $valueB : value, eval($valueB.compareTo($valueA) <= 0) )
> ;max($valueB.intValue())
> )
> then
> {noformat}
> generates the following PATTERN_DSL:
> {code:java}
> org.drools.model.Rule rule = D.rule("org.drools.mvel.compiler",
> "r1").build(D.pattern(var_GENERATED_$pattern_Number$1$),
> D.accumulate(D.and(D.pattern(var_GENERATED_$pattern_FactA$2$).bind(var_$valueA,
> org.drools.mvel.compiler.P46.LambdaExtractor468EFEB3BE9EA6494C88709DE97051CB.INSTANCE,
> D.reactOn("value")),
> D.pattern(var_GENERATED_$pattern_FactB$3$).bind(var_6C0A578A2EA3D5A5C82ABB0FA0DE5C71,
> org.drools.mvel.compiler.P18.LambdaExtractor18D900ABC004631DF004CDA316CD34FD.INSTANCE,
> D.reactOn("value")).expr("A574527869CA97E0B100815026E8E8FA",
> var_$valueB,
> var_$valueA,
> org.drools.mvel.compiler.P3E.LambdaPredicate3E396A3A5FB9CCA4FC041866C27E4A3A.INSTANCE)),
> D.accFunction(org.drools.core.base.accumulators.IntegerMaxAccumulateFunction::new,
> var_6C0A578A2EA3D5A5C82ABB0FA0DE5C71).as(var_GENERATED_$pattern_Number$1$)),
> D.execute(org.drools.mvel.compiler.P97.LambdaConsequence97C360F7B2C85569E6224ABDE862C784.INSTANCE));
> {code}
> It misses bind() for var_$valueB. It results in NPE during kbase build.
> {noformat}
> java.lang.NullPointerException
> at org.drools.modelcompiler.constraints.ConstraintEvaluator.findPatternAndRequiredDeclaration(ConstraintEvaluator.java:97)
> at org.drools.modelcompiler.constraints.ConstraintEvaluator.<init>(ConstraintEvaluator.java:67)
> at org.drools.modelcompiler.KiePackagesBuilder.createSingleConstraint(KiePackagesBuilder.java:1064)
> at org.drools.modelcompiler.KiePackagesBuilder.createConstraint(KiePackagesBuilder.java:1049)
> at org.drools.modelcompiler.KiePackagesBuilder.addConstraintsToPattern(KiePackagesBuilder.java:1043)
> at org.drools.modelcompiler.KiePackagesBuilder.buildPattern(KiePackagesBuilder.java:730)
> at org.drools.modelcompiler.KiePackagesBuilder.recursivelyAddConditions(KiePackagesBuilder.java:624)
> at org.drools.modelcompiler.KiePackagesBuilder.buildAccumulate(KiePackagesBuilder.java:581)
> at org.drools.modelcompiler.KiePackagesBuilder.conditionToElement(KiePackagesBuilder.java:493)
> at org.drools.modelcompiler.KiePackagesBuilder.addSubConditions(KiePackagesBuilder.java:655)
> at org.drools.modelcompiler.KiePackagesBuilder.populateLHS(KiePackagesBuilder.java:449)
> at org.drools.modelcompiler.KiePackagesBuilder.compileRule(KiePackagesBuilder.java:249)
> at org.drools.modelcompiler.KiePackagesBuilder.build(KiePackagesBuilder.java:220)
> at org.drools.modelcompiler.CanonicalKieModule.createKiePackages(CanonicalKieModule.java:306)
> at org.drools.modelcompiler.CanonicalKieModule.lambda$1(CanonicalKieModule.java:213)
> at java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1660)
> at org.drools.modelcompiler.CanonicalKieModule.createKieBase(CanonicalKieModule.java:213)
> at org.drools.compiler.kie.builder.impl.KieContainerImpl.createKieBase(KieContainerImpl.java:470)
> {noformat}
> ====
> Even this rule causes the issue. So the key factor is the method invocation $valueB.intValue()
> {noformat}
> when
> Number( ) from accumulate (
> FactB( $valueB : value, $valueB > 0 )
> ;max($valueB.intValue())
> )
> then
> {noformat}
--
This message was sent by Atlassian Jira
(v8.13.1#813001)
5 years, 3 months
[Red Hat JIRA] (DROOLS-5934) NullPointerException at ConstraintEvaluator.findPatternAndRequiredDeclaration() in accumulate with exec-model
by Amit Nijhawan (Jira)
Amit Nijhawan created DROOLS-5934:
-------------------------------------
Summary: NullPointerException at ConstraintEvaluator.findPatternAndRequiredDeclaration() in accumulate with exec-model
Key: DROOLS-5934
URL: https://issues.redhat.com/browse/DROOLS-5934
Project: Drools
Issue Type: Bug
Components: executable model
Affects Versions: 7.48.0.Final
Reporter: Amit Nijhawan
Assignee: Toshiya Kobayashi
With exec-model, a rule like this:
{noformat}
when
Number( ) from accumulate (
FactA( $valueA : value )
and
FactB( $valueB : value, eval($valueB.compareTo($valueA) <= 0) )
;max($valueB.intValue())
)
then
{noformat}
generates the following PATTERN_DSL:
{code:java}
org.drools.model.Rule rule = D.rule("org.drools.mvel.compiler",
"r1").build(D.pattern(var_GENERATED_$pattern_Number$1$),
D.accumulate(D.and(D.pattern(var_GENERATED_$pattern_FactA$2$).bind(var_$valueA,
org.drools.mvel.compiler.P46.LambdaExtractor468EFEB3BE9EA6494C88709DE97051CB.INSTANCE,
D.reactOn("value")),
D.pattern(var_GENERATED_$pattern_FactB$3$).bind(var_6C0A578A2EA3D5A5C82ABB0FA0DE5C71,
org.drools.mvel.compiler.P18.LambdaExtractor18D900ABC004631DF004CDA316CD34FD.INSTANCE,
D.reactOn("value")).expr("A574527869CA97E0B100815026E8E8FA",
var_$valueB,
var_$valueA,
org.drools.mvel.compiler.P3E.LambdaPredicate3E396A3A5FB9CCA4FC041866C27E4A3A.INSTANCE)),
D.accFunction(org.drools.core.base.accumulators.IntegerMaxAccumulateFunction::new,
var_6C0A578A2EA3D5A5C82ABB0FA0DE5C71).as(var_GENERATED_$pattern_Number$1$)),
D.execute(org.drools.mvel.compiler.P97.LambdaConsequence97C360F7B2C85569E6224ABDE862C784.INSTANCE));
{code}
It misses bind() for var_$valueB. It results in NPE during kbase build.
{noformat}
java.lang.NullPointerException
at org.drools.modelcompiler.constraints.ConstraintEvaluator.findPatternAndRequiredDeclaration(ConstraintEvaluator.java:97)
at org.drools.modelcompiler.constraints.ConstraintEvaluator.<init>(ConstraintEvaluator.java:67)
at org.drools.modelcompiler.KiePackagesBuilder.createSingleConstraint(KiePackagesBuilder.java:1064)
at org.drools.modelcompiler.KiePackagesBuilder.createConstraint(KiePackagesBuilder.java:1049)
at org.drools.modelcompiler.KiePackagesBuilder.addConstraintsToPattern(KiePackagesBuilder.java:1043)
at org.drools.modelcompiler.KiePackagesBuilder.buildPattern(KiePackagesBuilder.java:730)
at org.drools.modelcompiler.KiePackagesBuilder.recursivelyAddConditions(KiePackagesBuilder.java:624)
at org.drools.modelcompiler.KiePackagesBuilder.buildAccumulate(KiePackagesBuilder.java:581)
at org.drools.modelcompiler.KiePackagesBuilder.conditionToElement(KiePackagesBuilder.java:493)
at org.drools.modelcompiler.KiePackagesBuilder.addSubConditions(KiePackagesBuilder.java:655)
at org.drools.modelcompiler.KiePackagesBuilder.populateLHS(KiePackagesBuilder.java:449)
at org.drools.modelcompiler.KiePackagesBuilder.compileRule(KiePackagesBuilder.java:249)
at org.drools.modelcompiler.KiePackagesBuilder.build(KiePackagesBuilder.java:220)
at org.drools.modelcompiler.CanonicalKieModule.createKiePackages(CanonicalKieModule.java:306)
at org.drools.modelcompiler.CanonicalKieModule.lambda$1(CanonicalKieModule.java:213)
at java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1660)
at org.drools.modelcompiler.CanonicalKieModule.createKieBase(CanonicalKieModule.java:213)
at org.drools.compiler.kie.builder.impl.KieContainerImpl.createKieBase(KieContainerImpl.java:470)
{noformat}
====
Even this rule causes the issue. So the key factor is the method invocation $valueB.intValue()
{noformat}
when
Number( ) from accumulate (
FactB( $valueB : value, $valueB > 0 )
;max($valueB.intValue())
)
then
{noformat}
--
This message was sent by Atlassian Jira
(v8.13.1#813001)
5 years, 3 months
[Red Hat JIRA] (DROOLS-5933) NullPointerException at ConstraintEvaluator.findPatternAndRequiredDeclaration() in accumulate with exec-model
by Toshiya Kobayashi (Jira)
[ https://issues.redhat.com/browse/DROOLS-5933?page=com.atlassian.jira.plug... ]
Toshiya Kobayashi updated DROOLS-5933:
--------------------------------------
Description:
With exec-model, a rule like this:
{noformat}
when
Number( ) from accumulate (
FactA( $valueA : value )
and
FactB( $valueB : value, eval($valueB.compareTo($valueA) <= 0) )
;max($valueB.intValue())
)
then
{noformat}
generates the following PATTERN_DSL:
{code:java}
org.drools.model.Rule rule = D.rule("org.drools.mvel.compiler",
"r1").build(D.pattern(var_GENERATED_$pattern_Number$1$),
D.accumulate(D.and(D.pattern(var_GENERATED_$pattern_FactA$2$).bind(var_$valueA,
org.drools.mvel.compiler.P46.LambdaExtractor468EFEB3BE9EA6494C88709DE97051CB.INSTANCE,
D.reactOn("value")),
D.pattern(var_GENERATED_$pattern_FactB$3$).bind(var_6C0A578A2EA3D5A5C82ABB0FA0DE5C71,
org.drools.mvel.compiler.P18.LambdaExtractor18D900ABC004631DF004CDA316CD34FD.INSTANCE,
D.reactOn("value")).expr("A574527869CA97E0B100815026E8E8FA",
var_$valueB,
var_$valueA,
org.drools.mvel.compiler.P3E.LambdaPredicate3E396A3A5FB9CCA4FC041866C27E4A3A.INSTANCE)),
D.accFunction(org.drools.core.base.accumulators.IntegerMaxAccumulateFunction::new,
var_6C0A578A2EA3D5A5C82ABB0FA0DE5C71).as(var_GENERATED_$pattern_Number$1$)),
D.execute(org.drools.mvel.compiler.P97.LambdaConsequence97C360F7B2C85569E6224ABDE862C784.INSTANCE));
{code}
It misses bind() for var_$valueB. It results in NPE during kbase build.
{noformat}
java.lang.NullPointerException
at org.drools.modelcompiler.constraints.ConstraintEvaluator.findPatternAndRequiredDeclaration(ConstraintEvaluator.java:97)
at org.drools.modelcompiler.constraints.ConstraintEvaluator.<init>(ConstraintEvaluator.java:67)
at org.drools.modelcompiler.KiePackagesBuilder.createSingleConstraint(KiePackagesBuilder.java:1064)
at org.drools.modelcompiler.KiePackagesBuilder.createConstraint(KiePackagesBuilder.java:1049)
at org.drools.modelcompiler.KiePackagesBuilder.addConstraintsToPattern(KiePackagesBuilder.java:1043)
at org.drools.modelcompiler.KiePackagesBuilder.buildPattern(KiePackagesBuilder.java:730)
at org.drools.modelcompiler.KiePackagesBuilder.recursivelyAddConditions(KiePackagesBuilder.java:624)
at org.drools.modelcompiler.KiePackagesBuilder.buildAccumulate(KiePackagesBuilder.java:581)
at org.drools.modelcompiler.KiePackagesBuilder.conditionToElement(KiePackagesBuilder.java:493)
at org.drools.modelcompiler.KiePackagesBuilder.addSubConditions(KiePackagesBuilder.java:655)
at org.drools.modelcompiler.KiePackagesBuilder.populateLHS(KiePackagesBuilder.java:449)
at org.drools.modelcompiler.KiePackagesBuilder.compileRule(KiePackagesBuilder.java:249)
at org.drools.modelcompiler.KiePackagesBuilder.build(KiePackagesBuilder.java:220)
at org.drools.modelcompiler.CanonicalKieModule.createKiePackages(CanonicalKieModule.java:306)
at org.drools.modelcompiler.CanonicalKieModule.lambda$1(CanonicalKieModule.java:213)
at java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1660)
at org.drools.modelcompiler.CanonicalKieModule.createKieBase(CanonicalKieModule.java:213)
at org.drools.compiler.kie.builder.impl.KieContainerImpl.createKieBase(KieContainerImpl.java:470)
{noformat}
====
Even this rule causes the issue. So the key factor is the method invocation $valueB.intValue()
{noformat}
when
Number( ) from accumulate (
FactB( $valueB : value, $valueB > 0 )
;max($valueB.intValue())
)
then
{noformat}
was:
With exec-model, a rule like this:
{noformat}
when
Number( ) from accumulate (
FactA( $valueA : value )
and
FactB( $valueB : value, eval($valueB.compareTo($valueA) <= 0) )
;max($valueB.intValue())
)
then
{noformat}
generates the following PATTERN_DSL:
{code:java}
org.drools.model.Rule rule = D.rule("org.drools.mvel.compiler",
"r1").build(D.pattern(var_GENERATED_$pattern_Number$1$),
D.accumulate(D.and(D.pattern(var_GENERATED_$pattern_FactA$2$).bind(var_$valueA,
org.drools.mvel.compiler.P46.LambdaExtractor468EFEB3BE9EA6494C88709DE97051CB.INSTANCE,
D.reactOn("value")),
D.pattern(var_GENERATED_$pattern_FactB$3$).bind(var_6C0A578A2EA3D5A5C82ABB0FA0DE5C71,
org.drools.mvel.compiler.P18.LambdaExtractor18D900ABC004631DF004CDA316CD34FD.INSTANCE,
D.reactOn("value")).expr("A574527869CA97E0B100815026E8E8FA",
var_$valueB,
var_$valueA,
org.drools.mvel.compiler.P3E.LambdaPredicate3E396A3A5FB9CCA4FC041866C27E4A3A.INSTANCE)),
D.accFunction(org.drools.core.base.accumulators.IntegerMaxAccumulateFunction::new,
var_6C0A578A2EA3D5A5C82ABB0FA0DE5C71).as(var_GENERATED_$pattern_Number$1$)),
D.execute(org.drools.mvel.compiler.P97.LambdaConsequence97C360F7B2C85569E6224ABDE862C784.INSTANCE));
{code}
It misses bind() for var_$valueB. It results in NPE during kbase build.
{noformat}
java.lang.NullPointerException
at org.drools.modelcompiler.constraints.ConstraintEvaluator.findPatternAndRequiredDeclaration(ConstraintEvaluator.java:97)
at org.drools.modelcompiler.constraints.ConstraintEvaluator.<init>(ConstraintEvaluator.java:67)
at org.drools.modelcompiler.KiePackagesBuilder.createSingleConstraint(KiePackagesBuilder.java:1064)
at org.drools.modelcompiler.KiePackagesBuilder.createConstraint(KiePackagesBuilder.java:1049)
at org.drools.modelcompiler.KiePackagesBuilder.addConstraintsToPattern(KiePackagesBuilder.java:1043)
at org.drools.modelcompiler.KiePackagesBuilder.buildPattern(KiePackagesBuilder.java:730)
at org.drools.modelcompiler.KiePackagesBuilder.recursivelyAddConditions(KiePackagesBuilder.java:624)
at org.drools.modelcompiler.KiePackagesBuilder.buildAccumulate(KiePackagesBuilder.java:581)
at org.drools.modelcompiler.KiePackagesBuilder.conditionToElement(KiePackagesBuilder.java:493)
at org.drools.modelcompiler.KiePackagesBuilder.addSubConditions(KiePackagesBuilder.java:655)
at org.drools.modelcompiler.KiePackagesBuilder.populateLHS(KiePackagesBuilder.java:449)
at org.drools.modelcompiler.KiePackagesBuilder.compileRule(KiePackagesBuilder.java:249)
at org.drools.modelcompiler.KiePackagesBuilder.build(KiePackagesBuilder.java:220)
at org.drools.modelcompiler.CanonicalKieModule.createKiePackages(CanonicalKieModule.java:306)
at org.drools.modelcompiler.CanonicalKieModule.lambda$1(CanonicalKieModule.java:213)
at java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1660)
at org.drools.modelcompiler.CanonicalKieModule.createKieBase(CanonicalKieModule.java:213)
at org.drools.compiler.kie.builder.impl.KieContainerImpl.createKieBase(KieContainerImpl.java:470)
{noformat}
> NullPointerException at ConstraintEvaluator.findPatternAndRequiredDeclaration() in accumulate with exec-model
> -------------------------------------------------------------------------------------------------------------
>
> Key: DROOLS-5933
> URL: https://issues.redhat.com/browse/DROOLS-5933
> Project: Drools
> Issue Type: Bug
> Components: executable model
> Affects Versions: 7.48.0.Final
> Reporter: Toshiya Kobayashi
> Assignee: Toshiya Kobayashi
> Priority: Major
>
> With exec-model, a rule like this:
> {noformat}
> when
> Number( ) from accumulate (
> FactA( $valueA : value )
> and
> FactB( $valueB : value, eval($valueB.compareTo($valueA) <= 0) )
> ;max($valueB.intValue())
> )
> then
> {noformat}
> generates the following PATTERN_DSL:
> {code:java}
> org.drools.model.Rule rule = D.rule("org.drools.mvel.compiler",
> "r1").build(D.pattern(var_GENERATED_$pattern_Number$1$),
> D.accumulate(D.and(D.pattern(var_GENERATED_$pattern_FactA$2$).bind(var_$valueA,
> org.drools.mvel.compiler.P46.LambdaExtractor468EFEB3BE9EA6494C88709DE97051CB.INSTANCE,
> D.reactOn("value")),
> D.pattern(var_GENERATED_$pattern_FactB$3$).bind(var_6C0A578A2EA3D5A5C82ABB0FA0DE5C71,
> org.drools.mvel.compiler.P18.LambdaExtractor18D900ABC004631DF004CDA316CD34FD.INSTANCE,
> D.reactOn("value")).expr("A574527869CA97E0B100815026E8E8FA",
> var_$valueB,
> var_$valueA,
> org.drools.mvel.compiler.P3E.LambdaPredicate3E396A3A5FB9CCA4FC041866C27E4A3A.INSTANCE)),
> D.accFunction(org.drools.core.base.accumulators.IntegerMaxAccumulateFunction::new,
> var_6C0A578A2EA3D5A5C82ABB0FA0DE5C71).as(var_GENERATED_$pattern_Number$1$)),
> D.execute(org.drools.mvel.compiler.P97.LambdaConsequence97C360F7B2C85569E6224ABDE862C784.INSTANCE));
> {code}
> It misses bind() for var_$valueB. It results in NPE during kbase build.
> {noformat}
> java.lang.NullPointerException
> at org.drools.modelcompiler.constraints.ConstraintEvaluator.findPatternAndRequiredDeclaration(ConstraintEvaluator.java:97)
> at org.drools.modelcompiler.constraints.ConstraintEvaluator.<init>(ConstraintEvaluator.java:67)
> at org.drools.modelcompiler.KiePackagesBuilder.createSingleConstraint(KiePackagesBuilder.java:1064)
> at org.drools.modelcompiler.KiePackagesBuilder.createConstraint(KiePackagesBuilder.java:1049)
> at org.drools.modelcompiler.KiePackagesBuilder.addConstraintsToPattern(KiePackagesBuilder.java:1043)
> at org.drools.modelcompiler.KiePackagesBuilder.buildPattern(KiePackagesBuilder.java:730)
> at org.drools.modelcompiler.KiePackagesBuilder.recursivelyAddConditions(KiePackagesBuilder.java:624)
> at org.drools.modelcompiler.KiePackagesBuilder.buildAccumulate(KiePackagesBuilder.java:581)
> at org.drools.modelcompiler.KiePackagesBuilder.conditionToElement(KiePackagesBuilder.java:493)
> at org.drools.modelcompiler.KiePackagesBuilder.addSubConditions(KiePackagesBuilder.java:655)
> at org.drools.modelcompiler.KiePackagesBuilder.populateLHS(KiePackagesBuilder.java:449)
> at org.drools.modelcompiler.KiePackagesBuilder.compileRule(KiePackagesBuilder.java:249)
> at org.drools.modelcompiler.KiePackagesBuilder.build(KiePackagesBuilder.java:220)
> at org.drools.modelcompiler.CanonicalKieModule.createKiePackages(CanonicalKieModule.java:306)
> at org.drools.modelcompiler.CanonicalKieModule.lambda$1(CanonicalKieModule.java:213)
> at java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1660)
> at org.drools.modelcompiler.CanonicalKieModule.createKieBase(CanonicalKieModule.java:213)
> at org.drools.compiler.kie.builder.impl.KieContainerImpl.createKieBase(KieContainerImpl.java:470)
> {noformat}
> ====
> Even this rule causes the issue. So the key factor is the method invocation $valueB.intValue()
> {noformat}
> when
> Number( ) from accumulate (
> FactB( $valueB : value, $valueB > 0 )
> ;max($valueB.intValue())
> )
> then
> {noformat}
--
This message was sent by Atlassian Jira
(v8.13.1#813001)
5 years, 3 months
[Red Hat JIRA] (DROOLS-5933) NullPointerException at ConstraintEvaluator.findPatternAndRequiredDeclaration() in accumulate with exec-model
by Toshiya Kobayashi (Jira)
Toshiya Kobayashi created DROOLS-5933:
-----------------------------------------
Summary: NullPointerException at ConstraintEvaluator.findPatternAndRequiredDeclaration() in accumulate with exec-model
Key: DROOLS-5933
URL: https://issues.redhat.com/browse/DROOLS-5933
Project: Drools
Issue Type: Bug
Components: executable model
Affects Versions: 7.48.0.Final
Reporter: Toshiya Kobayashi
Assignee: Toshiya Kobayashi
With exec-model, a rule like this:
{noformat}
when
Number( ) from accumulate (
FactA( $valueA : value )
and
FactB( $valueB : value, eval($valueB.compareTo($valueA) <= 0) )
;max($valueB.intValue())
)
then
{noformat}
generates the following PATTERN_DSL:
{code:java}
org.drools.model.Rule rule = D.rule("org.drools.mvel.compiler",
"r1").build(D.pattern(var_GENERATED_$pattern_Number$1$),
D.accumulate(D.and(D.pattern(var_GENERATED_$pattern_FactA$2$).bind(var_$valueA,
org.drools.mvel.compiler.P46.LambdaExtractor468EFEB3BE9EA6494C88709DE97051CB.INSTANCE,
D.reactOn("value")),
D.pattern(var_GENERATED_$pattern_FactB$3$).bind(var_6C0A578A2EA3D5A5C82ABB0FA0DE5C71,
org.drools.mvel.compiler.P18.LambdaExtractor18D900ABC004631DF004CDA316CD34FD.INSTANCE,
D.reactOn("value")).expr("A574527869CA97E0B100815026E8E8FA",
var_$valueB,
var_$valueA,
org.drools.mvel.compiler.P3E.LambdaPredicate3E396A3A5FB9CCA4FC041866C27E4A3A.INSTANCE)),
D.accFunction(org.drools.core.base.accumulators.IntegerMaxAccumulateFunction::new,
var_6C0A578A2EA3D5A5C82ABB0FA0DE5C71).as(var_GENERATED_$pattern_Number$1$)),
D.execute(org.drools.mvel.compiler.P97.LambdaConsequence97C360F7B2C85569E6224ABDE862C784.INSTANCE));
{code}
It misses bind() for var_$valueB. It results in NPE during kbase build.
{noformat}
java.lang.NullPointerException
at org.drools.modelcompiler.constraints.ConstraintEvaluator.findPatternAndRequiredDeclaration(ConstraintEvaluator.java:97)
at org.drools.modelcompiler.constraints.ConstraintEvaluator.<init>(ConstraintEvaluator.java:67)
at org.drools.modelcompiler.KiePackagesBuilder.createSingleConstraint(KiePackagesBuilder.java:1064)
at org.drools.modelcompiler.KiePackagesBuilder.createConstraint(KiePackagesBuilder.java:1049)
at org.drools.modelcompiler.KiePackagesBuilder.addConstraintsToPattern(KiePackagesBuilder.java:1043)
at org.drools.modelcompiler.KiePackagesBuilder.buildPattern(KiePackagesBuilder.java:730)
at org.drools.modelcompiler.KiePackagesBuilder.recursivelyAddConditions(KiePackagesBuilder.java:624)
at org.drools.modelcompiler.KiePackagesBuilder.buildAccumulate(KiePackagesBuilder.java:581)
at org.drools.modelcompiler.KiePackagesBuilder.conditionToElement(KiePackagesBuilder.java:493)
at org.drools.modelcompiler.KiePackagesBuilder.addSubConditions(KiePackagesBuilder.java:655)
at org.drools.modelcompiler.KiePackagesBuilder.populateLHS(KiePackagesBuilder.java:449)
at org.drools.modelcompiler.KiePackagesBuilder.compileRule(KiePackagesBuilder.java:249)
at org.drools.modelcompiler.KiePackagesBuilder.build(KiePackagesBuilder.java:220)
at org.drools.modelcompiler.CanonicalKieModule.createKiePackages(CanonicalKieModule.java:306)
at org.drools.modelcompiler.CanonicalKieModule.lambda$1(CanonicalKieModule.java:213)
at java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1660)
at org.drools.modelcompiler.CanonicalKieModule.createKieBase(CanonicalKieModule.java:213)
at org.drools.compiler.kie.builder.impl.KieContainerImpl.createKieBase(KieContainerImpl.java:470)
{noformat}
--
This message was sent by Atlassian Jira
(v8.13.1#813001)
5 years, 3 months
[Red Hat JIRA] (WFLY-14133) Call Timeout is not configurable on the core bridge
by Brian Stansberry (Jira)
[ https://issues.redhat.com/browse/WFLY-14133?page=com.atlassian.jira.plugi... ]
Brian Stansberry updated WFLY-14133:
------------------------------------
Issue Type: Feature Request (was: Bug)
> Call Timeout is not configurable on the core bridge
> ---------------------------------------------------
>
> Key: WFLY-14133
> URL: https://issues.redhat.com/browse/WFLY-14133
> Project: WildFly
> Issue Type: Feature Request
> Components: JMS, Management
> Affects Versions: 22.0.0.Alpha1
> Reporter: Tomas Hofman
> Assignee: Tomas Hofman
> Priority: Major
>
> Looking at the code[1], the bridge configuration doesn't allow the configurable call timeout.
> [[1] https://github.com/wildfly/wildfly/blob/master/messaging-activemq/src/main/java/org/wildfly/extension/messaging/activemq/BridgeAdd.java#L134-L153|https://github.com/wildfly/wildfly/blob/master/messaging-activemq/src/main/java/org/wildfly/extension/messaging/activemq/BridgeAdd.java#L134-L153]
--
This message was sent by Atlassian Jira
(v8.13.1#813001)
5 years, 3 months
[Red Hat JIRA] (WFLY-14269) Wildfly 21's “allow-unescaped-characters-in-url” ignored when HTTP2 request going through Windows hosts file
by Marton Csukas (Jira)
[ https://issues.redhat.com/browse/WFLY-14269?page=com.atlassian.jira.plugi... ]
Marton Csukas updated WFLY-14269:
---------------------------------
Steps to Reproduce:
* Have an entry in your Windows hosts file for the endpoint you are about to test, e.g.:
{code:java}
127.0.0.1 myappname.company.com{code}
* In standalone.xml have *allow-unescaped-characters-in-url=true* on *http-listener* and *https-listener*
* In standalone.xml also have *enable-http2=true* on *http-listener* and *https-listener***
* On _Wildfly 21.0.0.Final_ send a GET request with at least one | (pipe) character in the query parameters
* In latest Chrome (Version 87.0.4280.88 (Official Build) (64-bit)) or Firefox call a GET request with unencoded | (pipe) symbol in the query (e.g.: GET myappname.company.com/myAPI?someParam=customerId=1212090,caseId=1078841||...)
* On Wildfly 21.0.× this will result in a ERR_HTTP2_PROTOCOL_ERROR, and a 4×× error code - with the request not even hitting the application - essentially allow-unescaped-characters-in-url is ignored
* On Wildfly 20.0.× this works fine, as expected.
* On Wildfly 21.0.× , when I remove *enable-http2*, or set it to false, it also works fine.
If you remove the entry from the hosts file though, and the request goes through the company load balancer for myappname.company.com, the request will be successful.
was:
* Have an entry in your Windows hosts file for the endpoint you are about to test, e.g.:
{code:java}
127.0.0.1 myappname.company.com{code}
* On _Wildfly 21.0.0.Final_ send a GET request with at least one | (pipe) character in the query parameters
* In latest Chrome (Version 87.0.4280.88 (Official Build) (64-bit)) or Firefox call a GET request with unencoded | (pipe) symbol in the query (e.g.: GET myappname.company.com/myAPI?someParam=customerId=1212090,caseId=1078841||...)
* On Wildfly 21.0.× this will result in a ERR_HTTP2_PROTOCOL_ERROR, and a 4×× error code - with the request not even hitting the application
* On Wildfly 20.0.× this works fine, as expected.
* On Wildfly 21.0.× , when I remove *enable-http2*, or set it to false, it also works fine.
If you remove the entry from the hosts file though, and the request goes through the company load balancer for myappname.company.com, the request will be successful.
> Wildfly 21's “allow-unescaped-characters-in-url” ignored when HTTP2 request going through Windows hosts file
> ------------------------------------------------------------------------------------------------------------
>
> Key: WFLY-14269
> URL: https://issues.redhat.com/browse/WFLY-14269
> Project: WildFly
> Issue Type: Bug
> Components: Web (Undertow)
> Affects Versions: 21.0.0.Final, 21.0.1.Final, 21.0.2.Final
> Reporter: Marton Csukas
> Assignee: Flavia Rainone
> Priority: Major
>
> I have a _Wildfly 21.0.0.Final_ running a Spring Boot REST application and I encountered a strange behaviour with {{GET}} requests containing {{|}} (pipe) character in the query parameters.
> {{|}} (pipe) character is unsafe according to the RFC1738 specification of HTTP, while RFC3986 allows for the encoding of Unicode characters.
> However, Wildfly (Undertow) has an option on {{http-listener}} and {{https-listener}} entries to {{allow-unescaped-characters-in-url}}.
> Full {{standalone.xml}} [here|https://gist.github.com/martoncsukas/746695... masked sensitive info.
>
> The application is running on {{127.0.0.1:443}}, and is exposed to the outside world as [https://myappname.company.com|https://myappname.company.com/] via a PulseSecure load balancer, where {{myappname}} is a CNAME registered on {{company.com}} DNS, pointing to the load balancers VIP.
> The {{allow-unescaped-characters-in-url="true"}} bit works fine in these cases (so when the request containing {{|}} _doesn't_ go through the Windows {{hosts}} file, but goes through the load balancer).
> However, when I add an entry to the Windows {{hosts}} file to bypass the load balancer, such as:
> 127.0.0.1 myappname.company.com
> …then the {{GET}} request containing {{|}} in its query parameter won't work - in fact it looks like it is not even hitting the server, as if Wildfly/Undertow's {{allow-unescaped-characters-in-url="true"}} setting wouldn't even be there.
> Now this causes issues with our local testing. Is there any change we can make so that {{allow-unescaped-characters-in-url="true"}} would be always respected?
> We know that ideally {{|}} should be encoded to {{%7D}}, but we would be interested in a solution (ideally on Wildfly level) that would make {{allow-unescaped-characters-in-url="true"}} work every time, irrespective whether the requests is going through {{hosts}} file or the load balancer.
> The very strange this is that it was working fine in _Wildfly 20.0.0.Final_, even without {{allow-unescaped-characters-in-url="true"}} being in {{standalone.xml}}.
>
> Full request source:
> {code:java}
> GET /rest/v3/news/_lite?mql=customerId=1212090,caseId=1078841||caseId=null
> HTTP/1.1
> Host: myappname.company.com
> Connection: keep-alive
> Pragma: no-cache
> Cache-Control: no-cache
> sec-ch-ua: "Google Chrome";v="87", " Not;A Brand";v="99", "Chromium";v="87"
> Accept: application/json, text/plain, */*
> Authorization: Bearer masked
> sec-ch-ua-mobile: ?0
> User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36
> Sec-Fetch-Site: same-origin
> Sec-Fetch-Mode: cors
> Sec-Fetch-Dest: empty
> Referer: https://myappname.company.com/anotherPage
> Accept-Encoding: gzip, deflate, br
> Accept-Language: en-GB,en;q=0.9
> Cookie: JSESSIONID=masked; _ga=GA1.2.1926489359.1609961117; _gid=masked; _gat_gtag_UA_112487518_3=1{code}
--
This message was sent by Atlassian Jira
(v8.13.1#813001)
5 years, 3 months
[Red Hat JIRA] (WFLY-14269) Wildfly 21's “allow-unescaped-characters-in-url” ignored when HTTP2 request going through Windows hosts file
by Marton Csukas (Jira)
[ https://issues.redhat.com/browse/WFLY-14269?page=com.atlassian.jira.plugi... ]
Marton Csukas updated WFLY-14269:
---------------------------------
Steps to Reproduce:
* Have an entry in your Windows hosts file for the endpoint you are about to test, e.g.:
{code:java}
127.0.0.1 myappname.company.com{code}
* On _Wildfly 21.0.0.Final_ send a GET request with at least one | (pipe) character in the query parameters
* In latest Chrome (Version 87.0.4280.88 (Official Build) (64-bit)) or Firefox call a GET request with unencoded | (pipe) symbol in the query (e.g.: GET myappname.company.com/myAPI?someParam=customerId=1212090,caseId=1078841||...)
* On Wildfly 21.0.× this will result in a ERR_HTTP2_PROTOCOL_ERROR, and a 4×× error code - with the request not even hitting the application
* On Wildfly 20.0.× this works fine, as expected.
* On Wildfly 21.0.× , when I remove *enable-http2*, or set it to false, it also works fine.
If you remove the entry from the hosts file though, and the request goes through the company load balancer for myappname.company.com, the request will be successful.
was:
* Have an entry in your Windows hosts file for the endpoint you are about to test, e.g.:
{code:java}
127.0.0.1 myappname.company.com{code}
* On _Wildfly 21.0.0.Final_ send a GET request with at least one | (pipe) character in the query parameters
* In latest Chrome (Version 87.0.4280.88 (Official Build) (64-bit)) or Firefox call a GET request with unencoded | (pipe) symbol in the query (e.g.: GET myappname.company.com/myAPI?someParam=customerId=1212090,caseId=1078841||...)
* On Wildfly 21.0.× this will result in a ERR_HTTP2_PROTOCOL_ERROR, and a 4×× error code - with the request not even hitting the application
* On Wildfly 20.0.× this works fine, as expected.
If you remove the entry from the hosts file though, and the request goes through the company load balancer for myappname.company.com, the request will be successful.
> Wildfly 21's “allow-unescaped-characters-in-url” ignored when HTTP2 request going through Windows hosts file
> ------------------------------------------------------------------------------------------------------------
>
> Key: WFLY-14269
> URL: https://issues.redhat.com/browse/WFLY-14269
> Project: WildFly
> Issue Type: Bug
> Components: Web (Undertow)
> Affects Versions: 21.0.0.Final, 21.0.1.Final, 21.0.2.Final
> Reporter: Marton Csukas
> Assignee: Flavia Rainone
> Priority: Major
>
> I have a _Wildfly 21.0.0.Final_ running a Spring Boot REST application and I encountered a strange behaviour with {{GET}} requests containing {{|}} (pipe) character in the query parameters.
> {{|}} (pipe) character is unsafe according to the RFC1738 specification of HTTP, while RFC3986 allows for the encoding of Unicode characters.
> However, Wildfly (Undertow) has an option on {{http-listener}} and {{https-listener}} entries to {{allow-unescaped-characters-in-url}}.
> Full {{standalone.xml}} [here|https://gist.github.com/martoncsukas/746695... masked sensitive info.
>
> The application is running on {{127.0.0.1:443}}, and is exposed to the outside world as [https://myappname.company.com|https://myappname.company.com/] via a PulseSecure load balancer, where {{myappname}} is a CNAME registered on {{company.com}} DNS, pointing to the load balancers VIP.
> The {{allow-unescaped-characters-in-url="true"}} bit works fine in these cases (so when the request containing {{|}} _doesn't_ go through the Windows {{hosts}} file, but goes through the load balancer).
> However, when I add an entry to the Windows {{hosts}} file to bypass the load balancer, such as:
> 127.0.0.1 myappname.company.com
> …then the {{GET}} request containing {{|}} in its query parameter won't work - in fact it looks like it is not even hitting the server, as if Wildfly/Undertow's {{allow-unescaped-characters-in-url="true"}} setting wouldn't even be there.
> Now this causes issues with our local testing. Is there any change we can make so that {{allow-unescaped-characters-in-url="true"}} would be always respected?
> We know that ideally {{|}} should be encoded to {{%7D}}, but we would be interested in a solution (ideally on Wildfly level) that would make {{allow-unescaped-characters-in-url="true"}} work every time, irrespective whether the requests is going through {{hosts}} file or the load balancer.
> The very strange this is that it was working fine in _Wildfly 20.0.0.Final_, even without {{allow-unescaped-characters-in-url="true"}} being in {{standalone.xml}}.
>
> Full request source:
> {code:java}
> GET /rest/v3/news/_lite?mql=customerId=1212090,caseId=1078841||caseId=null
> HTTP/1.1
> Host: myappname.company.com
> Connection: keep-alive
> Pragma: no-cache
> Cache-Control: no-cache
> sec-ch-ua: "Google Chrome";v="87", " Not;A Brand";v="99", "Chromium";v="87"
> Accept: application/json, text/plain, */*
> Authorization: Bearer masked
> sec-ch-ua-mobile: ?0
> User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36
> Sec-Fetch-Site: same-origin
> Sec-Fetch-Mode: cors
> Sec-Fetch-Dest: empty
> Referer: https://myappname.company.com/anotherPage
> Accept-Encoding: gzip, deflate, br
> Accept-Language: en-GB,en;q=0.9
> Cookie: JSESSIONID=masked; _ga=GA1.2.1926489359.1609961117; _gid=masked; _gat_gtag_UA_112487518_3=1{code}
--
This message was sent by Atlassian Jira
(v8.13.1#813001)
5 years, 3 months