[Red Hat JIRA] (DROOLS-5645) Cannot compile rules that use functions within collects
by Ciprian Chiru (Jira)
[ https://issues.redhat.com/browse/DROOLS-5645?page=com.atlassian.jira.plug... ]
Ciprian Chiru commented on DROOLS-5645:
---------------------------------------
For any additional questions related to this bug report, please address [~erikwiklander]
> Cannot compile rules that use functions within collects
> -------------------------------------------------------
>
> Key: DROOLS-5645
> URL: https://issues.redhat.com/browse/DROOLS-5645
> Project: Drools
> Issue Type: Bug
> Components: executable model
> Affects Versions: 7.43.1.Final
> Reporter: Ciprian Chiru
> Assignee: Luca Molteni
> Priority: Major
>
> Give the following example rule:
>
>
> {code:java}
> import java.util.*;
> global java.util.Set controlSet;
> global org.example.drools.service.DummyService dummyService;
> function String defaultIfBlank(String input, String default){
> return "";
> }
> rule "will execute per each Measurement having ID color"
> no-loop
> when
> Measurement( id == "color", $colorVal : val )
> List(size() > 0) from accumulate(String($s: this) from dummyService.dummy($colorVal), collectList(defaultIfBlank($s, "test")))
> then
> controlSet.add($colorVal);
> end{code}
>
>
> It fails with:
> {code:java}
> [ERROR] Message [id=1, kieBase=defaultKieBase, level=ERROR, path=rules/dummy-rule.drl, line=-1, column=0
> [ERROR] text=Root node of expression should be a declaration]{code}
>
> Can be reproduced with _7.44.0-SNAPSHOT_ .
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
5 years, 7 months
[Red Hat JIRA] (DROOLS-5641) Compilation fails when chaining methods with function calls as params
by Ciprian Chiru (Jira)
[ https://issues.redhat.com/browse/DROOLS-5641?page=com.atlassian.jira.plug... ]
Ciprian Chiru commented on DROOLS-5641:
---------------------------------------
For any additional questions related to this bug report, please address [~erikwiklander]
> Compilation fails when chaining methods with function calls as params
> ---------------------------------------------------------------------
>
> Key: DROOLS-5641
> URL: https://issues.redhat.com/browse/DROOLS-5641
> Project: Drools
> Issue Type: Bug
> Components: executable model
> Affects Versions: 7.43.0.Final
> Reporter: Ciprian Chiru
> Assignee: Luca Molteni
> Priority: Major
>
> Given the following rule:
> {code:java}
> global java.util.Set controlSet;
> global org.example.drools.service.DummyService dummyService;
> declare A
> x: String
> end
> rule "will execute per each Measurement having ID color"
> no-loop
> when
> $m: Measurement( id == "color", $colorVal : val )
> $a: A()
> String() from dummyService.dummy($m.getSomethingBy($a.x), $a)
> then
> controlSet.add($colorVal);
> end{code}
>
> The compilation fails with:
> {code:java}
> [...]/target/generated-sources/drools-model-compiler/main/java/rules/Rules7ad4e52deb9d4184b7d7e4646c172273RuleMethods0.java:[27,111] no suitable method found for from(org.drools.model.Global<org.example.drools.service.DummyService>,org.drools.model.Variable<rules.A>,org.drools.model.Variable<org.example.drools.model.Measurement>,rules.P45.LambdaExtractor4580D2619F79AA1C0CC3F15809293690)
> [ERROR] method org.drools.model.DSL.<T>from(T) is not applicable
> [ERROR] (cannot infer type-variable(s) T
> [ERROR] (actual and formal argument lists differ in length))
> [ERROR] method org.drools.model.DSL.<T>from(org.drools.model.Variable<T>) is not applicable
> [ERROR] (cannot infer type-variable(s) T
> [ERROR] (actual and formal argument lists differ in length))
> [ERROR] method org.drools.model.DSL.<T>from(org.drools.model.functions.Function0<T>) is not applicable
> [ERROR] (cannot infer type-variable(s) T
> [ERROR] (actual and formal argument lists differ in length))
> [ERROR] method org.drools.model.DSL.<T>from(org.drools.model.Variable<T>,org.drools.model.functions.Function1<T,?>) is not applicable
> [ERROR] (cannot infer type-variable(s) T
> [ERROR] (actual and formal argument lists differ in length))
> [ERROR] method org.drools.model.DSL.<A,B>from(org.drools.model.Variable<A>,org.drools.model.Variable<B>,org.drools.model.functions.Function2<A,B,?>) is not applicable
> [ERROR] (cannot infer type-variable(s) A,B
> [ERROR] (actual and formal argument lists differ in length))
> [ERROR] method org.drools.model.DSL.<A,B,C>from(org.drools.model.Variable<A>,org.drools.model.Variable<B>,org.drools.model.Variable<C>,org.drools.model.functions.Function3<A,B,C,?>) is not applicable
> [ERROR] (inference variable B has incompatible equality constraints org.example.drools.model.Measurement,rules.A)
> [ERROR] method org.drools.model.DSL.<A,B,C,D>from(org.drools.model.Variable<A>,org.drools.model.Variable<B>,org.drools.model.Variable<C>,org.drools.model.Variable<D>,org.drools.model.functions.Function4<A,B,C,D,?>) is not applicable
> [ERROR] (cannot infer type-variable(s) A,B,C,D
> [ERROR] (actual and formal argument lists differ in length)){code}
>
> This error is reproducible with the latest _7.44.0-SNAPSHOT_ .
> The parameters are flipped between the LambdaExtractor and the RuleMethods generated classes.
>
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
5 years, 7 months
[Red Hat JIRA] (DROOLS-5666) Cannot use date literals with the compiled model
by Ciprian Chiru (Jira)
[ https://issues.redhat.com/browse/DROOLS-5666?page=com.atlassian.jira.plug... ]
Ciprian Chiru commented on DROOLS-5666:
---------------------------------------
For any additional questions related to this bug report, please address [~erikwiklander] .
> Cannot use date literals with the compiled model
> ------------------------------------------------
>
> Key: DROOLS-5666
> URL: https://issues.redhat.com/browse/DROOLS-5666
> Project: Drools
> Issue Type: Bug
> Components: executable model
> Affects Versions: 7.43.1.Final
> Reporter: Ciprian Chiru
> Assignee: Luca Molteni
> Priority: Major
>
> as per [https://docs.jboss.org/drools/release/7.43.1.Final/drools-docs/html_singl... given the rule:
>
> {code:java}
> rule "will execute per each Measurement having ID color"
> no-loop
> when
> Measurement( date > "01-May-1990", $colorVal : val )
> then
> controlSet.add($colorVal);
> end{code}
> should work.
> Instead it throws:
> {code:java}
> [...]/target/generated-sources/drools-model-compiler/main/java/rules/Rules54254744800a44aa8e98a0deb3d63bb0RuleMethods0.java:[26,159] method alphaIndexedBy in class org.drools.model.PatternDSL cannot be applied to given types;
> [ERROR] required: java.lang.Class<U>,org.drools.model.Index.ConstraintType,int,org.drools.model.functions.Function1<T,U>,U
> [ERROR] found: java.lang.Class<java.time.LocalDate>,org.drools.model.Index.ConstraintType,int,rules.P33.LambdaExtractor33FA9B82326DE87BF650FB57D8DB8143,java.lang.String
> [ERROR] reason: inference variable U has incompatible bounds
> [ERROR] equality constraints: java.time.LocalDate
> [ERROR] lower bounds: java.lang.String{code}
>
>
>
>
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
5 years, 7 months
[Red Hat JIRA] (WFLY-13924) HTTP2 is not working with Oracle JDK8 u261
by Richard Opalka (Jira)
[ https://issues.redhat.com/browse/WFLY-13924?page=com.atlassian.jira.plugi... ]
Richard Opalka closed WFLY-13924.
---------------------------------
Resolution: Done
> HTTP2 is not working with Oracle JDK8 u261
> ------------------------------------------
>
> Key: WFLY-13924
> URL: https://issues.redhat.com/browse/WFLY-13924
> Project: WildFly
> Issue Type: Bug
> Components: Security, Web (Undertow)
> Affects Versions: 20.0.0.Final, 20.0.1.Final, 21.0.0.Beta1
> Reporter: Jan Stourac
> Assignee: Flavia Rainone
> Priority: Blocker
> Fix For: 21.0.0.Final
>
>
> There seems to be some problem with HTTP2 support with new Oracle JDK8 u261 and WildFly since {{20.0.0.Final}} version. When request against server is executed, then HTTP2 is not established and communication remains via HTTP/1.1.
> There is no such issue when I use {{WildFly 19.0.0.Final}}. Also, if I switch back to an older Oracle JDK8 u241, there is no such issue even with newer WildFly versions.
> This all seems to be tied with backport of ALPN support into the Oracle JDK8 recently and also work in following issue UNDERTOW-1726.
> There seems to be a workaround available - to define '-Dio.undertow.protocols.alpn.jdk8' during the server startup. With this property configured, the issue seems to disappear (as such, blocker priority of this may be discussed).
> *What is the issue here:*
> This is a change in default behavior of the server (HTTP2 not working with Oracle JDK8u261+ since WildFly 20.0.0.Final). We should try to resolve this without default behavior change if possible. Only in case there is really no other solution, we need to document such thing.
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
5 years, 7 months