[JBoss JIRA] (DROOLS-4535) ClassCastException using accumulate max in executable model
by Martin Weiler (Jira)
Martin Weiler created DROOLS-4535:
-------------------------------------
Summary: ClassCastException using accumulate max in executable model
Key: DROOLS-4535
URL: https://issues.jboss.org/browse/DROOLS-4535
Project: Drools
Issue Type: Bug
Components: core engine, executable model
Affects Versions: 7.26.0.Final
Reporter: Martin Weiler
Assignee: Mario Fusco
A rule containing the following accumulate constraint:
{noformat}
$max1 : Number() from accumulate(
StockTick($time : getTimeFieldAsDate());
max($time.getTime()))
{noformat}
is successfully compiled using the executable model, but fails at runtime:
{noformat}
java.lang.RuntimeException: java.lang.ClassCastException: java.util.Date cannot be cast to java.lang.Long
at org.drools.core.rule.SingleAccumulate.accumulate(SingleAccumulate.java:105)
at org.drools.core.phreak.PhreakAccumulateNode.addMatch(PhreakAccumulateNode.java:750)
at org.drools.core.phreak.PhreakAccumulateNode.doLeftInserts(PhreakAccumulateNode.java:168)
at org.drools.core.phreak.PhreakAccumulateNode.doNode(PhreakAccumulateNode.java:89)
at org.drools.core.phreak.RuleNetworkEvaluator.switchOnDoBetaNode(RuleNetworkEvaluator.java:581)
at org.drools.core.phreak.RuleNetworkEvaluator.evalBetaNode(RuleNetworkEvaluator.java:552)
at org.drools.core.phreak.RuleNetworkEvaluator.evalNode(RuleNetworkEvaluator.java:379)
at org.drools.core.phreak.RuleNetworkEvaluator.innerEval(RuleNetworkEvaluator.java:339)
at org.drools.core.phreak.RuleNetworkEvaluator.outerEval(RuleNetworkEvaluator.java:175)
at org.drools.core.phreak.RuleNetworkEvaluator.evaluateNetwork(RuleNetworkEvaluator.java:133)
at org.drools.core.phreak.RuleExecutor.reEvaluateNetwork(RuleExecutor.java:213)
at org.drools.core.phreak.RuleExecutor.evaluateNetworkAndFire(RuleExecutor.java:88)
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:1062)
at org.drools.core.common.DefaultAgenda.internalFireAllRules(DefaultAgenda.java:1009)
at org.drools.core.common.DefaultAgenda.fireAllRules(DefaultAgenda.java:1001)
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.drools.modelcompiler.CompilerTest.testAccumulateWithMax(CompilerTest.java:2006)
{noformat}
--
This message was sent by Atlassian Jira
(v7.13.5#713005)
6 years, 10 months
[JBoss JIRA] (DROOLS-4534) ClassCastException using accumulate max in executable model
by Martin Weiler (Jira)
Martin Weiler created DROOLS-4534:
-------------------------------------
Summary: ClassCastException using accumulate max in executable model
Key: DROOLS-4534
URL: https://issues.jboss.org/browse/DROOLS-4534
Project: Drools
Issue Type: Bug
Components: core engine, executable model
Affects Versions: 7.26.0.Final
Reporter: Martin Weiler
Assignee: Mario Fusco
A rule containing the following accumulate constraint:
{noformat}
$max1 : Number() from accumulate(
StockTick($time : getTimeFieldAsDate());
max($time.getTime()))
{noformat}
is successfully compiled using the executable model, but fails at runtime:
{noformat}
java.lang.RuntimeException: java.lang.ClassCastException: java.util.Date cannot be cast to java.lang.Long
at org.drools.core.rule.SingleAccumulate.accumulate(SingleAccumulate.java:105)
at org.drools.core.phreak.PhreakAccumulateNode.addMatch(PhreakAccumulateNode.java:750)
at org.drools.core.phreak.PhreakAccumulateNode.doLeftInserts(PhreakAccumulateNode.java:168)
at org.drools.core.phreak.PhreakAccumulateNode.doNode(PhreakAccumulateNode.java:89)
at org.drools.core.phreak.RuleNetworkEvaluator.switchOnDoBetaNode(RuleNetworkEvaluator.java:581)
at org.drools.core.phreak.RuleNetworkEvaluator.evalBetaNode(RuleNetworkEvaluator.java:552)
at org.drools.core.phreak.RuleNetworkEvaluator.evalNode(RuleNetworkEvaluator.java:379)
at org.drools.core.phreak.RuleNetworkEvaluator.innerEval(RuleNetworkEvaluator.java:339)
at org.drools.core.phreak.RuleNetworkEvaluator.outerEval(RuleNetworkEvaluator.java:175)
at org.drools.core.phreak.RuleNetworkEvaluator.evaluateNetwork(RuleNetworkEvaluator.java:133)
at org.drools.core.phreak.RuleExecutor.reEvaluateNetwork(RuleExecutor.java:213)
at org.drools.core.phreak.RuleExecutor.evaluateNetworkAndFire(RuleExecutor.java:88)
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:1062)
at org.drools.core.common.DefaultAgenda.internalFireAllRules(DefaultAgenda.java:1009)
at org.drools.core.common.DefaultAgenda.fireAllRules(DefaultAgenda.java:1001)
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.drools.modelcompiler.CompilerTest.testAccumulateWithMax(CompilerTest.java:2006)
{noformat}
--
This message was sent by Atlassian Jira
(v7.13.5#713005)
6 years, 10 months
[JBoss JIRA] (DROOLS-4533) Executable model compilation fails with java.lang.RuntimeException: Unknown expression type: -1
by Martin Weiler (Jira)
Martin Weiler created DROOLS-4533:
-------------------------------------
Summary: Executable model compilation fails with java.lang.RuntimeException: Unknown expression type: -1
Key: DROOLS-4533
URL: https://issues.jboss.org/browse/DROOLS-4533
Project: Drools
Issue Type: Bug
Components: core engine, executable model
Affects Versions: 7.26.0.Final
Reporter: Martin Weiler
Assignee: Mario Fusco
A rule containing a function call with a negative argument:
{noformat}
eval( functions.add($age, -1).compareTo(10) < 0)
{noformat}
fails to compile when using the executable model:
{noformat}
java.lang.RuntimeException: Unknown expression type: -1
at org.drools.modelcompiler.builder.generator.DrlxParseUtil.getExpressionType(DrlxParseUtil.java:245)
at org.drools.modelcompiler.builder.generator.expressiontyper.ExpressionTyper.processFirstNode(ExpressionTyper.java:562)
at org.drools.modelcompiler.builder.generator.expressiontyper.ExpressionTyper.toTypedExpressionFromMethodCallOrField(ExpressionTyper.java:380)
at org.drools.modelcompiler.builder.generator.expressiontyper.ExpressionTyper.parseNodeArguments(ExpressionTyper.java:679)
at org.drools.modelcompiler.builder.generator.expressiontyper.ExpressionTyper.parseMethodCallExpr(ExpressionTyper.java:647)
at org.drools.modelcompiler.builder.generator.expressiontyper.ExpressionTyper.methodCallExpr(ExpressionTyper.java:635)
at org.drools.modelcompiler.builder.generator.expressiontyper.ExpressionTyper.toTypedExpressionFromMethodCallOrField(ExpressionTyper.java:416)
at org.drools.modelcompiler.builder.generator.expressiontyper.ExpressionTyper.toTypedExpressionRec(ExpressionTyper.java:191)
at org.drools.modelcompiler.builder.generator.expressiontyper.ExpressionTyper.toTypedExpression(ExpressionTyper.java:121)
at org.drools.modelcompiler.builder.generator.drlxparse.ConstraintParser.parseBinaryExpr(ConstraintParser.java:269)
at org.drools.modelcompiler.builder.generator.drlxparse.ConstraintParser.getDrlxParseResult(ConstraintParser.java:89)
at org.drools.modelcompiler.builder.generator.drlxparse.ConstraintParser.drlxParse(ConstraintParser.java:56)
at org.drools.modelcompiler.builder.generator.drlxparse.ConstraintParser.drlxParse(ConstraintParser.java:51)
at org.drools.modelcompiler.builder.generator.drlxparse.ConstraintParser.drlxParse(ConstraintParser.java:47)
at org.drools.modelcompiler.builder.generator.visitor.EvalVisitor.visit(EvalVisitor.java:25)
at org.drools.modelcompiler.builder.generator.visitor.ModelGeneratorVisitor.visit(ModelGeneratorVisitor.java:94)
at org.drools.compiler.lang.descr.EvalDescr.accept(EvalDescr.java:97)
at org.drools.modelcompiler.builder.generator.visitor.AndVisitor.visit(AndVisitor.java:29)
at org.drools.modelcompiler.builder.generator.visitor.ModelGeneratorVisitor.visit(ModelGeneratorVisitor.java:69)
at org.drools.modelcompiler.builder.generator.ModelGenerator.processRule(ModelGenerator.java:173)
at org.drools.modelcompiler.builder.generator.ModelGenerator.generateModel(ModelGenerator.java:153)
at org.drools.modelcompiler.builder.ModelBuilderImpl.compileKnowledgePackages(ModelBuilderImpl.java:169)
at org.drools.modelcompiler.builder.ModelBuilderImpl.buildRules(ModelBuilderImpl.java:119)
at org.drools.modelcompiler.builder.ModelBuilderImpl.buildPackages(ModelBuilderImpl.java:69)
at org.drools.compiler.builder.impl.CompositeKnowledgeBuilderImpl.build(CompositeKnowledgeBuilderImpl.java:108)
at org.drools.compiler.builder.impl.CompositeKnowledgeBuilderImpl.build(CompositeKnowledgeBuilderImpl.java:100)
at org.drools.compiler.kie.builder.impl.AbstractKieProject.buildKnowledgePackages(AbstractKieProject.java:261)
at org.drools.compiler.kie.builder.impl.AbstractKieProject.verify(AbstractKieProject.java:75)
at org.drools.compiler.kie.builder.impl.KieBuilderImpl.buildKieProject(KieBuilderImpl.java:271)
at org.drools.compiler.kie.builder.impl.KieBuilderImpl.buildAll(KieBuilderImpl.java:239)
at org.drools.compiler.kie.builder.impl.KieBuilderImpl.buildAll(KieBuilderImpl.java:208)
at org.drools.compiler.kie.builder.impl.KieBuilderImpl.buildAll(KieBuilderImpl.java:196)
at org.drools.modelcompiler.BaseModelTest.createKieBuilder(BaseModelTest.java:144)
at org.drools.modelcompiler.BaseModelTest.createKieBuilder(BaseModelTest.java:125)
at org.drools.modelcompiler.BaseModelTest.getKieContainer(BaseModelTest.java:114)
at org.drools.modelcompiler.BaseModelTest.getKieContainer(BaseModelTest.java:107)
at org.drools.modelcompiler.BaseModelTest.getKieSession(BaseModelTest.java:103)
at org.drools.modelcompiler.BaseModelTest.getKieSession(BaseModelTest.java:99)
at org.drools.modelcompiler.CompilerTest.testEvalExprWithFunctionCall(CompilerTest.java:1997)
{noformat}
--
This message was sent by Atlassian Jira
(v7.13.5#713005)
6 years, 10 months
[JBoss JIRA] (DROOLS-4532) Executable model compilation fails with java.lang.RuntimeException: Unknown expression type: -1
by Martin Weiler (Jira)
Martin Weiler created DROOLS-4532:
-------------------------------------
Summary: Executable model compilation fails with java.lang.RuntimeException: Unknown expression type: -1
Key: DROOLS-4532
URL: https://issues.jboss.org/browse/DROOLS-4532
Project: Drools
Issue Type: Bug
Components: core engine, executable model
Affects Versions: 7.26.0.Final
Reporter: Martin Weiler
Assignee: Mario Fusco
A rule containing a function call with a negative argument:
{noformat}
eval( functions.add($age, -1).compareTo(10) < 0)
{noformat}
fails to compile when using the executable model:
{noformat}
java.lang.RuntimeException: Unknown expression type: -1
at org.drools.modelcompiler.builder.generator.DrlxParseUtil.getExpressionType(DrlxParseUtil.java:245)
at org.drools.modelcompiler.builder.generator.expressiontyper.ExpressionTyper.processFirstNode(ExpressionTyper.java:562)
at org.drools.modelcompiler.builder.generator.expressiontyper.ExpressionTyper.toTypedExpressionFromMethodCallOrField(ExpressionTyper.java:380)
at org.drools.modelcompiler.builder.generator.expressiontyper.ExpressionTyper.parseNodeArguments(ExpressionTyper.java:679)
at org.drools.modelcompiler.builder.generator.expressiontyper.ExpressionTyper.parseMethodCallExpr(ExpressionTyper.java:647)
at org.drools.modelcompiler.builder.generator.expressiontyper.ExpressionTyper.methodCallExpr(ExpressionTyper.java:635)
at org.drools.modelcompiler.builder.generator.expressiontyper.ExpressionTyper.toTypedExpressionFromMethodCallOrField(ExpressionTyper.java:416)
at org.drools.modelcompiler.builder.generator.expressiontyper.ExpressionTyper.toTypedExpressionRec(ExpressionTyper.java:191)
at org.drools.modelcompiler.builder.generator.expressiontyper.ExpressionTyper.toTypedExpression(ExpressionTyper.java:121)
at org.drools.modelcompiler.builder.generator.drlxparse.ConstraintParser.parseBinaryExpr(ConstraintParser.java:269)
at org.drools.modelcompiler.builder.generator.drlxparse.ConstraintParser.getDrlxParseResult(ConstraintParser.java:89)
at org.drools.modelcompiler.builder.generator.drlxparse.ConstraintParser.drlxParse(ConstraintParser.java:56)
at org.drools.modelcompiler.builder.generator.drlxparse.ConstraintParser.drlxParse(ConstraintParser.java:51)
at org.drools.modelcompiler.builder.generator.drlxparse.ConstraintParser.drlxParse(ConstraintParser.java:47)
at org.drools.modelcompiler.builder.generator.visitor.EvalVisitor.visit(EvalVisitor.java:25)
at org.drools.modelcompiler.builder.generator.visitor.ModelGeneratorVisitor.visit(ModelGeneratorVisitor.java:94)
at org.drools.compiler.lang.descr.EvalDescr.accept(EvalDescr.java:97)
at org.drools.modelcompiler.builder.generator.visitor.AndVisitor.visit(AndVisitor.java:29)
at org.drools.modelcompiler.builder.generator.visitor.ModelGeneratorVisitor.visit(ModelGeneratorVisitor.java:69)
at org.drools.modelcompiler.builder.generator.ModelGenerator.processRule(ModelGenerator.java:173)
at org.drools.modelcompiler.builder.generator.ModelGenerator.generateModel(ModelGenerator.java:153)
at org.drools.modelcompiler.builder.ModelBuilderImpl.compileKnowledgePackages(ModelBuilderImpl.java:169)
at org.drools.modelcompiler.builder.ModelBuilderImpl.buildRules(ModelBuilderImpl.java:119)
at org.drools.modelcompiler.builder.ModelBuilderImpl.buildPackages(ModelBuilderImpl.java:69)
at org.drools.compiler.builder.impl.CompositeKnowledgeBuilderImpl.build(CompositeKnowledgeBuilderImpl.java:108)
at org.drools.compiler.builder.impl.CompositeKnowledgeBuilderImpl.build(CompositeKnowledgeBuilderImpl.java:100)
at org.drools.compiler.kie.builder.impl.AbstractKieProject.buildKnowledgePackages(AbstractKieProject.java:261)
at org.drools.compiler.kie.builder.impl.AbstractKieProject.verify(AbstractKieProject.java:75)
at org.drools.compiler.kie.builder.impl.KieBuilderImpl.buildKieProject(KieBuilderImpl.java:271)
at org.drools.compiler.kie.builder.impl.KieBuilderImpl.buildAll(KieBuilderImpl.java:239)
at org.drools.compiler.kie.builder.impl.KieBuilderImpl.buildAll(KieBuilderImpl.java:208)
at org.drools.compiler.kie.builder.impl.KieBuilderImpl.buildAll(KieBuilderImpl.java:196)
at org.drools.modelcompiler.BaseModelTest.createKieBuilder(BaseModelTest.java:144)
at org.drools.modelcompiler.BaseModelTest.createKieBuilder(BaseModelTest.java:125)
at org.drools.modelcompiler.BaseModelTest.getKieContainer(BaseModelTest.java:114)
at org.drools.modelcompiler.BaseModelTest.getKieContainer(BaseModelTest.java:107)
at org.drools.modelcompiler.BaseModelTest.getKieSession(BaseModelTest.java:103)
at org.drools.modelcompiler.BaseModelTest.getKieSession(BaseModelTest.java:99)
at org.drools.modelcompiler.CompilerTest.testEvalExprWithFunctionCall(CompilerTest.java:1997)
{noformat}
--
This message was sent by Atlassian Jira
(v7.13.5#713005)
6 years, 10 months
[JBoss JIRA] (WFLY-12560) Prefer ServerReload methods that use ManagementClient instead of ModelControllerClient
by Brian Stansberry (Jira)
Brian Stansberry created WFLY-12560:
---------------------------------------
Summary: Prefer ServerReload methods that use ManagementClient instead of ModelControllerClient
Key: WFLY-12560
URL: https://issues.jboss.org/browse/WFLY-12560
Project: WildFly
Issue Type: Task
Components: Test Suite
Reporter: Brian Stansberry
Assignee: Brian Stansberry
The ServerReload.executeReloadAndWaitForCompletion variants that take a ManagementClient instead of a ModelControllerClient are more robust because the ManagementClient can specfically provide the host/port to try to reconnect to, while the ModelControllerClient variants have to guess using TestsuiteEnvironment.
This shouldn't matter in most cases but by changing the code to the more robust variant that will encourage it's use in new tests where it might matter.
--
This message was sent by Atlassian Jira
(v7.13.5#713005)
6 years, 10 months
[JBoss JIRA] (WFLY-12464) Remove the legacy security subsystem from the config used by testsuite/integration/elytron
by Brian Stansberry (Jira)
[ https://issues.jboss.org/browse/WFLY-12464?page=com.atlassian.jira.plugin... ]
Brian Stansberry updated WFLY-12464:
------------------------------------
Fix Version/s: (was: 18.0.0.Final)
> Remove the legacy security subsystem from the config used by testsuite/integration/elytron
> ------------------------------------------------------------------------------------------
>
> Key: WFLY-12464
> URL: https://issues.jboss.org/browse/WFLY-12464
> Project: WildFly
> Issue Type: Task
> Components: Security, Test Suite
> Reporter: Brian Stansberry
> Assignee: Brian Stansberry
> Priority: Major
>
> The CLI script that sets up the config used in testsuite/integration/elytron leaves an empty shell legacy security subsystem around, saying:
> {code}
> # datasources and ejb3 still has dependency on legacy security subsystem, so we can't remove it completely now
> {code}
> But actually removing it, the tests all pass but two. And one of those fails simply because it includes a setup task management up to disable JACC in the legacy subsystem, which would not be necessary if it were not present.
> The other failure I believe is due to a flaw in the Elytron subsystem that will be fixed by WFCORE-4640. Basically in the absence of the legacy subsystem no DUP adds JASPI or JACC dependencies to the deployment module.
--
This message was sent by Atlassian Jira
(v7.13.5#713005)
6 years, 10 months
[JBoss JIRA] (WFLY-12542) NPE when microprofile-metrics subsystem is enabled but microprofile-config is not
by Brian Stansberry (Jira)
[ https://issues.jboss.org/browse/WFLY-12542?page=com.atlassian.jira.plugin... ]
Brian Stansberry reassigned WFLY-12542:
---------------------------------------
Assignee: Brian Stansberry (was: Jeff Mesnil)
> NPE when microprofile-metrics subsystem is enabled but microprofile-config is not
> ---------------------------------------------------------------------------------
>
> Key: WFLY-12542
> URL: https://issues.jboss.org/browse/WFLY-12542
> Project: WildFly
> Issue Type: Bug
> Components: MP Metrics
> Affects Versions: 17.0.1.Final
> Reporter: Richard DiCroce
> Assignee: Brian Stansberry
> Priority: Major
>
> If the microprofile-metrics subsystem is present in the WildFly config but the microprofile-config subsystem is not, WildFly dies due to a NPE:
> {code}
> 2019-09-11 17:49:43,522 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("add") failed - address: ([("subsystem" => "microprofile-metrics-smallrye")]): java.lang.NullPointerException
> at org.wildfly.extension.microprofile.metrics.MicroProfileMetricsSubsystemAdd$2.execute(MicroProfileMetricsSubsystemAdd.java:90)
> at org.jboss.as.controller.AbstractOperationContext.executeStep(AbstractOperationContext.java:999) [wildfly-controller-9.0.2.Final.jar:9.0.2.Final]
> at org.jboss.as.controller.AbstractOperationContext.processStages(AbstractOperationContext.java:743) [wildfly-controller-9.0.2.Final.jar:9.0.2.Final]
> at org.jboss.as.controller.AbstractOperationContext.executeOperation(AbstractOperationContext.java:467) [wildfly-controller-9.0.2.Final.jar:9.0.2.Final]
> at org.jboss.as.controller.OperationContextImpl.executeOperation(OperationContextImpl.java:1412) [wildfly-controller-9.0.2.Final.jar:9.0.2.Final]
> at org.jboss.as.controller.ModelControllerImpl.boot(ModelControllerImpl.java:521) [wildfly-controller-9.0.2.Final.jar:9.0.2.Final]
> at org.jboss.as.controller.AbstractControllerService.boot(AbstractControllerService.java:472) [wildfly-controller-9.0.2.Final.jar:9.0.2.Final]
> at org.jboss.as.controller.AbstractControllerService.boot(AbstractControllerService.java:434) [wildfly-controller-9.0.2.Final.jar:9.0.2.Final]
> at org.jboss.as.server.ServerService.boot(ServerService.java:435) [wildfly-server-9.0.2.Final.jar:9.0.2.Final]
> at org.jboss.as.server.ServerService.boot(ServerService.java:394) [wildfly-server-9.0.2.Final.jar:9.0.2.Final]
> at org.jboss.as.controller.AbstractControllerService$1.run(AbstractControllerService.java:374) [wildfly-controller-9.0.2.Final.jar:9.0.2.Final]
> at java.lang.Thread.run(Thread.java:748) [rt.jar:1.8.0_212]
> {code}
--
This message was sent by Atlassian Jira
(v7.13.5#713005)
6 years, 10 months
[JBoss JIRA] (WFLY-12535) Container does not pass the beanManager when creating eclipselink EntityManagerFactory
by Brian Stansberry (Jira)
[ https://issues.jboss.org/browse/WFLY-12535?page=com.atlassian.jira.plugin... ]
Brian Stansberry reassigned WFLY-12535:
---------------------------------------
Component/s: JPA / Hibernate
Assignee: Scott Marlow (was: Brian Stansberry)
> Container does not pass the beanManager when creating eclipselink EntityManagerFactory
> --------------------------------------------------------------------------------------
>
> Key: WFLY-12535
> URL: https://issues.jboss.org/browse/WFLY-12535
> Project: WildFly
> Issue Type: Bug
> Components: JPA / Hibernate
> Affects Versions: 16.0.0.Final
> Reporter: charles ghislain
> Assignee: Scott Marlow
> Priority: Major
>
> When creating the entity manager factory for eclipseliknk using `javax.persistence.spi.PersistenceProvider#createContainerEntityManagerFactory`, wildfly does not pass the properties required by the jee8 spec, as specified in the javadoc of this method:
> {code}
> If a Bean Validation provider is present in the classpath, the container must pass the ValidatorFactory instance in the map with the key "javax.persistence.validation.factory". If the containing archive is a bean archive, the container must pass the BeanManager instance in the map with the key "javax.persistence.bean.manager"
> {code}
> Debugging the eclipselink implementation of this method, `org.eclipse.persistence.jpa.PersistenceProvider#createContainerEntityManagerFactory`, the properties set by the container contains the following 3 entries:
> {code:java}
> eclipselink.logging.logger -> org.jipijapa.eclipselink.JBossLogger
> eclipselink.archive.factory -> org.jipijapa.eclipselink.JBossArchiveFactoryImpl
> eclipselink.target-server -> org.jipijapa.eclipselink.WildFlyServerPlatform
> {code}
> I think this prevents CDI injection in custom ConstraintValidators, as mentionned on an old eclipselink thread: https://www.eclipse.org/lists/eclipselink-users/msg08503.html.
> I have a `ConstraintValidator` with an `@Inject`ed EJB, but when validation is triggered on the call to `javax.persistence.EntityManager#merge`, the injected field is null.
> The wildfly installation has been updated to include eclipselink as per documentation:
> the org.eclipse.persistence module has been updated to include the eclipselink jar with the following descriptor:
> {code:java}
> <module xmlns="urn:jboss:module:1.1" name="org.eclipse.persistence">
> <resources>
> <!-- jipijapa line is kept from the original module -->
> <resource-root path="eclipselink.jar">
> <filter>
> <exclude path="javax/**" />
> </filter>
> </resource-root>
> </resources>
> <dependencies>
> <module name="asm.asm"/>
> <module name="javax.api"/>
> <module name="javax.annotation.api"/>
> <module name="javax.enterprise.api"/>
> <module name="javax.persistence.api"/>
> <module name="javax.transaction.api"/>
> <module name="javax.validation.api"/>
> <module name="javax.xml.bind.api"/>
> <module name="javax.ws.rs.api"/>
> <module name="org.antlr"/>
> <module name="org.apache.commons.collections"/>
> <module name="org.dom4j"/>
> <module name="org.jboss.as.jpa.spi"/>
> <module name="org.jboss.logging"/>
> <module name="org.jboss.vfs"/>
> </dependencies>
> </module>
> {code}
> The persistence unit provider has been set to `org.eclipse.persistence.jpa.PersistenceProvider` in the persistence.xml file.
--
This message was sent by Atlassian Jira
(v7.13.5#713005)
6 years, 10 months
[JBoss JIRA] (WFLY-10749) Artemis with JDBC store on slow or high latency database crashed on: Critical IO Error. Failed to process JDBC Record statements: java.sql.BatchUpdateException: IO Error: Socket read timed out
by Brian Stansberry (Jira)
[ https://issues.jboss.org/browse/WFLY-10749?page=com.atlassian.jira.plugin... ]
Brian Stansberry reassigned WFLY-10749:
---------------------------------------
Assignee: Emmanuel Hugonnet (was: Martyn Taylor)
> Artemis with JDBC store on slow or high latency database crashed on: Critical IO Error. Failed to process JDBC Record statements: java.sql.BatchUpdateException: IO Error: Socket read timed out
> -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: WFLY-10749
> URL: https://issues.jboss.org/browse/WFLY-10749
> Project: WildFly
> Issue Type: Bug
> Components: JMS
> Affects Versions: 12.0.0.Final, 13.0.0.Final, 14.0.0.Final, 15.0.0.Beta1
> Reporter: Miroslav Novak
> Assignee: Emmanuel Hugonnet
> Priority: Critical
>
> Artemis configured with JDBC store is not robust if database is slow/under high load and when there is higher latency to database. Artemis has tendency to shutdown itself on "Critical IO Error" under really low load. It is visible when EAP QE moved Jenkins to Central CI where is higher latency to used Oracle12cR2 database. In following test scenario:
> * Start 2 WF/EAP server in cluster. There is queue InQueue and OutQueue deployed on both of the servers.
> * Send 10 000 small messages to InQueue to server 1
> * Then deploy MDB on server 2. MDB consumes messages from InQueue and resends to OutQueue
> * Wait until MDB processes all messages and check that 10 000 messages is in OutQueue
> Result:
> Sometimes happens that Artemis in server 1 crashes due to following exception:
> {code}
> 20:13:45,641 WARN [org.apache.activemq.artemis.jdbc.store.journal.JDBCJournalImpl] (Thread-17 (ActiveMQ-server-org.apache.activemq.artemis.core.server.impl.ActiveMQServerImpl$3@4de066d8)) IO Error: Socket read
> timed out: java.sql.BatchUpdateException: IO Error: Socket read timed out
> at oracle.jdbc.driver.OraclePreparedStatement.executeLargeBatch(OraclePreparedStatement.java:10032)
> at oracle.jdbc.driver.T4CPreparedStatement.executeLargeBatch(T4CPreparedStatement.java:1364)
> at oracle.jdbc.driver.OraclePreparedStatement.executeBatch(OraclePreparedStatement.java:9839)
> at oracle.jdbc.driver.OracleStatementWrapper.executeBatch(OracleStatementWrapper.java:234)
> at org.jboss.jca.adapters.jdbc.WrappedStatement.executeBatch(WrappedStatement.java:1180)
> at org.apache.activemq.artemis.jdbc.store.journal.JDBCJournalImpl.sync(JDBCJournalImpl.java:228) [artemis-jdbc-store-1.5.5.jbossorg-012.jar:1.5.5.jbossorg-012]
> at org.apache.activemq.artemis.jdbc.store.journal.JDBCJournalImpl$JDBCJournalSync.run(JDBCJournalImpl.java:991) [artemis-jdbc-store-1.5.5.jbossorg-012.jar:1.5.5.jbossorg-012]
> at org.apache.activemq.artemis.core.server.ActiveMQScheduledComponent$2.run(ActiveMQScheduledComponent.java:284) [artemis-commons-1.5.5.jbossorg-012.jar:1.5.5.jbossorg-012]
> at org.apache.activemq.artemis.utils.OrderedExecutorFactory$OrderedExecutor$ExecutorTask.run(OrderedExecutorFactory.java:122) [artemis-commons-1.5.5.jbossorg-012.jar:1.5.5.jbossorg-012]
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [rt.jar:1.8.0_171]
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [rt.jar:1.8.0_171]
> at java.lang.Thread.run(Thread.java:748) [rt.jar:1.8.0_171]
> 20:13:45,652 WARN [org.apache.activemq.artemis.core.server] (Thread-17 (ActiveMQ-server-org.apache.activemq.artemis.core.server.impl.ActiveMQServerImpl$3@4de066d8)) AMQ222010: Critical IO Error, shutting down the server. file=NULL, message=Critical IO Error. Failed to process JDBC Record statements: java.sql.BatchUpdateException: IO Error: Socket read timed out
> at oracle.jdbc.driver.OraclePreparedStatement.executeLargeBatch(OraclePreparedStatement.java:10032)
> at oracle.jdbc.driver.T4CPreparedStatement.executeLargeBatch(T4CPreparedStatement.java:1364)
> at oracle.jdbc.driver.OraclePreparedStatement.executeBatch(OraclePreparedStatement.java:9839)
> at oracle.jdbc.driver.OracleStatementWrapper.executeBatch(OracleStatementWrapper.java:234)
> at org.jboss.jca.adapters.jdbc.WrappedStatement.executeBatch(WrappedStatement.java:1180)
> at org.apache.activemq.artemis.jdbc.store.journal.JDBCJournalImpl.sync(JDBCJournalImpl.java:228) [artemis-jdbc-store-1.5.5.jbossorg-012.jar:1.5.5.jbossorg-012]
> at org.apache.activemq.artemis.jdbc.store.journal.JDBCJournalImpl$JDBCJournalSync.run(JDBCJournalImpl.java:991) [artemis-jdbc-store-1.5.5.jbossorg-012.jar:1.5.5.jbossorg-012]
> at org.apache.activemq.artemis.core.server.ActiveMQScheduledComponent$2.run(ActiveMQScheduledComponent.java:284) [artemis-commons-1.5.5.jbossorg-012.jar:1.5.5.jbossorg-012]
> at org.apache.activemq.artemis.utils.OrderedExecutorFactory$OrderedExecutor$ExecutorTask.run(OrderedExecutorFactory.java:122) [artemis-commons-1.5.5.jbossorg-012.jar:1.5.5.jbossorg-012]
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [rt.jar:1.8.0_171]
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [rt.jar:1.8.0_171]
> at java.lang.Thread.run(Thread.java:748) [rt.jar:1.8.0_171]
> 20:13:45,655 WARN [org.apache.activemq.artemis.jdbc.store.journal.JDBCJournalImpl] (Thread-17 (ActiveMQ-server-org.apache.activemq.artemis.core.server.impl.ActiveMQServerImpl$3@4de066d8)) java.sql.SQLRecoverableException: Closed Connection
> {code}
> This thing can be very frustrating for customers who would rely on JDBC store in production. We should provide more robust solution and guide how to configure JDBC store to avoid this situation.
> This problem will arise also when moving to OpenShift which runs in cloud environment with unreliable and slow network to database like Amazon AWS, MS Azure or OpenStack.
--
This message was sent by Atlassian Jira
(v7.13.5#713005)
6 years, 10 months