[Red Hat JIRA] (DROOLS-5954) Variable binding of a Map element causes compilation errors in executable model.
by Luca Molteni (Jira)
[ https://issues.redhat.com/browse/DROOLS-5954?page=com.atlassian.jira.plug... ]
Luca Molteni updated DROOLS-5954:
---------------------------------
Sprint: 2020 Week 52-03 (from Dec 21) (was: 2021 Week 04-06 (from Jan 25))
> Variable binding of a Map element causes compilation errors in executable model.
> --------------------------------------------------------------------------------
>
> Key: DROOLS-5954
> URL: https://issues.redhat.com/browse/DROOLS-5954
> Project: Drools
> Issue Type: Bug
> Components: executable model
> Reporter: Luca Molteni
> Assignee: Luca Molteni
> Priority: Major
> Labels: support
>
> Building a rule written in MVEL dialect like (\*1) that accesses to a Map element and bind the value to a variable (\*1-1) in executable rule model, compilation errors occur. The error messages are varied depending on RHDM version. (\*2-1), (\*2-2), (\*2-3) are the error messages on 7.5.0 to 7.6.0, 7.7.0 to 7.7.1, 7.8.0 to 7.9.0 respectively.
> (\*1)
> {noformat}
> package com.example.reproducer
> import com.example.reproducer.Car
> dialect "mvel"
> rule "rule1a1"
> when
> $car : Car( $spec : specifications["transmission"] ) // ..... (*1-1)
> then
> System.out.println("***** Action of rule1a1");
> System.out.println("***** $car: " + $car + ", transmission specification = " + $spec);
> end
> {noformat}
> Where {{specifications}} is a {{Map<String, Object>}} type property. Even if the type is {{Map<String, String>}} (rule "rule1a2" in Sample.drl), the same error occurs as well.
> (\*2-1) Error messages on RHDM 7.5.0 to 7.6.0
> {noformat}
> [ERROR] /work2/testdir/reproducer_mc_1a1_1a2/target/generated-sources/drools-model-compiler/main/java/com/example/reproducer/Rules99a3451765bf47d5beed5aa17ec5250eRuleMethods0.java:[27,86] incompatible types: inference variable A has incompatible bounds
> equality constraints: java.util.Map
> lower bounds: java.lang.Object
> [ERROR] /work2/testdir/reproducer_mc_1a1_1a2/target/generated-sources/drools-model-compiler/main/java/com/example/reproducer/Rules99a3451765bf47d5beed5aa17ec5250eRuleMethods0.java:[27,61] method build in class org.drools.model.impl.RuleBuilder cannot be applied to given types;
> required: org.drools.model.RuleItemBuilder<?>[]
> found: <any>,org.drools.model.consequences.ConsequenceBuilder._2<com.example.reproducer.Car,java.util.Map>
> reason: varargs mismatch; inference variable A has incompatible bounds
> equality constraints: java.util.Map
> lower bounds: java.lang.Object
> {noformat}
> (\*2-2) Error messages on RHDM 7.7.0 to 7.7.1
> {noformat}
> [ERROR] /work2/testdir/reproducer_mc_1a1_1a2/target/generated-sources/drools-model-compiler/main/java/com/example/reproducer/Rules4931e491d49648edb0d8704c825666f7RuleMethods0.java:[27,80] no suitable method found for bind(org.drools.model.Variable<java.util.Map>,(com.examp[...]ber"))
> method org.drools.model.PatternDSL.PatternDef.<A>bind(org.drools.model.Variable<A>,org.drools.model.functions.Function1<com.example.reproducer.Car,A>) is not applicable
> (inference variable A has incompatible bounds
> equality constraints: java.util.Map
> lower bounds: java.lang.String)
> method org.drools.model.PatternDSL.PatternDef.<A>bind(org.drools.model.Variable<A>,org.drools.model.functions.Function1<com.example.reproducer.Car,A>,org.drools.model.PatternDSL.ReactOn) is not applicable
> (cannot infer type-variable(s) A
> (actual and formal argument lists differ in length))
> method org.drools.model.PatternDSL.PatternDef.<A,U>bind(org.drools.model.Variable<A>,org.drools.model.Variable<U>,org.drools.model.functions.Function1<U,A>) is not applicable
> (cannot infer type-variable(s) A,U
> (actual and formal argument lists differ in length))
> method org.drools.model.PatternDSL.PatternDef.<A,U>bind(org.drools.model.Variable<A>,org.drools.model.Variable<U>,org.drools.model.functions.Function1<U,A>,org.drools.model.PatternDSL.ReactOn) is not applicable
> (cannot infer type-variable(s) A,U
> (actual and formal argument lists differ in length))
> method org.drools.model.PatternDSL.PatternDef.<A,U>bind(org.drools.model.Variable<A>,org.drools.model.Variable<U>,org.drools.model.functions.Function2<com.example.reproducer.Car,U,A>) is not applicable
> (cannot infer type-variable(s) A,U
> (actual and formal argument lists differ in length))
> method org.drools.model.PatternDSL.PatternDef.<A,U>bind(org.drools.model.Variable<A>,org.drools.model.Variable<U>,org.drools.model.functions.Function2<com.example.reproducer.Car,U,A>,org.drools.model.PatternDSL.ReactOn) is not applicable
> (cannot infer type-variable(s) A,U
> (actual and formal argument lists differ in length))
> method org.drools.model.PatternDSL.PatternDef.<A,U,V>bind(org.drools.model.Variable<A>,org.drools.model.Variable<U>,org.drools.model.Variable<V>,org.drools.model.functions.Function3<com.example.reproducer.Car,U,V,A>) is not applicable
> (cannot infer type-variable(s) A,U,V
> (actual and formal argument lists differ in length))
> method org.drools.model.PatternDSL.PatternDef.<A,U,V>bind(org.drools.model.Variable<A>,org.drools.model.Variable<U>,org.drools.model.Variable<V>,org.drools.model.functions.Function3<com.example.reproducer.Car,U,V,A>,org.drools.model.PatternDSL.ReactOn) is not applicable
> (cannot infer type-variable(s) A,U,V
> (actual and formal argument lists differ in length))
> method org.drools.model.PatternDSL.PatternDef.<A,U,V,W>bind(org.drools.model.Variable<A>,org.drools.model.Variable<U>,org.drools.model.Variable<V>,org.drools.model.Variable<W>,org.drools.model.functions.Function4<com.example.reproducer.Car,U,V,W,A>) is not applicable
> (cannot infer type-variable(s) A,U,V,W
> (actual and formal argument lists differ in length))
> method org.drools.model.PatternDSL.PatternDef.<A,U,V,W>bind(org.drools.model.Variable<A>,org.drools.model.Variable<U>,org.drools.model.Variable<V>,org.drools.model.Variable<W>,org.drools.model.functions.Function4<com.example.reproducer.Car,U,V,W,A>,org.drools.model.PatternDSL.ReactOn) is not applicable
> (cannot infer type-variable(s) A,U,V,W
> (actual and formal argument lists differ in length))
> {noformat}
> (\*2-3) Error messages on RHDM 7.8.0 to 7.9.0
> {noformat}
> [ERROR] /work2/testdir/reproducer_mc_1a1_1a2/target/generated-sources/drools-model-compiler/main/java/com/example/reproducer/PBE/LambdaExtractorBE8AE82BEE077650A708E067B870D9AE.java:[17,45] incompatible types: java.lang.Object cannot be converted to java.util.Map
> {noformat}
--
This message was sent by Atlassian Jira
(v8.13.1#813001)
5 years, 3 months
[Red Hat JIRA] (WFLY-14308) RunAsPrincipal from Servlet not propagated to secured EJB
by Joerg Baesner (Jira)
Joerg Baesner created WFLY-14308:
------------------------------------
Summary: RunAsPrincipal from Servlet not propagated to secured EJB
Key: WFLY-14308
URL: https://issues.redhat.com/browse/WFLY-14308
Project: WildFly
Issue Type: Bug
Components: Security
Affects Versions: 22.0.0.Final
Reporter: Joerg Baesner
Assignee: Darran Lofthouse
Attachments: playground.zip
In a single enterprise application (ear) with a _web_ module and a _ejb_ module, a call from a {{Servlet}} annotated with {{@RunAsPrincipal(...)}} and {{@RunAs(...)}} to a secured SLSB does not propagate the principal to the EJB.
See the explanations in the _Steps to Reproduce_ section for more details
--
This message was sent by Atlassian Jira
(v8.13.1#813001)
5 years, 3 months
[Red Hat JIRA] (WFLY-14307) RunAsPrincipal from Servlet not propagated to secured EJB
by Joerg Baesner (Jira)
Joerg Baesner created WFLY-14307:
------------------------------------
Summary: RunAsPrincipal from Servlet not propagated to secured EJB
Key: WFLY-14307
URL: https://issues.redhat.com/browse/WFLY-14307
Project: WildFly
Issue Type: Bug
Components: Security
Affects Versions: 22.0.0.Final
Reporter: Joerg Baesner
Assignee: Darran Lofthouse
Attachments: playground.zip
In a single enterprise application (ear) with a _web_ module and a _ejb_ module, a call from a {{Servlet}} annotated with {{@RunAsPrincipal(...)}} and {{@RunAs(...)}} to a secured SLSB does not propagate the principal to the EJB.
See the explanations in the _Steps to Reproduce_ section for more details
--
This message was sent by Atlassian Jira
(v8.13.1#813001)
5 years, 3 months
[Red Hat JIRA] (ELY-2070) CredentialStore is not able to get data from credential storage in file on IBM JDK 8
by Marek Kopecky (Jira)
[ https://issues.redhat.com/browse/ELY-2070?page=com.atlassian.jira.plugin.... ]
Marek Kopecky commented on ELY-2070:
------------------------------------
cc [~aabdelsa] [~okotek] [~fjuma]
> CredentialStore is not able to get data from credential storage in file on IBM JDK 8
> ------------------------------------------------------------------------------------
>
> Key: ELY-2070
> URL: https://issues.redhat.com/browse/ELY-2070
> Project: WildFly Elytron
> Issue Type: Bug
> Reporter: Marek Kopecky
> Assignee: Darran Lofthouse
> Priority: Major
>
> CredentialStore is not able to get data from credential storage in file on IBM JDK 8
> Related feature was added as a part of ELY-1879
> *Reproducer:*
> * Run CredentialStoreCommandTest test with IBM JDK 8
> ** Use JDK11, set IBM-JDK8 path to mvn property:
> {noformat}
> git clone git@github.com:wildfly-security/wildfly-elytron.git .
> cd tool
> mvn test -Dmaven.main.skip=true -B -fae -Dmaven.test.failure.ignore=true -P skip-default-tests -Djava8.home=$PATH_TO_IBM_JDK_8_HOME -Denforcer.skip=true -Dtest=CredentialStoreCommandTest
> {noformat}
> * 5 tests fails
> ** testImportPKCSKeyPairFromFile
> ** testGenerateKeyPairECDSA
> ** testImportOpenSSHKeyPairFromString
> ** testImportOpenSSHKeyPairFromFile
> ** testImportPKCSKeyPairFromString
--
This message was sent by Atlassian Jira
(v8.13.1#813001)
5 years, 3 months
[Red Hat JIRA] (ELY-2070) CredentialStore is not able to get data from credential storage in file on IBM JDK 8
by Marek Kopecky (Jira)
Marek Kopecky created ELY-2070:
----------------------------------
Summary: CredentialStore is not able to get data from credential storage in file on IBM JDK 8
Key: ELY-2070
URL: https://issues.redhat.com/browse/ELY-2070
Project: WildFly Elytron
Issue Type: Bug
Reporter: Marek Kopecky
Assignee: Darran Lofthouse
CredentialStore is not able to get data from credential storage in file on IBM JDK 8
Related feature was added as a part of ELY-1879
*Reproducer:*
* Run CredentialStoreCommandTest test with IBM JDK 8
** Use JDK11, set IBM-JDK8 path to mvn property:
{noformat}
git clone git@github.com:wildfly-security/wildfly-elytron.git .
cd tool
mvn test -Dmaven.main.skip=true -B -fae -Dmaven.test.failure.ignore=true -P skip-default-tests -Djava8.home=$PATH_TO_IBM_JDK_8_HOME -Denforcer.skip=true -Dtest=CredentialStoreCommandTest
{noformat}
* 5 tests fails
** testImportPKCSKeyPairFromFile
** testGenerateKeyPairECDSA
** testImportOpenSSHKeyPairFromString
** testImportOpenSSHKeyPairFromFile
** testImportPKCSKeyPairFromString
--
This message was sent by Atlassian Jira
(v8.13.1#813001)
5 years, 3 months
[Red Hat JIRA] (DROOLS-5954) Variable binding of a Map element causes compilation errors in executable model.
by Luca Molteni (Jira)
[ https://issues.redhat.com/browse/DROOLS-5954?page=com.atlassian.jira.plug... ]
Luca Molteni moved RHDM-1577 to DROOLS-5954:
--------------------------------------------
Component/s: executable model
(was: BRE)
Docs QE Status: NEW
Key: DROOLS-5954 (was: RHDM-1577)
QE Status: NEW
Affects Version/s: (was: 7.5.0.GA)
(was: 7.6.0.GA)
(was: 7.5.1.GA)
(was: 7.7.0.GA)
(was: 7.8.0.GA)
(was: 7.7.1.GA)
(was: 7.9.0.GA)
(was: 7.8.1.GA)
Workflow: GIT Pull Request workflow (was: CDW with docs v1)
Environment: (was: This issue is found on RHDM 7.5.0 to RHDM 7.9.0.)
Project: Drools (was: Red Hat Decision Manager)
> Variable binding of a Map element causes compilation errors in executable model.
> --------------------------------------------------------------------------------
>
> Key: DROOLS-5954
> URL: https://issues.redhat.com/browse/DROOLS-5954
> Project: Drools
> Issue Type: Bug
> Components: executable model
> Reporter: Luca Molteni
> Assignee: Luca Molteni
> Priority: Major
> Labels: support
>
> Building a rule written in MVEL dialect like (\*1) that accesses to a Map element and bind the value to a variable (\*1-1) in executable rule model, compilation errors occur. The error messages are varied depending on RHDM version. (\*2-1), (\*2-2), (\*2-3) are the error messages on 7.5.0 to 7.6.0, 7.7.0 to 7.7.1, 7.8.0 to 7.9.0 respectively.
> (\*1)
> {noformat}
> package com.example.reproducer
> import com.example.reproducer.Car
> dialect "mvel"
> rule "rule1a1"
> when
> $car : Car( $spec : specifications["transmission"] ) // ..... (*1-1)
> then
> System.out.println("***** Action of rule1a1");
> System.out.println("***** $car: " + $car + ", transmission specification = " + $spec);
> end
> {noformat}
> Where {{specifications}} is a {{Map<String, Object>}} type property. Even if the type is {{Map<String, String>}} (rule "rule1a2" in Sample.drl), the same error occurs as well.
> (\*2-1) Error messages on RHDM 7.5.0 to 7.6.0
> {noformat}
> [ERROR] /work2/testdir/reproducer_mc_1a1_1a2/target/generated-sources/drools-model-compiler/main/java/com/example/reproducer/Rules99a3451765bf47d5beed5aa17ec5250eRuleMethods0.java:[27,86] incompatible types: inference variable A has incompatible bounds
> equality constraints: java.util.Map
> lower bounds: java.lang.Object
> [ERROR] /work2/testdir/reproducer_mc_1a1_1a2/target/generated-sources/drools-model-compiler/main/java/com/example/reproducer/Rules99a3451765bf47d5beed5aa17ec5250eRuleMethods0.java:[27,61] method build in class org.drools.model.impl.RuleBuilder cannot be applied to given types;
> required: org.drools.model.RuleItemBuilder<?>[]
> found: <any>,org.drools.model.consequences.ConsequenceBuilder._2<com.example.reproducer.Car,java.util.Map>
> reason: varargs mismatch; inference variable A has incompatible bounds
> equality constraints: java.util.Map
> lower bounds: java.lang.Object
> {noformat}
> (\*2-2) Error messages on RHDM 7.7.0 to 7.7.1
> {noformat}
> [ERROR] /work2/testdir/reproducer_mc_1a1_1a2/target/generated-sources/drools-model-compiler/main/java/com/example/reproducer/Rules4931e491d49648edb0d8704c825666f7RuleMethods0.java:[27,80] no suitable method found for bind(org.drools.model.Variable<java.util.Map>,(com.examp[...]ber"))
> method org.drools.model.PatternDSL.PatternDef.<A>bind(org.drools.model.Variable<A>,org.drools.model.functions.Function1<com.example.reproducer.Car,A>) is not applicable
> (inference variable A has incompatible bounds
> equality constraints: java.util.Map
> lower bounds: java.lang.String)
> method org.drools.model.PatternDSL.PatternDef.<A>bind(org.drools.model.Variable<A>,org.drools.model.functions.Function1<com.example.reproducer.Car,A>,org.drools.model.PatternDSL.ReactOn) is not applicable
> (cannot infer type-variable(s) A
> (actual and formal argument lists differ in length))
> method org.drools.model.PatternDSL.PatternDef.<A,U>bind(org.drools.model.Variable<A>,org.drools.model.Variable<U>,org.drools.model.functions.Function1<U,A>) is not applicable
> (cannot infer type-variable(s) A,U
> (actual and formal argument lists differ in length))
> method org.drools.model.PatternDSL.PatternDef.<A,U>bind(org.drools.model.Variable<A>,org.drools.model.Variable<U>,org.drools.model.functions.Function1<U,A>,org.drools.model.PatternDSL.ReactOn) is not applicable
> (cannot infer type-variable(s) A,U
> (actual and formal argument lists differ in length))
> method org.drools.model.PatternDSL.PatternDef.<A,U>bind(org.drools.model.Variable<A>,org.drools.model.Variable<U>,org.drools.model.functions.Function2<com.example.reproducer.Car,U,A>) is not applicable
> (cannot infer type-variable(s) A,U
> (actual and formal argument lists differ in length))
> method org.drools.model.PatternDSL.PatternDef.<A,U>bind(org.drools.model.Variable<A>,org.drools.model.Variable<U>,org.drools.model.functions.Function2<com.example.reproducer.Car,U,A>,org.drools.model.PatternDSL.ReactOn) is not applicable
> (cannot infer type-variable(s) A,U
> (actual and formal argument lists differ in length))
> method org.drools.model.PatternDSL.PatternDef.<A,U,V>bind(org.drools.model.Variable<A>,org.drools.model.Variable<U>,org.drools.model.Variable<V>,org.drools.model.functions.Function3<com.example.reproducer.Car,U,V,A>) is not applicable
> (cannot infer type-variable(s) A,U,V
> (actual and formal argument lists differ in length))
> method org.drools.model.PatternDSL.PatternDef.<A,U,V>bind(org.drools.model.Variable<A>,org.drools.model.Variable<U>,org.drools.model.Variable<V>,org.drools.model.functions.Function3<com.example.reproducer.Car,U,V,A>,org.drools.model.PatternDSL.ReactOn) is not applicable
> (cannot infer type-variable(s) A,U,V
> (actual and formal argument lists differ in length))
> method org.drools.model.PatternDSL.PatternDef.<A,U,V,W>bind(org.drools.model.Variable<A>,org.drools.model.Variable<U>,org.drools.model.Variable<V>,org.drools.model.Variable<W>,org.drools.model.functions.Function4<com.example.reproducer.Car,U,V,W,A>) is not applicable
> (cannot infer type-variable(s) A,U,V,W
> (actual and formal argument lists differ in length))
> method org.drools.model.PatternDSL.PatternDef.<A,U,V,W>bind(org.drools.model.Variable<A>,org.drools.model.Variable<U>,org.drools.model.Variable<V>,org.drools.model.Variable<W>,org.drools.model.functions.Function4<com.example.reproducer.Car,U,V,W,A>,org.drools.model.PatternDSL.ReactOn) is not applicable
> (cannot infer type-variable(s) A,U,V,W
> (actual and formal argument lists differ in length))
> {noformat}
> (\*2-3) Error messages on RHDM 7.8.0 to 7.9.0
> {noformat}
> [ERROR] /work2/testdir/reproducer_mc_1a1_1a2/target/generated-sources/drools-model-compiler/main/java/com/example/reproducer/PBE/LambdaExtractorBE8AE82BEE077650A708E067B870D9AE.java:[17,45] incompatible types: java.lang.Object cannot be converted to java.util.Map
> {noformat}
--
This message was sent by Atlassian Jira
(v8.13.1#813001)
5 years, 3 months
[Red Hat JIRA] (DROOLS-5944) DMN OAS investigate InputData with undefined typeRef
by Matteo Mortari (Jira)
[ https://issues.redhat.com/browse/DROOLS-5944?page=com.atlassian.jira.plug... ]
Matteo Mortari commented on DROOLS-5944:
----------------------------------------
The role of this is to increase case coverage, and the test demonstrate no further code change is required while producing JSON schema/openapi descriptors.
Later, the JSON schema for the DMN I/O is used to produce swagger/OAS descriptors for the whole REST api doc.
Such definition is valid as no error is produced in swagger UI, example:
!screenshot-1.png|thumbnail!
Also please notice the Swagger/OAS as a whole is Valid.
For example can be reproduced by Validating against:
{code}
{
"openapi": "3.0.3",
"info": {
"title": "Generated API",
"version": "1.0"
},
"paths": {
"/undefinedIO": {
"get": {
"responses": {
"200": {
"description": "OK",
"content": {
"application/xml": {
"schema": {
"type": "string"
}
}
}
}
}
},
"post": {
"requestBody": {
"description": "DMN input",
"content": {
"application/json": {
"schema": {
"x-dmn-type": "FEEL:Any"
}
}
}
},
"responses": {
"default": {
"description": "DMN output",
"content": {
"application/json": {
"schema": {
"x-dmn-type": "FEEL:Any"
}
}
}
}
}
}
}
}
}
{code}
as in:
!screenshot-2.png|thumbnail!
Validated OK as:
!screenshot-3.png|thumbnail!
{code}
curl -X POST "https://validator.swagger.io/validator/" -H "accept: image/png" -H "Content-Type: application/yaml" -d "{\"openapi\":\"3.0.3\",\"info\":{\"title\":\"Generated API\",\"version\":\"1.0\"},\"paths\":{\"/undefinedIO\":{\"get\":{\"responses\":{\"200\":{\"description\":\"OK\",\"content\":{\"application/xml\":{\"schema\":{\"type\":\"string\"}}}}}},\"post\":{\"requestBody\":{\"description\":\"DMN input\",\"content\":{\"application/json\":{\"schema\":{\"x-dmn-type\":\"FEEL:Any\"}}}},\"responses\":{\"default\":{\"description\":\"DMN output\",\"content\":{\"application/json\":{\"schema\":{\"x-dmn-type\":\"FEEL:Any\"}}}}}}}}}"
{code}
When later used in "OpenAPI UI Forms" is the underlying React form library does NOT support the input field:
!screenshot-4.png|thumbnail!
Being a generic undefined object, but this is a limitation of the React form library which cannot reconciliate which type of Form Input to be used for this field, understandably.
But not a problem from a Validation of the Swagger/OAS definition.
> DMN OAS investigate InputData with undefined typeRef
> ----------------------------------------------------
>
> Key: DROOLS-5944
> URL: https://issues.redhat.com/browse/DROOLS-5944
> Project: Drools
> Issue Type: Task
> Components: dmn engine
> Reporter: Matteo Mortari
> Assignee: Matteo Mortari
> Priority: Major
> Attachments: screenshot-1.png, screenshot-2.png, screenshot-3.png, screenshot-4.png
>
>
--
This message was sent by Atlassian Jira
(v8.13.1#813001)
5 years, 3 months