[Red Hat JIRA] (ELY-2074) SSO from FORM authentication required a distributed session
by Darran Lofthouse (Jira)
[ https://issues.redhat.com/browse/ELY-2074?page=com.atlassian.jira.plugin.... ]
Darran Lofthouse commented on ELY-2074:
---------------------------------------
The following is where we receive a notification about session invalidation which triggers the logout process:
[https://github.com/wildfly-security/wildfly-elytron/blob/1.x/http/sso/src...]
The notification does indicate why the session is being invalidated:
[https://github.com/wildfly-security/wildfly-elytron/blob/1.x/http/base/sr...]
We likely can just ignore the notification if it is for an undeployment, if this was the only node then there is nothing to clean up anyway but if there are other nodes we should assume the SSO session at least will fail over.
> SSO from FORM authentication required a distributed session
> -----------------------------------------------------------
>
> Key: ELY-2074
> URL: https://issues.redhat.com/browse/ELY-2074
> Project: WildFly Elytron
> Issue Type: Bug
> Components: HTTP
> Affects Versions: 1.14.1.Final
> Reporter: Darran Lofthouse
> Assignee: Darran Lofthouse
> Priority: Major
> Fix For: 1.14.2.CR1
>
>
> Presently SSO only works on failover if also have a distributed HTTP session.
> The SSO support is supposed to be operating independently of the session otherwise we should have just used the session to replicate the identity. I suspect that when we attempt to restore the identity we check if we have a session scope but as it does not exist we skip attempting the restoration, we should be open to restoration being possible without a session.
> Overall however it feels like this approach will require some clean up which may be needed for ELY-1626 - instead of the current approach which intercepts session access and converts to SSO we may be better making SSO a real scope or something similar so mechanisms can interact directly with it. The approach today where we wrap the scope access and intercept the calls means mechanisms can easily make invalid assumptions about scope availability such as in this case.
> The following TRACE logging shows a successful failover where a web application is marked as being distributed:
> {code:java}
> 2021-01-26 11:01:34,120 TRACE [org.wildfly.security.http.servlet] (default task-1) Created ServletSecurityContextImpl enableJapi=true, integratedJaspi=true, applicationContext=default-host /simple-webapp
> 2021-01-26 11:01:34,121 TRACE [org.wildfly.security.http.servlet] (default task-1) No AuthConfigProvider for layer=HttpServlet, appContext=default-host /simple-webapp
> 2021-01-26 11:01:34,121 TRACE [org.wildfly.security.http.servlet] (default task-1) JASPIC Unavailable, using HTTP authentication.
> 2021-01-26 11:01:34,158 TRACE [org.wildfly.security] (default task-1) No CachedIdentity to restore.
> 2021-01-26 11:01:34,158 TRACE [org.wildfly.security] (default task-1) Created HttpServerAuthenticationMechanism [org.wildfly.security.auth.server.SecurityIdentityServerMechanismFactory$1@4b6842ff] for mechanism [FORM]
> 2021-01-26 11:01:34,160 TRACE [org.wildfly.security] (default task-1) Handling SocketAddressCallback
> 2021-01-26 11:01:34,160 TRACE [org.wildfly.security] (default task-1) Handling MechanismInformationCallback type='HTTP' name='FORM' host-name='localhost' protocol='http'
> 2021-01-26 11:01:34,160 TRACE [org.wildfly.security.http.form] (default task-1) Trying to re-authenticate session 3t7EGcnmInMeUYH3-thjyQpTyOanRdoX3Dm-BcS6. Request URI: [http://localhost:8080/simple-webapp/secured], Context path: [/simple-webapp]
> 2021-01-26 11:01:34,160 TRACE [org.wildfly.security] (default task-1) Principal assigning: [alice], pre-realm rewritten: [alice], realm name: [example-realm], post-realm rewritten: [alice], realm rewritten: [alice]
> 2021-01-26 11:01:34,165 TRACE [org.wildfly.security] (default task-1) Role mapping: principal [alice] -> decoded roles [Users, user] -> domain decoded roles [] -> realm mapped roles [Users, user] -> domain mapped roles [Users, user]
> 2021-01-26 11:01:34,166 TRACE [org.wildfly.security] (default task-1) Authorizing principal alice.
> 2021-01-26 11:01:34,166 TRACE [org.wildfly.security] (default task-1) Authorizing against the following attributes: [groups] => [user, Users]
> 2021-01-26 11:01:34,166 TRACE [org.wildfly.security] (default task-1) Authorizing against the following runtime attributes: [Source-Address] => [127.0.0.1]
> 2021-01-26 11:01:34,166 TRACE [org.wildfly.security] (default task-1) Permission mapping: identity [alice] with roles [Users, user] implies ("org.wildfly.security.auth.permission.LoginPermission" "") = true
> 2021-01-26 11:01:34,166 TRACE [org.wildfly.security] (default task-1) Authorization succeed
> 2021-01-26 11:01:34,166 TRACE [org.wildfly.security] (default task-1) Handling CachedIdentityAuthorizeCallback: principal = alice authorizedIdentity = SecurityIdentity{principal=alice, securityDomain=org.wildfly.security.auth.server.SecurityDomain@61f54c5f, authorizationIdentity=EMPTY, realmInfo=RealmInfo{name='example-realm', securityRealm=org.wildfly.security.auth.realm.FileSystemSecurityRealm@78079856}, creationTime=2021-01-26T11:01:34.165503Z}
> 2021-01-26 11:01:34,167 TRACE [org.wildfly.security] (default task-1) Handling AuthenticationCompleteCallback: succeed
> 2021-01-26 11:01:34,167 TRACE [org.wildfly.security] (default task-1) Handling SecurityIdentityCallback: identity = SecurityIdentity{principal=alice, securityDomain=org.wildfly.security.auth.server.SecurityDomain@61f54c5f, authorizationIdentity=EMPTY, realmInfo=RealmInfo{name='example-realm', securityRealm=org.wildfly.security.auth.realm.FileSystemSecurityRealm@78079856}, creationTime=2021-01-26T11:01:34.165503Z}
> 2021-01-26 11:01:34,168 TRACE [org.wildfly.security] (default task-1) Role mapping: principal [alice] -> decoded roles [Users, user] -> domain decoded roles [] -> realm mapped roles [Users, user] -> domain mapped roles [Users, user] {code}
>
> Where the web application is not distributed the following is logged instead:
> {code:java}
> 2021-01-26 11:26:14,189 INFO [org.infinispan.CLUSTER] (thread-10,ejb,nodea) ISPN100001: Node nodeb left the cluster
> 2021-01-26 11:26:59,400 TRACE [org.wildfly.security.http.servlet] (default task-1) Created ServletSecurityContextImpl enableJapi=true, integratedJaspi=true, applicationContext=default-host /simple-webapp
> 2021-01-26 11:26:59,400 TRACE [org.wildfly.security.http.servlet] (default task-1) No AuthConfigProvider for layer=HttpServlet, appContext=default-host /simple-webapp
> 2021-01-26 11:26:59,400 TRACE [org.wildfly.security.http.servlet] (default task-1) JASPIC Unavailable, using HTTP authentication.
> 2021-01-26 11:26:59,402 TRACE [org.wildfly.security] (default task-1) No CachedIdentity to restore.
> 2021-01-26 11:26:59,402 TRACE [org.wildfly.security] (default task-1) Created HttpServerAuthenticationMechanism [org.wildfly.security.auth.server.SecurityIdentityServerMechanismFactory$1@71dc2149] for mechanism [FORM]
> 2021-01-26 11:26:59,404 TRACE [org.wildfly.security] (default task-1) Handling SocketAddressCallback
> 2021-01-26 11:26:59,404 TRACE [org.wildfly.security] (default task-1) Handling MechanismInformationCallback type='HTTP' name='FORM' host-name='localhost' protocol='http'
> 2021-01-26 11:26:59,404 TRACE [org.wildfly.security.http.form] (default task-1) Trying to re-authenticate. There is no session attached to the following request. Request URI: [http://localhost:8080/simple-webapp/secured], Context path: [/simple-webapp]
> 2021-01-26 11:26:59,404 TRACE [org.wildfly.security] (default task-1) Handling CachedIdentityAuthorizeCallback: principal = null authorizedIdentity = null {code}
>
--
This message was sent by Atlassian Jira
(v8.13.1#813001)
3 years, 2 months
[Red Hat JIRA] (DROOLS-5817) Cannot extract timestamp from ZonedDateTime in executable-model
by Toshiya Kobayashi (Jira)
[ https://issues.redhat.com/browse/DROOLS-5817?page=com.atlassian.jira.plug... ]
Toshiya Kobayashi updated DROOLS-5817:
--------------------------------------
Description:
exec-model fails to handle ZonedDateTime with the following rule.
{noformat}
rule R when
$t1 : TimestampedObject()
$t2 : TimestampedObject( zonedDateTime after $t1.zonedDateTime )
then
list.add($t2.getName());
end
{noformat}
{noformat}
java.lang.RuntimeException: Cannot extract timestamp from 2021-01-29T17:21:38.986580+09:00[Asia/Tokyo]
at org.drools.core.base.evaluators.PointInTimeEvaluator.getTimestampFromDate(PointInTimeEvaluator.java:114)
at org.drools.modelcompiler.constraints.TemporalConstraintEvaluator.getStartTimestamp(TemporalConstraintEvaluator.java:79)
at org.drools.modelcompiler.constraints.TemporalConstraintEvaluator.evaluate(TemporalConstraintEvaluator.java:49)
at org.drools.modelcompiler.constraints.LambdaConstraint.isAllowedCachedLeft(LambdaConstraint.java:162)
at org.drools.core.common.SingleBetaConstraints.isAllowedCachedLeft(SingleBetaConstraints.java:134)
at org.drools.core.phreak.PhreakJoinNode.doLeftInserts(PhreakJoinNode.java:108)
at org.drools.core.phreak.PhreakJoinNode.doNode(PhreakJoinNode.java:71)
...
{noformat}
This issue is found in org.drools.mvel.integrationtests.TemporalOperatorTest but there is another issue in TemporalOperatorTest so will be split to another JIRA (DROOLS-5974). This JIRA addresses only the ZonedDateTime issue.
was:
exec-model fails to handle ZonedDateTime with the following rule.
{noformat}
rule R when
$t1 : TimestampedObject()
$t2 : TimestampedObject( zonedDateTime after $t1.zonedDateTime )
then
list.add($t2.getName());
end
{noformat}
{noformat}
java.lang.RuntimeException: Cannot extract timestamp from 2021-01-29T17:21:38.986580+09:00[Asia/Tokyo]
at org.drools.core.base.evaluators.PointInTimeEvaluator.getTimestampFromDate(PointInTimeEvaluator.java:114)
at org.drools.modelcompiler.constraints.TemporalConstraintEvaluator.getStartTimestamp(TemporalConstraintEvaluator.java:79)
at org.drools.modelcompiler.constraints.TemporalConstraintEvaluator.evaluate(TemporalConstraintEvaluator.java:49)
at org.drools.modelcompiler.constraints.LambdaConstraint.isAllowedCachedLeft(LambdaConstraint.java:162)
at org.drools.core.common.SingleBetaConstraints.isAllowedCachedLeft(SingleBetaConstraints.java:134)
at org.drools.core.phreak.PhreakJoinNode.doLeftInserts(PhreakJoinNode.java:108)
at org.drools.core.phreak.PhreakJoinNode.doNode(PhreakJoinNode.java:71)
...
{noformat}
This issue is found in org.drools.mvel.integrationtests.TemporalOperatorTest but there is another issue in TemporalOperatorTest so will be split to another JIRA. This JIRA addresses only the ZonedDateTime issue.
> Cannot extract timestamp from ZonedDateTime in executable-model
> ---------------------------------------------------------------
>
> Key: DROOLS-5817
> URL: https://issues.redhat.com/browse/DROOLS-5817
> Project: Drools
> Issue Type: Bug
> Components: executable model
> Affects Versions: 7.46.0.Final
> Reporter: Toshiya Kobayashi
> Assignee: Toshiya Kobayashi
> Priority: Major
>
> exec-model fails to handle ZonedDateTime with the following rule.
> {noformat}
> rule R when
> $t1 : TimestampedObject()
> $t2 : TimestampedObject( zonedDateTime after $t1.zonedDateTime )
> then
> list.add($t2.getName());
> end
> {noformat}
> {noformat}
> java.lang.RuntimeException: Cannot extract timestamp from 2021-01-29T17:21:38.986580+09:00[Asia/Tokyo]
> at org.drools.core.base.evaluators.PointInTimeEvaluator.getTimestampFromDate(PointInTimeEvaluator.java:114)
> at org.drools.modelcompiler.constraints.TemporalConstraintEvaluator.getStartTimestamp(TemporalConstraintEvaluator.java:79)
> at org.drools.modelcompiler.constraints.TemporalConstraintEvaluator.evaluate(TemporalConstraintEvaluator.java:49)
> at org.drools.modelcompiler.constraints.LambdaConstraint.isAllowedCachedLeft(LambdaConstraint.java:162)
> at org.drools.core.common.SingleBetaConstraints.isAllowedCachedLeft(SingleBetaConstraints.java:134)
> at org.drools.core.phreak.PhreakJoinNode.doLeftInserts(PhreakJoinNode.java:108)
> at org.drools.core.phreak.PhreakJoinNode.doNode(PhreakJoinNode.java:71)
> ...
> {noformat}
> This issue is found in org.drools.mvel.integrationtests.TemporalOperatorTest but there is another issue in TemporalOperatorTest so will be split to another JIRA (DROOLS-5974). This JIRA addresses only the ZonedDateTime issue.
--
This message was sent by Atlassian Jira
(v8.13.1#813001)
3 years, 2 months
[Red Hat JIRA] (DROOLS-5974) TemporalOperatorTest.testComparisonWithLocalDateAndLiteral error with exec-model
by Toshiya Kobayashi (Jira)
[ https://issues.redhat.com/browse/DROOLS-5974?page=com.atlassian.jira.plug... ]
Toshiya Kobayashi updated DROOLS-5974:
--------------------------------------
Description:
When exec-model is enabled, TemporalOperatorTest.testComparisonWithLocalDateAndLiteral() and testComparisonWithLocalDateTimeAndLiteral() fails with
{noformat}
[ERROR] TemporalOperatorTest.testComparisonWithLocalDateAndLiteral:201->checkConstantTemporalConstraint:218 [[Message [id=1, level=ERROR, path=src/main/java/defaultpkg/Rules3720416353E1D657058FA25088C64AC0RuleMethods0.java, line=19, column=81
text=method alphaIndexedBy in class org.drools.model.PatternDSL cannot be applied to given types;
required: java.lang.Class<U>,org.drools.model.Index.ConstraintType,int,org.drools.model.functions.Function1<T,U>,U
found: java.lang.Class<java.time.LocalDateTime>,org.drools.model.Index.ConstraintType,int,defaultpkg.PD7.LambdaExtractorD759DE2BBA2992B5101D6828C6AA5085,java.lang.String
reason: inference variable U has incompatible bounds
equality constraints: java.time.LocalDateTime
lower bounds: java.lang.String], Message [id=2, level=ERROR, path=src/main/java/defaultpkg/Rules3720416353E1D657058FA25088C64AC0RuleMethods0.java, line=0, column=0
text=Java source of src/main/java/defaultpkg/Rules3720416353E1D657058FA25088C64AC0RuleMethods0.java in error:
package defaultpkg;
...
{noformat}
was:
When eec-model is enabled, TemporalOperatorTest.testComparisonWithLocalDateAndLiteral() and testComparisonWithLocalDateTimeAndLiteral() fails with
{noformat}
[ERROR] TemporalOperatorTest.testComparisonWithLocalDateAndLiteral:201->checkConstantTemporalConstraint:218 [[Message [id=1, level=ERROR, path=src/main/java/defaultpkg/Rules3720416353E1D657058FA25088C64AC0RuleMethods0.java, line=19, column=81
text=method alphaIndexedBy in class org.drools.model.PatternDSL cannot be applied to given types;
required: java.lang.Class<U>,org.drools.model.Index.ConstraintType,int,org.drools.model.functions.Function1<T,U>,U
found: java.lang.Class<java.time.LocalDateTime>,org.drools.model.Index.ConstraintType,int,defaultpkg.PD7.LambdaExtractorD759DE2BBA2992B5101D6828C6AA5085,java.lang.String
reason: inference variable U has incompatible bounds
equality constraints: java.time.LocalDateTime
lower bounds: java.lang.String], Message [id=2, level=ERROR, path=src/main/java/defaultpkg/Rules3720416353E1D657058FA25088C64AC0RuleMethods0.java, line=0, column=0
text=Java source of src/main/java/defaultpkg/Rules3720416353E1D657058FA25088C64AC0RuleMethods0.java in error:
package defaultpkg;
...
{noformat}
> TemporalOperatorTest.testComparisonWithLocalDateAndLiteral error with exec-model
> --------------------------------------------------------------------------------
>
> Key: DROOLS-5974
> URL: https://issues.redhat.com/browse/DROOLS-5974
> Project: Drools
> Issue Type: Bug
> Components: executable model
> Affects Versions: 7.49.0.Final
> Reporter: Toshiya Kobayashi
> Assignee: Toshiya Kobayashi
> Priority: Major
>
> When exec-model is enabled, TemporalOperatorTest.testComparisonWithLocalDateAndLiteral() and testComparisonWithLocalDateTimeAndLiteral() fails with
> {noformat}
> [ERROR] TemporalOperatorTest.testComparisonWithLocalDateAndLiteral:201->checkConstantTemporalConstraint:218 [[Message [id=1, level=ERROR, path=src/main/java/defaultpkg/Rules3720416353E1D657058FA25088C64AC0RuleMethods0.java, line=19, column=81
> text=method alphaIndexedBy in class org.drools.model.PatternDSL cannot be applied to given types;
> required: java.lang.Class<U>,org.drools.model.Index.ConstraintType,int,org.drools.model.functions.Function1<T,U>,U
> found: java.lang.Class<java.time.LocalDateTime>,org.drools.model.Index.ConstraintType,int,defaultpkg.PD7.LambdaExtractorD759DE2BBA2992B5101D6828C6AA5085,java.lang.String
> reason: inference variable U has incompatible bounds
> equality constraints: java.time.LocalDateTime
> lower bounds: java.lang.String], Message [id=2, level=ERROR, path=src/main/java/defaultpkg/Rules3720416353E1D657058FA25088C64AC0RuleMethods0.java, line=0, column=0
> text=Java source of src/main/java/defaultpkg/Rules3720416353E1D657058FA25088C64AC0RuleMethods0.java in error:
> package defaultpkg;
> ...
> {noformat}
--
This message was sent by Atlassian Jira
(v8.13.1#813001)
3 years, 2 months
[Red Hat JIRA] (DROOLS-5974) TemporalOperatorTest.testComparisonWithLocalDateAndLiteral error with exec-model
by Toshiya Kobayashi (Jira)
Toshiya Kobayashi created DROOLS-5974:
-----------------------------------------
Summary: TemporalOperatorTest.testComparisonWithLocalDateAndLiteral error with exec-model
Key: DROOLS-5974
URL: https://issues.redhat.com/browse/DROOLS-5974
Project: Drools
Issue Type: Bug
Components: executable model
Affects Versions: 7.49.0.Final
Reporter: Toshiya Kobayashi
Assignee: Toshiya Kobayashi
When eec-model is enabled, TemporalOperatorTest.testComparisonWithLocalDateAndLiteral() and testComparisonWithLocalDateTimeAndLiteral() fails with
{noformat}
[ERROR] TemporalOperatorTest.testComparisonWithLocalDateAndLiteral:201->checkConstantTemporalConstraint:218 [[Message [id=1, level=ERROR, path=src/main/java/defaultpkg/Rules3720416353E1D657058FA25088C64AC0RuleMethods0.java, line=19, column=81
text=method alphaIndexedBy in class org.drools.model.PatternDSL cannot be applied to given types;
required: java.lang.Class<U>,org.drools.model.Index.ConstraintType,int,org.drools.model.functions.Function1<T,U>,U
found: java.lang.Class<java.time.LocalDateTime>,org.drools.model.Index.ConstraintType,int,defaultpkg.PD7.LambdaExtractorD759DE2BBA2992B5101D6828C6AA5085,java.lang.String
reason: inference variable U has incompatible bounds
equality constraints: java.time.LocalDateTime
lower bounds: java.lang.String], Message [id=2, level=ERROR, path=src/main/java/defaultpkg/Rules3720416353E1D657058FA25088C64AC0RuleMethods0.java, line=0, column=0
text=Java source of src/main/java/defaultpkg/Rules3720416353E1D657058FA25088C64AC0RuleMethods0.java in error:
package defaultpkg;
...
{noformat}
--
This message was sent by Atlassian Jira
(v8.13.1#813001)
3 years, 2 months
[Red Hat JIRA] (DROOLS-5817) Cannot extract timestamp from ZonedDateTime in executable-model
by Toshiya Kobayashi (Jira)
[ https://issues.redhat.com/browse/DROOLS-5817?page=com.atlassian.jira.plug... ]
Toshiya Kobayashi updated DROOLS-5817:
--------------------------------------
Summary: Cannot extract timestamp from ZonedDateTime in executable-model (was: executable-model test failure in test-compiler-integration TemporalOperatorTest)
> Cannot extract timestamp from ZonedDateTime in executable-model
> ---------------------------------------------------------------
>
> Key: DROOLS-5817
> URL: https://issues.redhat.com/browse/DROOLS-5817
> Project: Drools
> Issue Type: Bug
> Components: executable model
> Affects Versions: 7.46.0.Final
> Reporter: Toshiya Kobayashi
> Assignee: Toshiya Kobayashi
> Priority: Major
>
> exec-model fails to handle ZonedDateTime with the following rule.
> {noformat}
> rule R when
> $t1 : TimestampedObject()
> $t2 : TimestampedObject( zonedDateTime after $t1.zonedDateTime )
> then
> list.add($t2.getName());
> end
> {noformat}
> {noformat}
> java.lang.RuntimeException: Cannot extract timestamp from 2021-01-29T17:21:38.986580+09:00[Asia/Tokyo]
> at org.drools.core.base.evaluators.PointInTimeEvaluator.getTimestampFromDate(PointInTimeEvaluator.java:114)
> at org.drools.modelcompiler.constraints.TemporalConstraintEvaluator.getStartTimestamp(TemporalConstraintEvaluator.java:79)
> at org.drools.modelcompiler.constraints.TemporalConstraintEvaluator.evaluate(TemporalConstraintEvaluator.java:49)
> at org.drools.modelcompiler.constraints.LambdaConstraint.isAllowedCachedLeft(LambdaConstraint.java:162)
> at org.drools.core.common.SingleBetaConstraints.isAllowedCachedLeft(SingleBetaConstraints.java:134)
> at org.drools.core.phreak.PhreakJoinNode.doLeftInserts(PhreakJoinNode.java:108)
> at org.drools.core.phreak.PhreakJoinNode.doNode(PhreakJoinNode.java:71)
> ...
> {noformat}
> This issue is found in org.drools.mvel.integrationtests.TemporalOperatorTest but there is another issue in TemporalOperatorTest so will be split to another JIRA. This JIRA addresses only the ZonedDateTime issue.
--
This message was sent by Atlassian Jira
(v8.13.1#813001)
3 years, 2 months
[Red Hat JIRA] (DROOLS-5817) executable-model test failure in test-compiler-integration TemporalOperatorTest
by Toshiya Kobayashi (Jira)
[ https://issues.redhat.com/browse/DROOLS-5817?page=com.atlassian.jira.plug... ]
Toshiya Kobayashi updated DROOLS-5817:
--------------------------------------
Description:
exec-model fails to handle ZonedDateTime with the following rule.
{noformat}
rule R when
$t1 : TimestampedObject()
$t2 : TimestampedObject( zonedDateTime after $t1.zonedDateTime )
then
list.add($t2.getName());
end
{noformat}
{noformat}
java.lang.RuntimeException: Cannot extract timestamp from 2021-01-29T17:21:38.986580+09:00[Asia/Tokyo]
at org.drools.core.base.evaluators.PointInTimeEvaluator.getTimestampFromDate(PointInTimeEvaluator.java:114)
at org.drools.modelcompiler.constraints.TemporalConstraintEvaluator.getStartTimestamp(TemporalConstraintEvaluator.java:79)
at org.drools.modelcompiler.constraints.TemporalConstraintEvaluator.evaluate(TemporalConstraintEvaluator.java:49)
at org.drools.modelcompiler.constraints.LambdaConstraint.isAllowedCachedLeft(LambdaConstraint.java:162)
at org.drools.core.common.SingleBetaConstraints.isAllowedCachedLeft(SingleBetaConstraints.java:134)
at org.drools.core.phreak.PhreakJoinNode.doLeftInserts(PhreakJoinNode.java:108)
at org.drools.core.phreak.PhreakJoinNode.doNode(PhreakJoinNode.java:71)
...
{noformat}
This issue is found in org.drools.mvel.integrationtests.TemporalOperatorTest but there is another issue in TemporalOperatorTest so will be split to another JIRA. This JIRA addresses only the ZonedDateTime issue.
was:
org.drools.mvel.integrationtests.TemporalOperatorTest in test-compiler-integration fails with some tests when executable-model is enabled. See TODO comment in the test class. Once fixed (or the test failure is justified), we can remove the TODO comment and let the test run with executable-model.
Currently, executable-model is disabled:
{code:java}
// TODO: ....
return TestParametersUtil.getKieBaseCloudConfigurations(false);
{code}
If the test failure contains multiple bugs, we may split this JIRA into multiple JIRAs.
> executable-model test failure in test-compiler-integration TemporalOperatorTest
> -------------------------------------------------------------------------------
>
> Key: DROOLS-5817
> URL: https://issues.redhat.com/browse/DROOLS-5817
> Project: Drools
> Issue Type: Bug
> Components: executable model
> Affects Versions: 7.46.0.Final
> Reporter: Toshiya Kobayashi
> Assignee: Toshiya Kobayashi
> Priority: Major
>
> exec-model fails to handle ZonedDateTime with the following rule.
> {noformat}
> rule R when
> $t1 : TimestampedObject()
> $t2 : TimestampedObject( zonedDateTime after $t1.zonedDateTime )
> then
> list.add($t2.getName());
> end
> {noformat}
> {noformat}
> java.lang.RuntimeException: Cannot extract timestamp from 2021-01-29T17:21:38.986580+09:00[Asia/Tokyo]
> at org.drools.core.base.evaluators.PointInTimeEvaluator.getTimestampFromDate(PointInTimeEvaluator.java:114)
> at org.drools.modelcompiler.constraints.TemporalConstraintEvaluator.getStartTimestamp(TemporalConstraintEvaluator.java:79)
> at org.drools.modelcompiler.constraints.TemporalConstraintEvaluator.evaluate(TemporalConstraintEvaluator.java:49)
> at org.drools.modelcompiler.constraints.LambdaConstraint.isAllowedCachedLeft(LambdaConstraint.java:162)
> at org.drools.core.common.SingleBetaConstraints.isAllowedCachedLeft(SingleBetaConstraints.java:134)
> at org.drools.core.phreak.PhreakJoinNode.doLeftInserts(PhreakJoinNode.java:108)
> at org.drools.core.phreak.PhreakJoinNode.doNode(PhreakJoinNode.java:71)
> ...
> {noformat}
> This issue is found in org.drools.mvel.integrationtests.TemporalOperatorTest but there is another issue in TemporalOperatorTest so will be split to another JIRA. This JIRA addresses only the ZonedDateTime issue.
--
This message was sent by Atlassian Jira
(v8.13.1#813001)
3 years, 2 months
[Red Hat JIRA] (WFCORE-5262) Add a timestamp at the beginning of image startup in EAP images
by Katarína Hermanová (Jira)
Katarína Hermanová created WFCORE-5262:
------------------------------------------
Summary: Add a timestamp at the beginning of image startup in EAP images
Key: WFCORE-5262
URL: https://issues.redhat.com/browse/WFCORE-5262
Project: WildFly Core
Issue Type: Enhancement
Components: CLI, Scripts
Reporter: Katarína Hermanová
Assignee: Katarína Hermanová
I'm currently investigating some test failures, and I suspect the tests are failing because of a nonstandard manifestation of JBEAP-17984. To verify that, ideally without rerunning each test and measuring the EAP startup time, I'd like to have a timestamp at the very beginning of the image startup script:
{noformat}
<-- insert timestamp here
^[[0;33mWARN Configuration of an embedded messaging broker within the appserver is enabled but is not recommended. Support for such a configuration will be removed in a future release.^[[0m
INFO If you are not configuring messaging destinations, to disable configuring an embedded messaging broker set the DISABLE_EMBEDDED_JMS_BROKER environment variable to true.
^[[0;33mWARN No password defined for JGroups cluster. AUTH protocol will be disabled. Please define JGROUPS_CLUSTER_PASSWORD.^[[0m
^[[0;33mWARN Environment variable OPENSHIFT_KUBE_PING_NAMESPACE undefined. Clustering will be unavailable. Please refer to the documentation for configuration.^[[0m
INFO Configuring JGroups discovery protocol to openshift.KUBE_PING
INFO Configuring JGroups cluster traffic encryption protocol to SYM_ENCRYPT.
^[[0;33mWARN Detected missing JGroups encryption configuration, the communication within the cluster WILL NOT be encrypted.^[[0m
Using PicketBox SSL configuration.
^[[0;33mWARN Missing SSO_URL. Unable to properly configure SSO-enabled applications^[[0m
INFO Access log is disabled, ignoring configuration.
INFO Running jboss-eap-7/eap72-openj9-11-openshift-rhel8 image, version 7.2
-XX:+UseParallelOldGC -XX:MinHeapFreeRatio=10 -XX:MaxHeapFreeRatio=20 -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90 -XX:MaxMetaspaceSize=100m -XX:+ExitOnOutOfMemoryError
=========================================================================
JBoss Bootstrap Environment
JBOSS_HOME: /opt/eap
JAVA: /usr/lib/jvm/jre-11-openj9/bin/java
JAVA_OPTS: -server -Xlog:gc*:file=/opt/eap/standalone/log/gc.log:time,uptimemillis:filecount=5,filesize=3M -Xms1303m -Xmx1303m -XX:MetaspaceSize=96M -XX:MaxMetaspaceSize=256m -Djava.net.preferIPv4Stack=true -Djboss.modules.system.pkgs=org.jboss.logmanager,jdk.nashorn.api,com.sun.crypto.provider -Djava.awt.headless=true -javaagent:/opt/jboss/container/jolokia/jolokia.jar=config=/opt/jboss/container/jolokia/etc/jolokia.properties -Xbootclasspath/a:/opt/eap/modules/system/layers/base/.overlays/layer-base-jboss-eap-7.2.4.CP/org/jboss/logmanager/main/jboss-logmanager-2.1.14.Final-redhat-00001.jar:/opt/eap/modules/system/layers/base/org/glassfish/javax/json/main/javax.json-1.1.2.redhat-1.jar:/opt/eap/modules/system/layers/base/javax/json/api/main/javax.json-api-1.1.2.redhat-1.jar:/opt/eap/modules/system/layers/base/.overlays/layer-base-jboss-eap-7.2.4.CP/org/wildfly/common/main/wildfly-common-1.5.1.Final-redhat-00001.jar -Djava.util.logging.manager=org.jboss.logmanager.LogManager -Dsun.util.logging.disableCallerCheck=true -XX:+UseParallelOldGC -XX:MinHeapFreeRatio=10 -XX:MaxHeapFreeRatio=20 -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90 -XX:+ExitOnOutOfMemoryError -Djava.security.egd=file:/dev/./urandom --add-exports=java.base/sun.nio.ch=ALL-UNNAMED --add-exports=jdk.unsupported/sun.misc=ALL-UNNAMED --add-exports=jdk.unsupported/sun.reflect=ALL-UNNAMED --add-modules=java.se
=========================================================================
JVMJ9VM085W Malformed option: '-Xlog:gc*:file=/opt/eap/standalone/log/gc.log:time'
Nov 11, 2019 9:40:13 PM java.lang.System$LoggerFinder lambda$getLoggerFinder$0
WARNING: Failed to instantiate LoggerFinder provider; Using default.
...
{noformat}
There are other ways of finding out how long this took, e.g. events, but each has certain drawbacks. The events for example, get cleaned up after two hours, in default OpenShift configuration. I'd like the timestamp information to be persisted in the pod logs, and be present by default.
Once the EAP startup commences, EAP prints timestamps, so that's fine. I just need to also measure the time before the EAP startup begins.
--
This message was sent by Atlassian Jira
(v8.13.1#813001)
3 years, 2 months
[Red Hat JIRA] (DROOLS-5971) IllegalStateException: Currently we cannot modify something that has mixed stated and justified equal objects
by Mario Fusco (Jira)
[ https://issues.redhat.com/browse/DROOLS-5971?page=com.atlassian.jira.plug... ]
Mario Fusco updated DROOLS-5971:
--------------------------------
Sprint: 2021 Week 04-06 (from Jan 25)
> IllegalStateException: Currently we cannot modify something that has mixed stated and justified equal objects
> -------------------------------------------------------------------------------------------------------------
>
> Key: DROOLS-5971
> URL: https://issues.redhat.com/browse/DROOLS-5971
> Project: Drools
> Issue Type: Bug
> Components: core engine
> Affects Versions: 7.48.0.Final
> Reporter: Mykhaylo Adamovych
> Assignee: Mario Fusco
> Priority: Major
>
> Exception says 'Currently we cannot modify something that has mixed stated and justified equal objects'. But there are no two equal objects in the session.
> Test
> {code:java}
> @Test
> public void testUpdateLogicalEvent() {
> KieSession session = ...
> AtomicInteger positive = new AtomicInteger(1);
>
> session.insert(new AtomicInteger(-1));
> session.fireAllRules();
> session.insert(positive);
> session.fireAllRules();
> session.insert(new AdminEvent("update logical event"));
> session.fireAllRules();
>
> assertEquals(1, positive.get());
> }
> public static class Event {
> private String message;
>
> public Event(String message) {
> this.message = message;
> }
>
> public String getMessage() {
> return message;
> }
>
> public void setMessage(String message) {
> this.message = message;
> }
>
> @Override
> public boolean equals(Object obj) {
> return reflectionEquals(this, obj, false);
> }
>
> @Override
> public int hashCode() {
> return reflectionHashCode(this, false);
> }
> }
> public static class AdminEvent {
> private String message;
>
> public AdminEvent(String message) {
> this.message = message;
> }
>
> public String getMessage() {
> return message;
> }
>
> public void setMessage(String message) {
> this.message = message;
> }
> }
> {code}
> Rule
> {code:java}
> dialect 'mvel'
> import java.util.concurrent.atomic.AtomicInteger
> import ...Event
> import ...AdminEvent
> rule 'negative integer'
> when
> $int: AtomicInteger(intValue < 0)
> then
> insertLogical(new Event("negative integer"))
> end
> rule 'increment positive if no negative values'
> when
> $positive: AtomicInteger(intValue > 0)
> not Event()
> then
> $positive.incrementAndGet();
> end
> rule 'update logical event'
> when
> AdminEvent(message == 'update logical event')
> $event: Event()
> then
> $event.setMessage("Updated logical event");
> update($event);
> end
> {code}
> Exception
> {code:java}
> Exception executing consequence for rule "update logical event" in org.droolsassert: [Error: drools.update($event, new org.drools.core.util.bitmask.LongBitMask(2L), org.droolsassert.LogicalEventsTest.Event.class): Currently we cannot modify something that has mixed stated and justified equal objects. Rule update logical event attempted an illegal operation]
> [Near : {... $event.setMessage("Updated log ....}]
> ^
> [Line: 1, Column: 1]
> at org.drools.core.runtime.rule.impl.DefaultConsequenceExceptionHandler.handleException(DefaultConsequenceExceptionHandler.java:39)
> at org.drools.core.common.DefaultAgenda.handleException(DefaultAgenda.java:1291)
> at org.drools.core.phreak.RuleExecutor.innerFireActivation(RuleExecutor.java:439)
> at org.drools.core.phreak.RuleExecutor.fireActivation(RuleExecutor.java:380)
> at org.drools.core.phreak.RuleExecutor.fire(RuleExecutor.java:136)
> at org.drools.core.phreak.RuleExecutor.evaluateNetworkAndFire(RuleExecutor.java:89)
> at org.drools.core.concurrent.AbstractRuleEvaluator.internalEvaluateAndFire(AbstractRuleEvaluator.java:34)
> at org.drools.core.concurrent.SequentialRuleEvaluator.evaluateAndFire(SequentialRuleEvaluator.java:43)
> at org.drools.core.common.DefaultAgenda.fireLoop(DefaultAgenda.java:1101)
> at org.drools.core.common.DefaultAgenda.internalFireAllRules(DefaultAgenda.java:1048)
> at org.drools.core.common.DefaultAgenda.fireAllRules(DefaultAgenda.java:1040)
> at org.drools.core.impl.StatefulKnowledgeSessionImpl.internalFireAllRules(StatefulKnowledgeSessionImpl.java:1330)
> at org.drools.core.impl.StatefulKnowledgeSessionImpl.fireAllRules(StatefulKnowledgeSessionImpl.java:1321)
> at org.drools.core.impl.StatefulKnowledgeSessionImpl.fireAllRules(StatefulKnowledgeSessionImpl.java:1305)
> at org.droolsassert.LogicalEventsTest.testUpdateLogicalEvent(LogicalEventsTest.java:58)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498)
> at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
> at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
> at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
> at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
> at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
> at org.droolsassert.DroolsAssert.evaluate(DroolsAssert.java:789)
> at org.droolsassert.DroolsAssert$1.evaluate(DroolsAssert.java:781)
> at org.junit.rules.RunRules.evaluate(RunRules.java:20)
> at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
> at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
> at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
> at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
> at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
> at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
> at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
> at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
> at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
> at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:89)
> at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:41)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:542)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:770)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:464)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:210)
> Caused by: [Error: drools.update($event, new org.drools.core.util.bitmask.LongBitMask(2L), org.droolsassert.LogicalEventsTest.Event.class): Currently we cannot modify something that has mixed stated and justified equal objects. Rule update logical event attempted an illegal operation]
> [Near : {... $event.setMessage("Updated log ....}]
> ^
> [Line: 1, Column: 1]
> at org.mvel2.optimizers.impl.refl.ReflectiveAccessorOptimizer.compileGetChain(ReflectiveAccessorOptimizer.java:435)
> at org.mvel2.optimizers.impl.refl.ReflectiveAccessorOptimizer.optimizeAccessor(ReflectiveAccessorOptimizer.java:163)
> at org.mvel2.ast.ASTNode.optimize(ASTNode.java:159)
> at org.mvel2.ast.ASTNode.getReducedValueAccelerated(ASTNode.java:115)
> at org.mvel2.MVELRuntime.execute(MVELRuntime.java:85)
> at org.mvel2.compiler.CompiledExpression.getDirectValue(CompiledExpression.java:123)
> at org.mvel2.compiler.CompiledExpression.getValue(CompiledExpression.java:119)
> at org.mvel2.compiler.CompiledExpression.getValue(CompiledExpression.java:113)
> at org.mvel2.MVEL.executeExpression(MVEL.java:929)
> at org.drools.core.base.mvel.MVELConsequence.evaluate(MVELConsequence.java:110)
> at org.drools.core.phreak.RuleExecutor.innerFireActivation(RuleExecutor.java:432)
> ... 39 more
> Caused by: java.lang.reflect.InvocationTargetException
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498)
> at org.mvel2.optimizers.impl.refl.ReflectiveAccessorOptimizer.getMethod(ReflectiveAccessorOptimizer.java:1119)
> at org.mvel2.optimizers.impl.refl.ReflectiveAccessorOptimizer.getMethod(ReflectiveAccessorOptimizer.java:1002)
> at org.mvel2.optimizers.impl.refl.ReflectiveAccessorOptimizer.compileGetChain(ReflectiveAccessorOptimizer.java:396)
> ... 49 more
> Caused by: java.lang.IllegalStateException: Currently we cannot modify something that has mixed stated and justified equal objects. Rule update logical event attempted an illegal operation
> at org.drools.core.common.NamedEntryPoint.update(NamedEntryPoint.java:383)
> at org.drools.core.base.DefaultKnowledgeHelper.update(DefaultKnowledgeHelper.java:410)
> at org.drools.core.base.DefaultKnowledgeHelper.update(DefaultKnowledgeHelper.java:425)
> ... 56 more
> {code}
--
This message was sent by Atlassian Jira
(v8.13.1#813001)
3 years, 2 months
[Red Hat JIRA] (DROOLS-5973) Java enum values don't match DNM enumerations when input passed as POJO
by Andrew K (Jira)
Andrew K created DROOLS-5973:
--------------------------------
Summary: Java enum values don't match DNM enumerations when input passed as POJO
Key: DROOLS-5973
URL: https://issues.redhat.com/browse/DROOLS-5973
Project: Drools
Issue Type: Bug
Components: dmn engine
Affects Versions: 7.48.0.Final
Reporter: Andrew K
Assignee: Matteo Mortari
When passing an input object into the DMN engine as a POJO, enumerations represented in the POJO as Java enums do not correctly match DMN string enumerations.
This can be worked around by converting the input to a Map using Jackson:
{code:java}
new ObjectMapper().convertValue(pojo, Map.class){code}
but this should not be necessary.
--
This message was sent by Atlassian Jira
(v8.13.1#813001)
3 years, 2 months
[Red Hat JIRA] (DROOLS-5817) executable-model test failure in test-compiler-integration TemporalOperatorTest
by Toshiya Kobayashi (Jira)
[ https://issues.redhat.com/browse/DROOLS-5817?page=com.atlassian.jira.plug... ]
Toshiya Kobayashi updated DROOLS-5817:
--------------------------------------
Story Points: 3
> executable-model test failure in test-compiler-integration TemporalOperatorTest
> -------------------------------------------------------------------------------
>
> Key: DROOLS-5817
> URL: https://issues.redhat.com/browse/DROOLS-5817
> Project: Drools
> Issue Type: Bug
> Components: executable model
> Affects Versions: 7.46.0.Final
> Reporter: Toshiya Kobayashi
> Assignee: Toshiya Kobayashi
> Priority: Major
>
> org.drools.mvel.integrationtests.TemporalOperatorTest in test-compiler-integration fails with some tests when executable-model is enabled. See TODO comment in the test class. Once fixed (or the test failure is justified), we can remove the TODO comment and let the test run with executable-model.
> Currently, executable-model is disabled:
> {code:java}
> // TODO: ....
> return TestParametersUtil.getKieBaseCloudConfigurations(false);
> {code}
> If the test failure contains multiple bugs, we may split this JIRA into multiple JIRAs.
--
This message was sent by Atlassian Jira
(v8.13.1#813001)
3 years, 2 months