[JBoss JIRA] (DROOLS-2607) ArithmeticException happens in average function with BigDecimal type
by Tibor Zimányi (JIRA)
[ https://issues.jboss.org/browse/DROOLS-2607?page=com.atlassian.jira.plugi... ]
Tibor Zimányi updated DROOLS-2607:
----------------------------------
Story Points: 1
> ArithmeticException happens in average function with BigDecimal type
> --------------------------------------------------------------------
>
> Key: DROOLS-2607
> URL: https://issues.jboss.org/browse/DROOLS-2607
> Project: Drools
> Issue Type: Bug
> Components: core engine
> Affects Versions: 7.5.0.Final
> Environment: RHDM 7.0
> Reporter: Hiroko Miura
> Assignee: Tibor Zimányi
> Labels: support
> Fix For: 7.11.0.Final
>
> Attachments: RHDM700_averageException.zip
>
>
> ArithmeticException [1] could happen in average function for BigDecimal type at the following code
> https://github.com/kiegroup/drools/blob/7.5.x/drools-core/src/main/java/o...
> [1]
> java.lang.RuntimeException: java.lang.ArithmeticException: Non-terminating decimal expansion; no exact representable decimal result.
> at org.drools.core.rule.SingleAccumulate.getResult(SingleAccumulate.java:144)
> at org.drools.core.phreak.PhreakAccumulateNode.evaluateResultConstraints(PhreakAccumulateNode.java:654)
> at org.drools.core.phreak.PhreakAccumulateNode.doNode(PhreakAccumulateNode.java:97)
> at org.drools.core.phreak.RuleNetworkEvaluator.switchOnDoBetaNode(RuleNetworkEvaluator.java:567)
> at org.drools.core.phreak.RuleNetworkEvaluator.evalBetaNode(RuleNetworkEvaluator.java:538)
> at org.drools.core.phreak.RuleNetworkEvaluator.evalNode(RuleNetworkEvaluator.java:373)
> at org.drools.core.phreak.RuleNetworkEvaluator.innerEval(RuleNetworkEvaluator.java:333)
> at org.drools.core.phreak.RuleNetworkEvaluator.outerEval(RuleNetworkEvaluator.java:169)
> at org.drools.core.phreak.RuleNetworkEvaluator.evaluateNetwork(RuleNetworkEvaluator.java:127)
> at org.drools.core.phreak.RuleExecutor.reEvaluateNetwork(RuleExecutor.java:212)
> at org.drools.core.phreak.RuleExecutor.evaluateNetworkAndFire(RuleExecutor.java:87)
> 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:1067)
> at org.drools.core.common.DefaultAgenda.internalFireAllRules(DefaultAgenda.java:1014)
> at org.drools.core.common.DefaultAgenda.fireAllRules(DefaultAgenda.java:1006)
> at org.drools.core.impl.StatefulKnowledgeSessionImpl.internalFireAllRules(StatefulKnowledgeSessionImpl.java:1318)
> at org.drools.core.impl.StatefulKnowledgeSessionImpl.fireAllRules(StatefulKnowledgeSessionImpl.java:1309)
> at org.drools.core.impl.StatefulKnowledgeSessionImpl.fireAllRules(StatefulKnowledgeSessionImpl.java:1293)
> at com.sample.AccumulateExceptionTest.averageBigDecimalExceptionTest(AccumulateExceptionTest.java:43)
> 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.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.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:252)
> at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:141)
> at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:112)
> 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.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189)
> at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165)
> at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85)
> at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:115)
> at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:75)
> Caused by: java.lang.ArithmeticException: Non-terminating decimal expansion; no exact representable decimal result.
> at java.math.BigDecimal.divide(BigDecimal.java:1690)
> at org.drools.core.base.accumulators.BigDecimalAverageAccumulateFunction.getResult(BigDecimalAverageAccumulateFunction.java:98)
> at org.drools.core.base.accumulators.BigDecimalAverageAccumulateFunction.getResult(BigDecimalAverageAccumulateFunction.java:29)
> at org.drools.core.base.accumulators.JavaAccumulatorFunctionExecutor.getResult(JavaAccumulatorFunctionExecutor.java:145)
> at org.drools.core.rule.SingleAccumulate.getResult(SingleAccumulate.java:138)
> ... 48 more
> Please provide a way to specify MathContext for BigDecimal.divide() in order to avoid this exception.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
7 years, 11 months
[JBoss JIRA] (WFWIP-90) [Artemis 2.x upgrade] Undelivered messages in remote jca topology after restart
by Miroslav Novak (JIRA)
[ https://issues.jboss.org/browse/WFWIP-90?page=com.atlassian.jira.plugin.s... ]
Miroslav Novak commented on WFWIP-90:
-------------------------------------
I've found issue in WF master integration which sets jdbc-network-timeout in seconds instead of milliseconds. Thus when it passes value 20 by default then it's considered as 20ms which is very low value. :-) I've created jira: https://issues.jboss.org/browse/WFWIP-116 for [~jmesnil] to fix.
In the mean time I'll reconfigure this value to 20 000 to workaround the issue in integration testsuite and run the reproducer again.
> [Artemis 2.x upgrade] Undelivered messages in remote jca topology after restart
> -------------------------------------------------------------------------------
>
> Key: WFWIP-90
> URL: https://issues.jboss.org/browse/WFWIP-90
> Project: WildFly WIP
> Issue Type: Bug
> Components: Artemis
> Reporter: Miroslav Novak
> Assignee: Martyn Taylor
> Priority: Blocker
>
> There are undelivered messages in scenario with where servers in remote JCA topology are restarted. There are undelivered message after test.
> Test scenario:
> * Start 2 server in Artemis cluster
> * Start 2 servers with MDB connected to Artemis cluster
> ** MDB resends messages from InQueue to OutQueue from/to remote cluster
> * Send messages to InQueue
> * Restart all server (one by one)
> * Consumes messages from OutQueue
> Results:
> After the test there are missing messages in OutQueue.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
7 years, 11 months
[JBoss JIRA] (WFWIP-116) jdbc-network-timeout is set in seconds instead of milliseconds causing Artemis to fail on Critical IO Error when jdbc store is used
by Miroslav Novak (JIRA)
[ https://issues.jboss.org/browse/WFWIP-116?page=com.atlassian.jira.plugin.... ]
Miroslav Novak updated WFWIP-116:
---------------------------------
Description:
jdbc-network-timeout is set in seconds instead of milliseconds in:
https://github.com/wildfly/wildfly/blob/master/messaging-activemq/src/mai...
This line must be removed as before it is:
{code}
long networkTimeout = SECONDS.toMillis(JOURNAL_JDBC_NETWORK_TIMEOUT.resolveModelAttribute(context, model).asInt());
// ARTEMIS-1493: Artemis API is not correct. the value must be in millis but it requires an int instead of a long.
storageConfiguration.setJdbcNetworkTimeout((int)networkTimeout);
{code}
which sets this timeout properly in milliseconds.
was:
jdbc-network-timeout is set in seconds instead of milliseconds in:
https://github.com/wildfly/wildfly/blob/master/messaging-activemq/src/mai...
This line must be removed as before is:
{code}
long networkTimeout = SECONDS.toMillis(JOURNAL_JDBC_NETWORK_TIMEOUT.resolveModelAttribute(context, model).asInt());
// ARTEMIS-1493: Artemis API is not correct. the value must be in millis but it requires an int instead of a long.
storageConfiguration.setJdbcNetworkTimeout((int)networkTimeout);
{code}
which sets this timeout properly in milliseconds.
> jdbc-network-timeout is set in seconds instead of milliseconds causing Artemis to fail on Critical IO Error when jdbc store is used
> -----------------------------------------------------------------------------------------------------------------------------------
>
> Key: WFWIP-116
> URL: https://issues.jboss.org/browse/WFWIP-116
> Project: WildFly WIP
> Issue Type: Bug
> Components: JMS
> Reporter: Miroslav Novak
> Assignee: Jeff Mesnil
> Priority: Blocker
>
> jdbc-network-timeout is set in seconds instead of milliseconds in:
> https://github.com/wildfly/wildfly/blob/master/messaging-activemq/src/mai...
> This line must be removed as before it is:
> {code}
> long networkTimeout = SECONDS.toMillis(JOURNAL_JDBC_NETWORK_TIMEOUT.resolveModelAttribute(context, model).asInt());
> // ARTEMIS-1493: Artemis API is not correct. the value must be in millis but it requires an int instead of a long.
> storageConfiguration.setJdbcNetworkTimeout((int)networkTimeout);
> {code}
> which sets this timeout properly in milliseconds.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
7 years, 11 months
[JBoss JIRA] (WFWIP-90) [Artemis 2.x upgrade] Undelivered messages in remote jca topology after restart
by Miroslav Novak (JIRA)
[ https://issues.jboss.org/browse/WFWIP-90?page=com.atlassian.jira.plugin.s... ]
Miroslav Novak commented on WFWIP-90:
-------------------------------------
[~clebert.suconic] Run with WF master (Artemis 1.5.5.012) failed due to completely different reason. There are critical IO Errors after start of server:
{code}
15:58:32,022 ERROR [org.apache.activemq.artemis.jdbc.store.drivers.AbstractJDBCDriver] (ServerService Thread Pool -- 82)
SQL STATEMENTS:
CREATE TABLE NODE1_LARGE_MESSAGES_TABLE(ID NUMBER(19) GENERATED BY DEFAULT ON NULL AS IDENTITY, FILENAME VARCHAR(255), EXTENSION VARCHAR(10), DATA BLOB, PRIMARY KEY(ID))
SQL EXCEPTIONS:
SQLState: 08006 ErrorCode: 17002 Message: IO Error: Socket read timed out
15:58:32,023 ERROR [org.apache.activemq.artemis.jdbc.store.drivers.AbstractJDBCDriver] (ServerService Thread Pool -- 82)
SQL STATEMENTS:
CREATE TABLE NODE1_LARGE_MESSAGES_TABLE(ID NUMBER(19) GENERATED BY DEFAULT ON NULL AS IDENTITY, FILENAME VARCHAR(255), EXTENSION VARCHAR(10), DATA BLOB, PRIMARY KEY(ID))
SQL EXCEPTIONS:
SQLState: 08003 ErrorCode: 17008 Message: Closed Connection
15:58:32,023 WARN [org.apache.activemq.artemis.core.server] (ServerService Thread Pool -- 82) AMQ222010: Critical IO Error, shutting down the server. file=NULL, message=Unable to start database driver: java.sql.SQLRecoverableException: Closed Connection
at oracle.jdbc.driver.PhysicalConnection.getAutoCommit(PhysicalConnection.java:1828)
at oracle.jdbc.driver.PhysicalConnection.rollback(PhysicalConnection.java:1953)
at org.jboss.jca.adapters.jdbc.BaseWrapperManagedConnection.jdbcRollback(BaseWrapperManagedConnection.java:1106)
at org.jboss.jca.adapters.jdbc.WrappedConnection.rollback(WrappedConnection.java:868)
at org.apache.activemq.artemis.jdbc.store.drivers.AbstractJDBCDriver.createTableIfNotExists(AbstractJDBCDriver.java:257) [artemis-jdbc-store-1.5.5.jbossorg-012.jar:1.5.5.jbossorg-012]
at org.apache.activemq.artemis.jdbc.store.drivers.AbstractJDBCDriver.createTable(AbstractJDBCDriver.java:113) [artemis-jdbc-store-1.5.5.jbossorg-012.jar:1.5.5.jbossorg-012]
at org.apache.activemq.artemis.jdbc.store.file.JDBCSequentialFileFactoryDriver.createSchema(JDBCSequentialFileFactoryDriver.java:69) [artemis-jdbc-store-1.5.5.jbossorg-012.jar:1.5.5.jbossorg-012]
at org.apache.activemq.artemis.jdbc.store.drivers.AbstractJDBCDriver.start(AbstractJDBCDriver.java:82) [artemis-jdbc-store-1.5.5.jbossorg-012.jar:1.5.5.jbossorg-012]
at org.apache.activemq.artemis.jdbc.store.file.JDBCSequentialFileFactory.start(JDBCSequentialFileFactory.java:127) [artemis-jdbc-store-1.5.5.jbossorg-012.jar:1.5.5.jbossorg-012]
at org.apache.activemq.artemis.core.persistence.impl.journal.JDBCJournalStorageManager.init(JDBCJournalStorageManager.java:89) [artemis-server-1.5.5.jbossorg-012.jar:1.5.5.jbossorg-012]
at org.apache.activemq.artemis.core.persistence.impl.journal.AbstractJournalStorageManager.<init>(AbstractJournalStorageManager.java:216) [artemis-server-1.5.5.jbossorg-012.jar:1.5.5.jbossorg-012]
at org.apache.activemq.artemis.core.persistence.impl.journal.JournalStorageManager.<init>(JournalStorageManager.java:104) [artemis-server-1.5.5.jbossorg-012.jar:1.5.5.jbossorg-012]
at org.apache.activemq.artemis.core.persistence.impl.journal.JDBCJournalStorageManager.<init>(JDBCJournalStorageManager.java:52) [artemis-server-1.5.5.jbossorg-012.jar:1.5.5.jbossorg-012]
at org.apache.activemq.artemis.core.server.impl.ActiveMQServerImpl.createStorageManager(ActiveMQServerImpl.java:1886) [artemis-server-1.5.5.jbossorg-012.jar:1.5.5.jbossorg-012]
at org.apache.activemq.artemis.core.server.impl.ActiveMQServerImpl.initialisePart1(ActiveMQServerImpl.java:2023) [artemis-server-1.5.5.jbossorg-012.jar:1.5.5.jbossorg-012]
at org.apache.activemq.artemis.core.server.impl.LiveOnlyActivation.run(LiveOnlyActivation.java:62) [artemis-server-1.5.5.jbossorg-012.jar:1.5.5.jbossorg-012]
at org.apache.activemq.artemis.core.server.impl.ActiveMQServerImpl.internalStart(ActiveMQServerImpl.java:539) [artemis-server-1.5.5.jbossorg-012.jar:1.5.5.jbossorg-012]
{code}
It smells by config error. I'll take a look.
> [Artemis 2.x upgrade] Undelivered messages in remote jca topology after restart
> -------------------------------------------------------------------------------
>
> Key: WFWIP-90
> URL: https://issues.jboss.org/browse/WFWIP-90
> Project: WildFly WIP
> Issue Type: Bug
> Components: Artemis
> Reporter: Miroslav Novak
> Assignee: Martyn Taylor
> Priority: Blocker
>
> There are undelivered messages in scenario with where servers in remote JCA topology are restarted. There are undelivered message after test.
> Test scenario:
> * Start 2 server in Artemis cluster
> * Start 2 servers with MDB connected to Artemis cluster
> ** MDB resends messages from InQueue to OutQueue from/to remote cluster
> * Send messages to InQueue
> * Restart all server (one by one)
> * Consumes messages from OutQueue
> Results:
> After the test there are missing messages in OutQueue.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
7 years, 11 months
[JBoss JIRA] (WFWIP-65) [Artemis 2.x upgrade] Artemis RA connections disconnected after failover
by Miroslav Novak (JIRA)
[ https://issues.jboss.org/browse/WFWIP-65?page=com.atlassian.jira.plugin.s... ]
Miroslav Novak commented on WFWIP-65:
-------------------------------------
For sure I'll start another job with ColocatedClusterFailoverTestCase#testFailoverClientAckQueue against Artemis master:
https://eap-qe-jenkins.rhev-ci-vms.eng.rdu2.redhat.com/job/eap-7.x-messag...
> [Artemis 2.x upgrade] Artemis RA connections disconnected after failover
> -------------------------------------------------------------------------
>
> Key: WFWIP-65
> URL: https://issues.jboss.org/browse/WFWIP-65
> Project: WildFly WIP
> Issue Type: Bug
> Components: Artemis
> Reporter: Miroslav Novak
> Assignee: Clebert Suconic
> Priority: Blocker
> Labels: feature-branch-blocker
> Attachments: DedicatedFailoverTestCaseWithMdb.testShutdownWithFailback.zip
>
>
> There is regression againt Artemis 1.5.5.0012 in scenario with failover of Artemis RA from live to backup (shared store, dedicated topology). After backup activates after failover, connections of RA does not failover to backup (or are disconnected from backup just after failover)
> Test scenario:
> * There are three servers. Live server (Node 1) and backupserver (Node 2) are in dedicated HA topology.
> * InQueue and OutQueue are deployed on live and backup. Send messages to InQueue on live server.
> * When all messages are sent, deploy message driven bean on Node 3.
> * MDB sends messages form InQueue to OutQueue.
> * Shutdown live server. Wait for backup server to alive, then start live server again and stop backup.
> * Receive messages from OutQueue from live server.
> Results:
> After live server is stopped and backup activates, no messages are processed by MDB. Looking at trace logs it seems that MDB does reconnect to backup but it's then disconnected. Then I don't see connector to backup server between tried connectors during reconnection.
> Attaching reproduce and logs.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
7 years, 11 months