[JBoss JIRA] (DROOLS-4377) Comparison error with primitive and Map in executable-model
by Toshiya Kobayashi (Jira)
[ https://issues.jboss.org/browse/DROOLS-4377?page=com.atlassian.jira.plugi... ]
Toshiya Kobayashi updated DROOLS-4377:
--------------------------------------
Git Pull Request: https://github.com/kiegroup/drools/pull/2479
> Comparison error with primitive and Map in executable-model
> -----------------------------------------------------------
>
> Key: DROOLS-4377
> URL: https://issues.jboss.org/browse/DROOLS-4377
> Project: Drools
> Issue Type: Bug
> Components: executable model
> Affects Versions: 7.24.0.Final
> Reporter: Toshiya Kobayashi
> Assignee: Luca Molteni
> Priority: Major
> Labels: support
>
> When comparing a primitive int with an Integer inside a Map,
> {noformat}
> import java.util.Map;
> import org.drools.modelcompiler.domain.Person;
> rule R1 when
> $m : Map()
> Person(age == $m['age'] )
> then
> end
> {noformat}
> executable-model build fails with "Comparison operation requires compatible types. Found int and class java.lang.Object" even though the Map's value is Integer.
> {noformat}
> [ERROR] Failures:
> [ERROR] CompilerTest.testMapPrimitiveComparison:1905->BaseModelTest.getKieSession:99->BaseModelTest.getKieSession:103->BaseModelTest.getKieContainer:107->BaseModelTest.getKieContainer:114->BaseModelTest.createKieBuilder:125->BaseModelTest.createKieBuilder:152 [Message [id=1, kieBase=defaultKieBase, level=ERROR, path=r0.drl, line=-1, column=0
> text=Comparison operation requires compatible types. Found int and class java.lang.Object]]
> {noformat}
> Non executable-model has no issue with the rule.
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
6 years, 5 months
[JBoss JIRA] (DROOLS-4377) Comparison error with primitive and Map in executable-model
by Toshiya Kobayashi (Jira)
Toshiya Kobayashi created DROOLS-4377:
-----------------------------------------
Summary: Comparison error with primitive and Map in executable-model
Key: DROOLS-4377
URL: https://issues.jboss.org/browse/DROOLS-4377
Project: Drools
Issue Type: Bug
Components: executable model
Affects Versions: 7.24.0.Final
Reporter: Toshiya Kobayashi
Assignee: Luca Molteni
When comparing a primitive int with an Integer inside a Map,
{noformat}
import java.util.Map;
import org.drools.modelcompiler.domain.Person;
rule R1 when
$m : Map()
Person(age == $m['age'] )
then
end
{noformat}
executable-model build fails with "Comparison operation requires compatible types. Found int and class java.lang.Object" even though the Map's value is Integer.
{noformat}
[ERROR] Failures:
[ERROR] CompilerTest.testMapPrimitiveComparison:1905->BaseModelTest.getKieSession:99->BaseModelTest.getKieSession:103->BaseModelTest.getKieContainer:107->BaseModelTest.getKieContainer:114->BaseModelTest.createKieBuilder:125->BaseModelTest.createKieBuilder:152 [Message [id=1, kieBase=defaultKieBase, level=ERROR, path=r0.drl, line=-1, column=0
text=Comparison operation requires compatible types. Found int and class java.lang.Object]]
{noformat}
Non executable-model has no issue with the rule.
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
6 years, 5 months
[JBoss JIRA] (WFWIP-163) WildFlyServerStatus is not present in operator description
by Martin Choma (Jira)
[ https://issues.jboss.org/browse/WFWIP-163?page=com.atlassian.jira.plugin.... ]
Martin Choma commented on WFWIP-163:
------------------------------------
[~jmesnil] could you build image with fix please?
> WildFlyServerStatus is not present in operator description
> -----------------------------------------------------------
>
> Key: WFWIP-163
> URL: https://issues.jboss.org/browse/WFWIP-163
> Project: WildFly WIP
> Issue Type: Bug
> Components: OpenShift
> Environment: *openshift:* {{v3.11.82}}
> *operator image:* {{quay.io/wildfly/wildfly-operator:0.2.0}}
> *runtime image:* {{quay.io/wildfly/wildfly-centos7:17.0}}
> *application image:* {{pkremens/simple-jaxrs-wildfly}}
> Reporter: Petr Kremensky
> Assignee: Jeff Mesnil
> Priority: Blocker
> Attachments: wildfly-operator.txt
>
>
> According to the [operator api documentation|https://github.com/wildfly/wildfly-operator/blob/master/doc...], the deployment pods status should be pard of operator description, but I failed to find such on OCP.
> Install the wildfly operator on OCP as described by [wildfly-operator - openshift|https://github.com/wildfly/wildfly-operator#openshift] section.
> *steps to reproduce*
> {noformat}
> $ cat << EOF > simple-jaxrs-wildfly.yaml
> apiVersion: wildfly.org/v1alpha1
> kind: WildFlyServer
> metadata:
> name: simple-jaxrs-wildfly
> spec:
> applicationImage: "pkremens/simple-jaxrs-wildfly"
> size: 2
> EOF
> $ oc apply -f simple-jaxrs-wildfly.yaml
> $ oc expose service/simple-jaxrs-wildfly-loadbalancer
> # verify that application is accessible
> $ ROUTE=$(oc get route.route.openshift.io/simple-jaxrs-wildfly-loadbalancer --template='{{ .spec.host }}')
> $ curl $ROUTE/ping
> pong
> $ oc describe wildflyserver simple-jaxrs-wildfly
> Name: simple-jaxrs-wildfly
> Namespace: myproject
> Labels: <none>
> Annotations: kubectl.kubernetes.io/last-applied-configuration={"apiVersion":"wildfly.org/v1alpha1","kind":"WildFlyServer","metadata":{"annotations":{},"name":"simple-jaxrs-wildfly","namespace":"myproject"},"spec":...
> API Version: wildfly.org/v1alpha1
> Kind: WildFlyServer
> Metadata:
> Creation Timestamp: 2019-07-02T13:11:58Z
> Generation: 1
> Resource Version: 4318
> Self Link: /apis/wildfly.org/v1alpha1/namespaces/myproject/wildflyservers/simple-jaxrs-wildfly
> UID: f8eb76bf-9cca-11e9-b8ee-52540043aed8
> Spec:
> Application Image: pkremens/simple-jaxrs-wildfly
> Size: 2
> Events: <none>
> {noformat}
> Operator status is not part of the object.
> For wildfly operator pod logs see [^wildfly-operator.txt] attachment.
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
6 years, 5 months
[JBoss JIRA] (DROOLS-4376) Abbreviated comparison with Map fails in executable-model
by Toshiya Kobayashi (Jira)
[ https://issues.jboss.org/browse/DROOLS-4376?page=com.atlassian.jira.plugi... ]
Toshiya Kobayashi updated DROOLS-4376:
--------------------------------------
Git Pull Request: https://github.com/kiegroup/drools/pull/2478
> Abbreviated comparison with Map fails in executable-model
> ---------------------------------------------------------
>
> Key: DROOLS-4376
> URL: https://issues.jboss.org/browse/DROOLS-4376
> Project: Drools
> Issue Type: Bug
> Components: executable model
> Affects Versions: 7.24.0.Final
> Reporter: Toshiya Kobayashi
> Assignee: Luca Molteni
> Priority: Major
> Labels: support
>
> When we write abbreviated comparison with Map,
> {noformat}
> import java.util.Map;
> rule R1 when
> Map(this['money'] >= 65 && <= 75)
> then
> end
> {noformat}
> executable-model build fails.
> {noformat}
> [ERROR] testMapAbbreviatedComparison[FLOW_DSL](org.drools.modelcompiler.CompilerTest) Time elapsed: 0.258 s <<< ERROR!
> java.lang.UnsupportedOperationException: Unknown expression: this["money"]
> at org.drools.modelcompiler.builder.generator.expressiontyper.ExpressionTyper.findLeftLeafOfNameExpr(ExpressionTyper.java:875)
> at org.drools.modelcompiler.builder.generator.expressiontyper.ExpressionTyper.findLeftLeafOfNameExpr(ExpressionTyper.java:867)
> at org.drools.modelcompiler.builder.generator.expressiontyper.ExpressionTyper.findLeftLeafOfNameExpr(ExpressionTyper.java:867)
> at org.drools.modelcompiler.builder.generator.DrlxParseUtil.trasformHalfBinaryToBinary(DrlxParseUtil.java:331)
> at org.drools.modelcompiler.builder.generator.expressiontyper.ExpressionTyper.toTypedExpressionRec(ExpressionTyper.java:170)
> at org.drools.modelcompiler.builder.generator.expressiontyper.ExpressionTyper.toTypedExpression(ExpressionTyper.java:118)
> at org.drools.modelcompiler.builder.generator.drlxparse.ConstraintParser.parseBinaryExpr(ConstraintParser.java:309)
> at org.drools.modelcompiler.builder.generator.drlxparse.ConstraintParser.getDrlxParseResult(ConstraintParser.java:114)
> at org.drools.modelcompiler.builder.generator.drlxparse.ConstraintParser.drlxParse(ConstraintParser.java:81)
> at org.drools.modelcompiler.builder.generator.visitor.pattern.PatternDSL.findAllConstraint(PatternDSL.java:124)
> at org.drools.modelcompiler.builder.generator.visitor.pattern.PatternDSL.buildPattern(PatternDSL.java:191)
> at org.drools.modelcompiler.builder.generator.visitor.ModelGeneratorVisitor.visit(ModelGeneratorVisitor.java:128)
> at org.drools.compiler.lang.descr.PatternDescr.accept(PatternDescr.java:267)
> {noformat}
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
6 years, 5 months
[JBoss JIRA] (DROOLS-4376) Abbreviated comparison with Map fails in executable-model
by Toshiya Kobayashi (Jira)
Toshiya Kobayashi created DROOLS-4376:
-----------------------------------------
Summary: Abbreviated comparison with Map fails in executable-model
Key: DROOLS-4376
URL: https://issues.jboss.org/browse/DROOLS-4376
Project: Drools
Issue Type: Bug
Components: executable model
Affects Versions: 7.24.0.Final
Reporter: Toshiya Kobayashi
Assignee: Luca Molteni
When we write abbreviated comparison with Map,
{noformat}
import java.util.Map;
rule R1 when
Map(this['money'] >= 65 && <= 75)
then
end
{noformat}
executable-model build fails.
{noformat}
[ERROR] testMapAbbreviatedComparison[FLOW_DSL](org.drools.modelcompiler.CompilerTest) Time elapsed: 0.258 s <<< ERROR!
java.lang.UnsupportedOperationException: Unknown expression: this["money"]
at org.drools.modelcompiler.builder.generator.expressiontyper.ExpressionTyper.findLeftLeafOfNameExpr(ExpressionTyper.java:875)
at org.drools.modelcompiler.builder.generator.expressiontyper.ExpressionTyper.findLeftLeafOfNameExpr(ExpressionTyper.java:867)
at org.drools.modelcompiler.builder.generator.expressiontyper.ExpressionTyper.findLeftLeafOfNameExpr(ExpressionTyper.java:867)
at org.drools.modelcompiler.builder.generator.DrlxParseUtil.trasformHalfBinaryToBinary(DrlxParseUtil.java:331)
at org.drools.modelcompiler.builder.generator.expressiontyper.ExpressionTyper.toTypedExpressionRec(ExpressionTyper.java:170)
at org.drools.modelcompiler.builder.generator.expressiontyper.ExpressionTyper.toTypedExpression(ExpressionTyper.java:118)
at org.drools.modelcompiler.builder.generator.drlxparse.ConstraintParser.parseBinaryExpr(ConstraintParser.java:309)
at org.drools.modelcompiler.builder.generator.drlxparse.ConstraintParser.getDrlxParseResult(ConstraintParser.java:114)
at org.drools.modelcompiler.builder.generator.drlxparse.ConstraintParser.drlxParse(ConstraintParser.java:81)
at org.drools.modelcompiler.builder.generator.visitor.pattern.PatternDSL.findAllConstraint(PatternDSL.java:124)
at org.drools.modelcompiler.builder.generator.visitor.pattern.PatternDSL.buildPattern(PatternDSL.java:191)
at org.drools.modelcompiler.builder.generator.visitor.ModelGeneratorVisitor.visit(ModelGeneratorVisitor.java:128)
at org.drools.compiler.lang.descr.PatternDescr.accept(PatternDescr.java:267)
{noformat}
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
6 years, 5 months