[JBoss JIRA] (WFCORE-1330) Deployment error after reboot [WFLYSRV0137]
by ehsavoie Hugonnet (JIRA)
[ https://issues.jboss.org/browse/WFCORE-1330?page=com.atlassian.jira.plugi... ]
ehsavoie Hugonnet commented on WFCORE-1330:
-------------------------------------------
Sorry I meant the logs when you are deploying the applications and before rebooting.
Could you attach the files instead of copying the content in the text area please ?
> Deployment error after reboot [WFLYSRV0137]
> -------------------------------------------
>
> Key: WFCORE-1330
> URL: https://issues.jboss.org/browse/WFCORE-1330
> Project: WildFly Core
> Issue Type: Bug
> Components: Domain Management
> Affects Versions: 1.0.2.Final
> Environment: Ubuntu 14.04 LTS 64bit, jre-1.8.0_65
> Several deployed (JavaEE) web applications including non XA datasources that connect to a MySQL instance.
> Reporter: Tobi Tobias
> Assignee: ehsavoie Hugonnet
> Priority: Critical
>
> I have a working configuration on wildfly 9.0.2 final with several web applications (JavaEE).
> After a couple of days, I deployed another war file via jboss CLI. This application worked correctly and no deployment error occurred.
> But if I restart the server now, I get following error message:
> 10:36:01,893 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("add") failed - address: ([("deployment" => "MM-Controller-0.1.0-SNAPSHOT.war")]) - failure description: "WFLYSRV0137: No deployment content with hash 966847a6f5f5bf8c3470f07ea9e65b7bbcdcd7b7 is available in the deployment content repository for deployment 'MM-Controller-0.1.0-SNAPSHOT.war'. This is a fatal boot error. To correct the problem, either restart with the --admin-only switch set and use the CLI to install the missing content or remove it from the configuration, or remove the deployment from the xml configuration file and restart."
> 10:36:01,990 FATAL [org.jboss.as.server] (Controller Boot Thread) WFLYSRV0056: Server boot has failed in an unrecoverable manner; exiting. See previous messages for details.
> I reproduced this at least 30 times - even with different jars. I always get this error. The server works fine as long as I don't reboot.
> The only way to fix the configuration is to manually remove the deployments from the standalone.xml.
> But this is not an option for me as I want to have the wildfly running as production server where I have several automatic deployments every day.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
10 years, 3 months
[JBoss JIRA] (WFCORE-1330) Deployment error after reboot [WFLYSRV0137]
by ehsavoie Hugonnet (JIRA)
[ https://issues.jboss.org/browse/WFCORE-1330?page=com.atlassian.jira.plugi... ]
ehsavoie Hugonnet edited comment on WFCORE-1330 at 1/26/16 4:14 AM:
--------------------------------------------------------------------
Sorry I meant the logs when you are deploying the applications and before rebooting.
Could you attach the files instead of copying the content in the text area please ?
How is the driver installed ?
was (Author: ehugonnet):
Sorry I meant the logs when you are deploying the applications and before rebooting.
Could you attach the files instead of copying the content in the text area please ?
> Deployment error after reboot [WFLYSRV0137]
> -------------------------------------------
>
> Key: WFCORE-1330
> URL: https://issues.jboss.org/browse/WFCORE-1330
> Project: WildFly Core
> Issue Type: Bug
> Components: Domain Management
> Affects Versions: 1.0.2.Final
> Environment: Ubuntu 14.04 LTS 64bit, jre-1.8.0_65
> Several deployed (JavaEE) web applications including non XA datasources that connect to a MySQL instance.
> Reporter: Tobi Tobias
> Assignee: ehsavoie Hugonnet
> Priority: Critical
>
> I have a working configuration on wildfly 9.0.2 final with several web applications (JavaEE).
> After a couple of days, I deployed another war file via jboss CLI. This application worked correctly and no deployment error occurred.
> But if I restart the server now, I get following error message:
> 10:36:01,893 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("add") failed - address: ([("deployment" => "MM-Controller-0.1.0-SNAPSHOT.war")]) - failure description: "WFLYSRV0137: No deployment content with hash 966847a6f5f5bf8c3470f07ea9e65b7bbcdcd7b7 is available in the deployment content repository for deployment 'MM-Controller-0.1.0-SNAPSHOT.war'. This is a fatal boot error. To correct the problem, either restart with the --admin-only switch set and use the CLI to install the missing content or remove it from the configuration, or remove the deployment from the xml configuration file and restart."
> 10:36:01,990 FATAL [org.jboss.as.server] (Controller Boot Thread) WFLYSRV0056: Server boot has failed in an unrecoverable manner; exiting. See previous messages for details.
> I reproduced this at least 30 times - even with different jars. I always get this error. The server works fine as long as I don't reboot.
> The only way to fix the configuration is to manually remove the deployments from the standalone.xml.
> But this is not an option for me as I want to have the wildfly running as production server where I have several automatic deployments every day.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
10 years, 3 months
[JBoss JIRA] (WFLY-5480) SPEC JMS 2007 benchmark fails with AMQ214013: Failed to decode packet
by Jeff Mesnil (JIRA)
[ https://issues.jboss.org/browse/WFLY-5480?page=com.atlassian.jira.plugin.... ]
Jeff Mesnil resolved WFLY-5480.
-------------------------------
Resolution: Done
Upstream issue ARTMEMIS-357 is integrated in Artemis 1.1.0.wildfly-011
> SPEC JMS 2007 benchmark fails with AMQ214013: Failed to decode packet
> ---------------------------------------------------------------------
>
> Key: WFLY-5480
> URL: https://issues.jboss.org/browse/WFLY-5480
> Project: WildFly
> Issue Type: Bug
> Components: JMS
> Reporter: Ondřej Kalman
> Assignee: Jeff Mesnil
> Priority: Blocker
> Fix For: 10.0.0.Final
>
>
> But I have another problem, when I removed trace logs from config I'm not able to run benchmark on localhost to the end, because clients starts getting :
> AMQ214013: Failed to decode packet
> java.lang.IndexOutOfBoundsException: readerIndex: 2130706436 (expected: 0 <= readerIndex <= writerIndex(2943))
> at io.netty.buffer.AbstractByteBuf.readerIndex(AbstractByteBuf.java:73)
> at io.netty.buffer.WrappedByteBuf.readerIndex(WrappedByteBuf.java:99)
> at org.apache.activemq.artemis.core.buffers.impl.ChannelBufferWrapper.readerIndex(ChannelBufferWrapper.java:405)
> at org.apache.activemq.artemis.core.message.impl.MessageImpl.decode(MessageImpl.java:1052)
> at org.apache.activemq.artemis.core.message.impl.MessageImpl.decodeFromBuffer(MessageImpl.java:459)
> at org.apache.activemq.artemis.core.protocol.core.impl.wireformat.SessionReceiveMessage.decode(SessionReceiveMessage.java:94)
> at org.apache.activemq.artemis.core.protocol.ClientPacketDecoder.decode(ClientPacketDecoder.java:42)
> at org.apache.activemq.artemis.core.protocol.core.impl.RemotingConnectionImpl.bufferReceived(RemotingConnectionImpl.java:371)
> at org.apache.activemq.artemis.core.client.impl.ClientSessionFactoryImpl$DelegatingBufferHandler.bufferReceived(ClientSessionFactoryImpl.java:1374)
> at org.apache.activemq.artemis.core.remoting.impl.netty.ActiveMQChannelHandler.channelRead(ActiveMQChannelHandler.java:73)
> at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:339)
> at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:324)
> at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:242)
> at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:339)
> at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:324)
> at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:847)
> at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteCha
> nnel.java:131)
> at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:511)
> at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:468)
> at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:382)
> at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:354)
> at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:111)
> at java.lang.Thread.run(Thread.java:745)
> and
> Thread-9 (ActiveMQ-client-global-threads-1266561810): Uncaught exception.
> java.lang.NumberFormatException: null
> at java.lang.Integer.parseInt(Integer.java:542)
> at java.lang.Integer.valueOf(Integer.java:766)
> at org.apache.activemq.artemis.utils.TypedProperties.getIntProperty(TypedProperties.java:280)
> at org.apache.activemq.artemis.core.message.impl.MessageImpl.getIntProperty(MessageImpl.java:811)
> at org.apache.activemq.artemis.jms.client.ActiveMQMessage.getIntProperty(ActiveMQMessage.java:578)
> at org.spec.jms.agents.SPECWorkerThread.receivedMessage(SPECWorkerThread.java:849)
> at org.spec.jms.agents.SPECWorkerThread.onMessage(SPECWorkerThread.java:820)
> at org.apache.activemq.artemis.jms.client.JMSMessageListenerWrapper.onMessage(JMSMessageListenerWrapper.java:100)
> at org.apache.activemq.artemis.core.client.impl.ClientConsumerImpl.callOnMessage(ClientConsumerImpl.java:1089)
> at org.apache.activemq.artemis.core.client.impl.ClientConsumerImpl.access$400(ClientConsumerImpl.java:47)
> at org.apache.activemq.artemis.core.client.impl.ClientConsumerImpl$Runner.run(ClientConsumerImpl.java:1224)
> at org.apache.activemq.artemis.utils.OrderedExecutorFactory$OrderedExecutor$1.run(OrderedExecutorFactory.java:105)
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
> at java.lang.Thread.run(Thread.java:745)
> Thread-3 (ActiveMQ-client-global-threads-1266561810): Uncaught exception.
> javax.jms.IllegalStateException: AMQ119027: Could not find reference on consumer ID=0, messageId = 104,833 queue = 127\.0\.0\.1_VM1_SPAgent7_0.SP_CallForOffersEH_7_EHID_1PF0
> at org.apache.activemq.artemis.core.protocol.core.impl.ChannelImpl.sendBlocking(ChannelImpl.java:410)
> at org.apache.activemq.artemis.core.protocol.core.impl.ActiveMQSessionContext.sendACK(ActiveMQSessionContext.java:461)
> at org.apache.activemq.artemis.core.client.impl.ClientSessionImpl.acknowledge(ClientSessionImpl.java:765)
> at org.apache.activemq.artemis.core.client.impl.ClientConsumerImpl.doAck(ClientConsumerImpl.java:1212)
> at org.apache.activemq.artemis.core.client.impl.ClientConsumerImpl.flushAcks(ClientConsumerImpl.java:830)
> at org.apache.activemq.artemis.core.client.impl.ClientSessionImpl.flushAcks(ClientSessionImpl.java:1852)
> at org.apache.activemq.artemis.core.client.impl.ClientSessionImpl.commit(ClientSessionImpl.java:501)
> at org.apache.activemq.artemis.core.client.impl.DelegatingSession.commit(DelegatingSession.java:159)
> at org.apache.activemq.artemis.jms.client.ActiveMQSession.commit(ActiveMQSession.java:218)
> at org.spec.jms.eventhandler.sp.SP_CallForOffersEH.handleMessage(SP_CallForOffersEH.java:306)
> at org.spec.jms.agents.SPECWorkerThread.onMessage(SPECWorkerThread.java:821)
> at org.apache.activemq.artemis.jms.client.JMSMessageListenerWrapper.onMessage(JMSMessageListenerWrapper.java:100)
> at org.apache.activemq.artemis.core.client.impl.ClientConsumerImpl.callOnMessage(ClientConsumerImpl.java:1089)
> at org.apache.activemq.artemis.core.client.impl.ClientConsumerImpl.access$400(ClientConsumerImpl.java:47)
> at org.apache.activemq.artemis.core.client.impl.ClientConsumerImpl$Runner.run(ClientConsumerImpl.java:1224)
> at org.apache.activemq.artemis.utils.OrderedExecutorFactory$OrderedExecutor$1.run(OrderedExecutorFactory.java:105)
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
> at java.util.concurrent.ThreadPoolExecut
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
10 years, 3 months
[JBoss JIRA] (WFCORE-1330) Deployment error after reboot [WFLYSRV0137]
by Tobi Tobias (JIRA)
[ https://issues.jboss.org/browse/WFCORE-1330?page=com.atlassian.jira.plugi... ]
Tobi Tobias edited comment on WFCORE-1330 at 1/26/16 3:16 AM:
--------------------------------------------------------------
I deploy the apps and datasources using jboss api at the moment. But the problem occurs with manula deployment as well. Strange thing is, that this doesn't happen on my local machine. It is reproducable on the remote Ubuntu server only.
Code to add a datasource:
{{
ModelNode request = new ModelNode();
request.get(ClientConstants.OP).set(ClientConstants.ADD);
request.get(ClientConstants.OP_ADDR).add(ClientConstants.SUBSYSTEM, WildflyConstants.SUBSYSTEM_DATASOURCES);
request.get(ClientConstants.OP_ADDR).add(WildflyConstants.DATASOURCE, datasourceName);
request.get("jndi-name").set(WebServerUtils.jndiName(datasourceName));
request.get("connection-url").set(dbUrl);
request.get("driver-class").set(driverOpt.get().get(WildflyConstants.DRIVER_CLASS_NAME).asString());
request.get(WildflyConstants.DRIVER_NAME).set(driverOpt.get().get(WildflyConstants.DRIVER_NAME));
request.get("pool-name").set("pool_NewDatasource");
request.get("user-name").set(dbuser);
request.get("password").set("myPW");
return execute().apply(conn).apply(request);
}}
The deployment of the war looks as follows:
{{
// cli equivalent: /deployment=My_war_file.war:add(enabled=true,content=[url=file:///path/to/target/My_war_file.war])"
ModelNode request = new ModelNode();
request.get(ClientConstants.OP).set(ClientConstants.ADD);
request.get(ClientConstants.OP_ADDR).add(ClientConstants.DEPLOYMENT, deploymentName);
request.get(WildflyConstants.ENABLED).set(true);
request.get(ClientConstants.CONTENT).add(WildflyConstants.URL, file.toUri().toString());
return execute().apply(conn).apply(request);
}}
- All applications ever deployed to the server fail when restarting
- Each application depends on a datasource
The server startup log:
prod@aserver:/opt/wildfly-9.0.2.Final/bin$ ./standalone.sh
=========================================================================
JBoss Bootstrap Environment
JBOSS_HOME: /opt/wildfly-9.0.2.Final
JAVA: /usr/lib/jvm/jre1.8.0_65/bin/java
JAVA_OPTS: -server -XX:+UseCompressedOops -server -XX:+UseCompressedOops -Xms64m -Xmx512m -XX:MaxPermSize=256m -Djava.net.preferIPv4Stack=true -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true
=========================================================================
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0
10:35:48,485 INFO [org.jboss.modules] (main) JBoss Modules version 1.4.3.Final
10:35:50,605 INFO [org.jboss.msc] (main) JBoss MSC version 1.2.6.Final
10:35:51,234 INFO [org.jboss.as] (MSC service thread 1-8) WFLYSRV0049: WildFly Full 9.0.2.Final (WildFly Core 1.0.2.Final) starting
10:36:01,572 INFO [org.jboss.as.controller.management-deprecated] (ServerService Thread Pool -- 18) WFLYCTL0028: Attribute 'job-repository-type' in the resource at address '/subsystem=batch' is deprecated, and may be removed in future version. See the attribute description in the output of the read-resource-description operation to learn more about the deprecation.
10:36:01,573 INFO [org.jboss.as.controller.management-deprecated] (ServerService Thread Pool -- 8) WFLYCTL0028: Attribute 'enabled' in the resource at address '/subsystem=datasources/data-source=ExampleDS' is deprecated, and may be removed in future version. See the attribute description in the output of the read-resource-description operation to learn more about the deprecation.
10:36:01,800 INFO [org.jboss.as.controller.management-deprecated] (ServerService Thread Pool -- 8) WFLYCTL0028: Attribute 'enabled' in the resource at address '/subsystem=datasources/data-source=mmcontrollerdatasource' is deprecated, and may be removed in future version. See the attribute description in the output of the read-resource-description operation to learn more about the deprecation.
10:36:01,801 INFO [org.jboss.as.controller.management-deprecated] (ServerService Thread Pool -- 8) WFLYCTL0028: Attribute 'enabled' in the resource at address '/subsystem=datasources/data-source=tobidatasource' is deprecated, and may be removed in future version. See the attribute description in the output of the read-resource-description operation to learn more about the deprecation.
10:36:01,893 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("add") failed - address: ([("deployment" => "MM-Controller-0.1.0-SNAPSHOT.war")]) - failure description: "WFLYSRV0137: No deployment content with hash 966847a6f5f5bf8c3470f07ea9e65b7bbcdcd7b7 is available in the deployment content repository for deployment 'MM-Controller-0.1.0-SNAPSHOT.war'. This is a fatal boot error. To correct the problem, either restart with the --admin-only switch set and use the CLI to install the missing content or remove it from the configuration, or remove the deployment from the xml configuration file and restart."
10:36:01,990 FATAL [org.jboss.as.server] (Controller Boot Thread) WFLYSRV0056: Server boot has failed in an unrecoverable manner; exiting. See previous messages for details.
10:36:02,071 INFO [org.jboss.as.server] (Thread-2) WFLYSRV0220: Server shutdown has been requested.
10:36:02,256 INFO [org.jboss.as] (MSC service thread 1-6) WFLYSRV0050: WildFly Full 9.0.2.Final (WildFly Core 1.0.2.Final) stopped in 11ms
I'll try to reproduce with 10.0.0.CR5 and let you know.
Thanks for your help!
was (Author: wildflyer):
I deploy the apps using jboss-cli.sh. I copy the war file to the target machine, connect with the cli and use "deploy" command. The same with the data source.
For the datasource I use the jboss api:
{{
ModelNode request = new ModelNode();
request.get(ClientConstants.OP).set(ClientConstants.ADD);
request.get(ClientConstants.OP_ADDR).add(ClientConstants.SUBSYSTEM, WildflyConstants.SUBSYSTEM_DATASOURCES);
request.get(ClientConstants.OP_ADDR).add(WildflyConstants.DATASOURCE, datasourceName);
request.get("jndi-name").set(WebServerUtils.jndiName(datasourceName));
request.get("connection-url").set(dbUrl);
request.get("driver-class").set(driverOpt.get().get(WildflyConstants.DRIVER_CLASS_NAME).asString());
request.get(WildflyConstants.DRIVER_NAME).set(driverOpt.get().get(WildflyConstants.DRIVER_NAME));
request.get("pool-name").set("pool_NewDatasource");
request.get("user-name").set(dbuser);
request.get("password").set("myPW");
return execute().apply(conn).apply(request);
}}
The deployment of the war looks as follows:
{{
// cli equivalent: /deployment=My_war_file.war:add(enabled=true,content=[url=file:///path/to/target/My_war_file.war])"
ModelNode request = new ModelNode();
request.get(ClientConstants.OP).set(ClientConstants.ADD);
request.get(ClientConstants.OP_ADDR).add(ClientConstants.DEPLOYMENT, deploymentName);
request.get(WildflyConstants.ENABLED).set(true);
request.get(ClientConstants.CONTENT).add(WildflyConstants.URL, file.toUri().toString());
return execute().apply(conn).apply(request);
}}
- All applications ever deployed to the server fail when restarting
- Each application depends on a datasource
The server startup log:
prod@aserver:/opt/wildfly-9.0.2.Final/bin$ ./standalone.sh
=========================================================================
JBoss Bootstrap Environment
JBOSS_HOME: /opt/wildfly-9.0.2.Final
JAVA: /usr/lib/jvm/jre1.8.0_65/bin/java
JAVA_OPTS: -server -XX:+UseCompressedOops -server -XX:+UseCompressedOops -Xms64m -Xmx512m -XX:MaxPermSize=256m -Djava.net.preferIPv4Stack=true -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true
=========================================================================
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0
10:35:48,485 INFO [org.jboss.modules] (main) JBoss Modules version 1.4.3.Final
10:35:50,605 INFO [org.jboss.msc] (main) JBoss MSC version 1.2.6.Final
10:35:51,234 INFO [org.jboss.as] (MSC service thread 1-8) WFLYSRV0049: WildFly Full 9.0.2.Final (WildFly Core 1.0.2.Final) starting
10:36:01,572 INFO [org.jboss.as.controller.management-deprecated] (ServerService Thread Pool -- 18) WFLYCTL0028: Attribute 'job-repository-type' in the resource at address '/subsystem=batch' is deprecated, and may be removed in future version. See the attribute description in the output of the read-resource-description operation to learn more about the deprecation.
10:36:01,573 INFO [org.jboss.as.controller.management-deprecated] (ServerService Thread Pool -- 8) WFLYCTL0028: Attribute 'enabled' in the resource at address '/subsystem=datasources/data-source=ExampleDS' is deprecated, and may be removed in future version. See the attribute description in the output of the read-resource-description operation to learn more about the deprecation.
10:36:01,800 INFO [org.jboss.as.controller.management-deprecated] (ServerService Thread Pool -- 8) WFLYCTL0028: Attribute 'enabled' in the resource at address '/subsystem=datasources/data-source=mmcontrollerdatasource' is deprecated, and may be removed in future version. See the attribute description in the output of the read-resource-description operation to learn more about the deprecation.
10:36:01,801 INFO [org.jboss.as.controller.management-deprecated] (ServerService Thread Pool -- 8) WFLYCTL0028: Attribute 'enabled' in the resource at address '/subsystem=datasources/data-source=tobidatasource' is deprecated, and may be removed in future version. See the attribute description in the output of the read-resource-description operation to learn more about the deprecation.
10:36:01,893 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("add") failed - address: ([("deployment" => "MM-Controller-0.1.0-SNAPSHOT.war")]) - failure description: "WFLYSRV0137: No deployment content with hash 966847a6f5f5bf8c3470f07ea9e65b7bbcdcd7b7 is available in the deployment content repository for deployment 'MM-Controller-0.1.0-SNAPSHOT.war'. This is a fatal boot error. To correct the problem, either restart with the --admin-only switch set and use the CLI to install the missing content or remove it from the configuration, or remove the deployment from the xml configuration file and restart."
10:36:01,990 FATAL [org.jboss.as.server] (Controller Boot Thread) WFLYSRV0056: Server boot has failed in an unrecoverable manner; exiting. See previous messages for details.
10:36:02,071 INFO [org.jboss.as.server] (Thread-2) WFLYSRV0220: Server shutdown has been requested.
10:36:02,256 INFO [org.jboss.as] (MSC service thread 1-6) WFLYSRV0050: WildFly Full 9.0.2.Final (WildFly Core 1.0.2.Final) stopped in 11ms
I'll try to reproduce with 10.0.0.CR5 and let you know.
Thanks for your help!
> Deployment error after reboot [WFLYSRV0137]
> -------------------------------------------
>
> Key: WFCORE-1330
> URL: https://issues.jboss.org/browse/WFCORE-1330
> Project: WildFly Core
> Issue Type: Bug
> Components: Domain Management
> Affects Versions: 1.0.2.Final
> Environment: Ubuntu 14.04 LTS 64bit, jre-1.8.0_65
> Several deployed (JavaEE) web applications including non XA datasources that connect to a MySQL instance.
> Reporter: Tobi Tobias
> Assignee: ehsavoie Hugonnet
> Priority: Critical
>
> I have a working configuration on wildfly 9.0.2 final with several web applications (JavaEE).
> After a couple of days, I deployed another war file via jboss CLI. This application worked correctly and no deployment error occurred.
> But if I restart the server now, I get following error message:
> 10:36:01,893 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("add") failed - address: ([("deployment" => "MM-Controller-0.1.0-SNAPSHOT.war")]) - failure description: "WFLYSRV0137: No deployment content with hash 966847a6f5f5bf8c3470f07ea9e65b7bbcdcd7b7 is available in the deployment content repository for deployment 'MM-Controller-0.1.0-SNAPSHOT.war'. This is a fatal boot error. To correct the problem, either restart with the --admin-only switch set and use the CLI to install the missing content or remove it from the configuration, or remove the deployment from the xml configuration file and restart."
> 10:36:01,990 FATAL [org.jboss.as.server] (Controller Boot Thread) WFLYSRV0056: Server boot has failed in an unrecoverable manner; exiting. See previous messages for details.
> I reproduced this at least 30 times - even with different jars. I always get this error. The server works fine as long as I don't reboot.
> The only way to fix the configuration is to manually remove the deployments from the standalone.xml.
> But this is not an option for me as I want to have the wildfly running as production server where I have several automatic deployments every day.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
10 years, 3 months
[JBoss JIRA] (WFCORE-1330) Deployment error after reboot [WFLYSRV0137]
by Tobi Tobias (JIRA)
[ https://issues.jboss.org/browse/WFCORE-1330?page=com.atlassian.jira.plugi... ]
Tobi Tobias commented on WFCORE-1330:
-------------------------------------
I deploy the apps using jboss-cli.sh. I copy the war file to the target machine, connect with the cli and use "deploy" command. The same with the data source.
For the datasource I use the jboss api:
{{
ModelNode request = new ModelNode();
request.get(ClientConstants.OP).set(ClientConstants.ADD);
request.get(ClientConstants.OP_ADDR).add(ClientConstants.SUBSYSTEM, WildflyConstants.SUBSYSTEM_DATASOURCES);
request.get(ClientConstants.OP_ADDR).add(WildflyConstants.DATASOURCE, datasourceName);
request.get("jndi-name").set(WebServerUtils.jndiName(datasourceName));
request.get("connection-url").set(dbUrl);
request.get("driver-class").set(driverOpt.get().get(WildflyConstants.DRIVER_CLASS_NAME).asString());
request.get(WildflyConstants.DRIVER_NAME).set(driverOpt.get().get(WildflyConstants.DRIVER_NAME));
request.get("pool-name").set("pool_NewDatasource");
request.get("user-name").set(dbuser);
request.get("password").set("myPW");
return execute().apply(conn).apply(request);
}}
The deployment of the war looks as follows:
{{
// cli equivalent: /deployment=My_war_file.war:add(enabled=true,content=[url=file:///path/to/target/My_war_file.war])"
ModelNode request = new ModelNode();
request.get(ClientConstants.OP).set(ClientConstants.ADD);
request.get(ClientConstants.OP_ADDR).add(ClientConstants.DEPLOYMENT, deploymentName);
request.get(WildflyConstants.ENABLED).set(true);
request.get(ClientConstants.CONTENT).add(WildflyConstants.URL, file.toUri().toString());
return execute().apply(conn).apply(request);
}}
- All applications ever deployed to the server fail when restarting
- Each application depends on a datasource
The server startup log:
prod@aserver:/opt/wildfly-9.0.2.Final/bin$ ./standalone.sh
=========================================================================
JBoss Bootstrap Environment
JBOSS_HOME: /opt/wildfly-9.0.2.Final
JAVA: /usr/lib/jvm/jre1.8.0_65/bin/java
JAVA_OPTS: -server -XX:+UseCompressedOops -server -XX:+UseCompressedOops -Xms64m -Xmx512m -XX:MaxPermSize=256m -Djava.net.preferIPv4Stack=true -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true
=========================================================================
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0
10:35:48,485 INFO [org.jboss.modules] (main) JBoss Modules version 1.4.3.Final
10:35:50,605 INFO [org.jboss.msc] (main) JBoss MSC version 1.2.6.Final
10:35:51,234 INFO [org.jboss.as] (MSC service thread 1-8) WFLYSRV0049: WildFly Full 9.0.2.Final (WildFly Core 1.0.2.Final) starting
10:36:01,572 INFO [org.jboss.as.controller.management-deprecated] (ServerService Thread Pool -- 18) WFLYCTL0028: Attribute 'job-repository-type' in the resource at address '/subsystem=batch' is deprecated, and may be removed in future version. See the attribute description in the output of the read-resource-description operation to learn more about the deprecation.
10:36:01,573 INFO [org.jboss.as.controller.management-deprecated] (ServerService Thread Pool -- 8) WFLYCTL0028: Attribute 'enabled' in the resource at address '/subsystem=datasources/data-source=ExampleDS' is deprecated, and may be removed in future version. See the attribute description in the output of the read-resource-description operation to learn more about the deprecation.
10:36:01,800 INFO [org.jboss.as.controller.management-deprecated] (ServerService Thread Pool -- 8) WFLYCTL0028: Attribute 'enabled' in the resource at address '/subsystem=datasources/data-source=mmcontrollerdatasource' is deprecated, and may be removed in future version. See the attribute description in the output of the read-resource-description operation to learn more about the deprecation.
10:36:01,801 INFO [org.jboss.as.controller.management-deprecated] (ServerService Thread Pool -- 8) WFLYCTL0028: Attribute 'enabled' in the resource at address '/subsystem=datasources/data-source=tobidatasource' is deprecated, and may be removed in future version. See the attribute description in the output of the read-resource-description operation to learn more about the deprecation.
10:36:01,893 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("add") failed - address: ([("deployment" => "MM-Controller-0.1.0-SNAPSHOT.war")]) - failure description: "WFLYSRV0137: No deployment content with hash 966847a6f5f5bf8c3470f07ea9e65b7bbcdcd7b7 is available in the deployment content repository for deployment 'MM-Controller-0.1.0-SNAPSHOT.war'. This is a fatal boot error. To correct the problem, either restart with the --admin-only switch set and use the CLI to install the missing content or remove it from the configuration, or remove the deployment from the xml configuration file and restart."
10:36:01,990 FATAL [org.jboss.as.server] (Controller Boot Thread) WFLYSRV0056: Server boot has failed in an unrecoverable manner; exiting. See previous messages for details.
10:36:02,071 INFO [org.jboss.as.server] (Thread-2) WFLYSRV0220: Server shutdown has been requested.
10:36:02,256 INFO [org.jboss.as] (MSC service thread 1-6) WFLYSRV0050: WildFly Full 9.0.2.Final (WildFly Core 1.0.2.Final) stopped in 11ms
I'll try to reproduce with 10.0.0.CR5 and let you know.
Thanks for your help!
> Deployment error after reboot [WFLYSRV0137]
> -------------------------------------------
>
> Key: WFCORE-1330
> URL: https://issues.jboss.org/browse/WFCORE-1330
> Project: WildFly Core
> Issue Type: Bug
> Components: Domain Management
> Affects Versions: 1.0.2.Final
> Environment: Ubuntu 14.04 LTS 64bit, jre-1.8.0_65
> Several deployed (JavaEE) web applications including non XA datasources that connect to a MySQL instance.
> Reporter: Tobi Tobias
> Assignee: ehsavoie Hugonnet
> Priority: Critical
>
> I have a working configuration on wildfly 9.0.2 final with several web applications (JavaEE).
> After a couple of days, I deployed another war file via jboss CLI. This application worked correctly and no deployment error occurred.
> But if I restart the server now, I get following error message:
> 10:36:01,893 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("add") failed - address: ([("deployment" => "MM-Controller-0.1.0-SNAPSHOT.war")]) - failure description: "WFLYSRV0137: No deployment content with hash 966847a6f5f5bf8c3470f07ea9e65b7bbcdcd7b7 is available in the deployment content repository for deployment 'MM-Controller-0.1.0-SNAPSHOT.war'. This is a fatal boot error. To correct the problem, either restart with the --admin-only switch set and use the CLI to install the missing content or remove it from the configuration, or remove the deployment from the xml configuration file and restart."
> 10:36:01,990 FATAL [org.jboss.as.server] (Controller Boot Thread) WFLYSRV0056: Server boot has failed in an unrecoverable manner; exiting. See previous messages for details.
> I reproduced this at least 30 times - even with different jars. I always get this error. The server works fine as long as I don't reboot.
> The only way to fix the configuration is to manually remove the deployments from the standalone.xml.
> But this is not an option for me as I want to have the wildfly running as production server where I have several automatic deployments every day.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
10 years, 3 months
[JBoss JIRA] (SECURITY-934) RolesSearch in AdvancedLdapLoginModule is doing a needless LDAP call for each individual role
by Hynek Švábek (JIRA)
[ https://issues.jboss.org/browse/SECURITY-934?page=com.atlassian.jira.plug... ]
Hynek Švábek moved WFLY-6062 to SECURITY-934:
---------------------------------------------
Project: PicketBox (was: WildFly)
Key: SECURITY-934 (was: WFLY-6062)
Workflow: classic default workflow (was: GIT Pull Request workflow )
Component/s: Negotiation
(was: Security)
> RolesSearch in AdvancedLdapLoginModule is doing a needless LDAP call for each individual role
> ---------------------------------------------------------------------------------------------
>
> Key: SECURITY-934
> URL: https://issues.jboss.org/browse/SECURITY-934
> Project: PicketBox
> Issue Type: Bug
> Components: Negotiation
> Reporter: Hynek Švábek
> Assignee: Darran Lofthouse
>
> There will be needless LDAP calls if we use AdvancedLdap login module.
> If a user is a member of (lets say) 100 groups, then we can get an extra 100 calls to the LDAP server.
> It can be performance problem.
> Same problem was in LdapExt login module.
> You can see this BZ https://bugzilla.redhat.com/show_bug.cgi?id=1223840
> Example from Wireshark for 2 groups:
> {code}
> * searchRequest(3) "ou=Roles,ou=AdvancedLdapLoginModuleSpecialNamesTestCasee4b1c459,OU=primary,O=eapqe,DC=JBOSS3,DC=test" wholeSubtree
> * searchResEntry(3) "CN=JBossAdmin,OU=Roles,OU=AdvancedLdapLoginModuleSpecialNamesTestCasee4b1c459,OU=primary,O=eapqe,DC=JBOSS3,DC=test" | searchResEntry(3) "CN=Slash/Char,OU=Roles,OU=AdvancedLdapLoginModuleSpecialNamesTestCasee4b1c459,OU=primary,O=eapqe,DC=JBOSS3,DC=test" | searchResDone(3) success [2 results]
> * searchRequest(4) "CN=JBossAdmin,ou=Roles,ou=AdvancedLdapLoginModuleSpecialNamesTestCasee4b1c459,OU=primary,O=eapqe,DC=JBOSS3,DC=test" baseObject
> * searchResEntry(4) "CN=JBossAdmin,ou=Roles,ou=AdvancedLdapLoginModuleSpecialNamesTestCasee4b1c459,OU=primary,O=eapqe,DC=JBOSS3,DC=test" | searchResDone(4) success [1 result]
> * searchRequest(5) "CN=Slash/Char,ou=Roles,ou=AdvancedLdapLoginModuleSpecialNamesTestCasee4b1c459,OU=primary,O=eapqe,DC=JBOSS3,DC=test" baseObject
> * searchResEntry(5) "CN=Slash/Char,ou=Roles,ou=AdvancedLdapLoginModuleSpecialNamesTestCasee4b1c459,OU=primary,O=eapqe,DC=JBOSS3,DC=test" | searchResDone(5) success [1 result]
> {code}|
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
10 years, 3 months
[JBoss JIRA] (DROOLS-1010) AlphNode sharing fails to propagate match to BetaNode when match is defined separate rule package
by Anantjot Anand (JIRA)
[ https://issues.jboss.org/browse/DROOLS-1010?page=com.atlassian.jira.plugi... ]
Anantjot Anand edited comment on DROOLS-1010 at 1/25/16 11:09 PM:
------------------------------------------------------------------
My typo falsely made me believe that I was successful in writing the reproducer. I now have a reproducer working correctly to reproduce this issue.
Please see the attached java unit test file as reproducer.
Thanks
was (Author: anantjot12):
My typo falsely made me believe that I was successful in writing the reproducer. I now have a reproducer working correctly to reproduce this issue. I am not sure if this would allow me to attach the reproducer here but if not I will send you separate email with Unit test.
{code:java}
package com.test.unittest;
import java.util.HashSet;
import org.drools.core.audit.event.ActivationLogEventFilter;
import org.junit.Assert;
import org.junit.Test;
import org.kie.api.KieBaseConfiguration;
import org.kie.api.io.ResourceType;
import org.kie.internal.KnowledgeBase;
import org.kie.internal.KnowledgeBaseFactory;
import org.kie.internal.builder.KnowledgeBuilder;
import org.kie.internal.builder.KnowledgeBuilderFactory;
import org.kie.internal.io.ResourceFactory;
import org.kie.internal.runtime.StatefulKnowledgeSession;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.test.unittest.DroolsTest.TypeA;
import com.test.unittest.DroolsTest.TypeB;
import com.test.unittest.DroolsTest.TypeC;
import com.test.unittest.DroolsTest.TypeD;
import com.test.unittest.DroolsTest.TypeE;
public class AlphaNodeSharingWithDiffPackageName {
public static class TypeA {
private int parentId = 2;
private int id = 3;
public int getParentId() { return parentId; }
public int getId() { return id; }
private String alphaNode;
private HashSet<String> firings = new HashSet<String>();
public HashSet<String> getFirings(){if (firings == null) firings = new HashSet<String>(); return firings;}
public void setFirings(HashSet<String> x){firings = x;}
private String data = "AlphaNodeHashingThreshold Data";
public String getData() { return data; }
public String getAlphaNode() {
return alphaNode;
}
public void setAlphaNode(String alphaNode) {
this.alphaNode = alphaNode;
}
}
public static class TypeB {
private int parentId = 1;
private int id = 2;
public int getParentId() { return parentId; }
public int getId() { return id; }
}
public static class TypeC {
private int parentId = 0;
private int id = 1;
public int getParentId() { return parentId; }
public int getId() { return id; }
}
public static class TypeD {
private int value;
public int getValue() { return value; }
public void setValue(int value) { this.value = value; }
}
public static class TypeE {
private int value;
public int getValue() { return value; }
public void setValue(int value) { this.value = value; }
}
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
}
static String rule1 ="package com.test.rule1;\r\n" +
"\r\n" +
"import "+ TypeA.class.getCanonicalName() +";\r\n" +
"import "+ TypeB.class.getCanonicalName() +";\r\n" +
"import "+ TypeC.class.getCanonicalName() +";\r\n" +
" \r\n" +
"rule R1\r\n" +
" dialect \"java\"\r\n" +
"when\r\n" +
" $c : TypeC()\r\n" +
" $b : TypeB(parentId == $c.Id)\r\n" +
" $a : TypeA( parentId == $b.Id, firings not contains \"R1 Fired\")\r\n" +
"then\r\n" +
" $a.setAlphaNode(\"value contains TypeD TypeE data type\");\r\n" +
" $a.getFirings().add(\"R1 Fired\");\r\n" +
" update($a);\r\n" +
"end";
static String rule2 ="package com.test.rule2;\r\n" +
"\r\n" +
"import "+ TypeA.class.getCanonicalName() +";\r\n" +
"import "+ TypeB.class.getCanonicalName() +";\r\n" +
"import "+ TypeC.class.getCanonicalName() +";\r\n" +
"\r\n" +
"rule R2 \r\n" +
" dialect \"java\"\r\n" +
"when\r\n" +
" $c : TypeC()\r\n" +
" $b : TypeB(parentId == $c.Id)\r\n" +
" $a : TypeA(parentId == $b.Id, \r\n" +
" alphaNode==\"value contains TypeD TypeE data type\", \r\n" +
" firings not contains \"R2 Fired\")\r\n" +
"then\r\n" +
" $a.getFirings().add(\"R2 Fired\");\r\n" +
" update($a);\r\n" +
"end";
static String rule3 ="package com.test.rule3;\r\n" +
"\r\n" +
"import "+ TypeA.class.getCanonicalName() +";\r\n" +
"import "+ TypeB.class.getCanonicalName() +";\r\n" +
"import "+ TypeC.class.getCanonicalName() +";\r\n" +
"import "+ TypeD.class.getCanonicalName() +";\r\n" +
"\r\n" +
"rule R3 \r\n" +
" dialect \"java\"\r\n" +
"when\r\n" +
" $d : TypeD()\r\n" +
" $c : TypeC()\r\n" +
" $b : TypeB(parentId == $c.Id)\r\n" +
" $a : TypeA( parentId == $b.Id,\r\n" +
" alphaNode==\"value contains TypeD TypeE data type\", \r\n" +
" firings not contains \"R3 Fired\")\r\n" +
"then\r\n" +
" $a.getFirings().add(\"R3 Fired\");\r\n" +
" update($a);\r\n" +
"end;";
static String rule4 ="package com.test.rule4;\r\n" +
"\r\n" +
"import "+ TypeA.class.getCanonicalName() +";\r\n" +
"import "+ TypeB.class.getCanonicalName() +";\r\n" +
"import "+ TypeC.class.getCanonicalName() +";\r\n" +
"import "+ TypeE.class.getCanonicalName() +";\r\n" +
"\r\n" +
"rule R4 \r\n" +
" dialect \"java\"\r\n" +
"when\r\n" +
" $e: TypeE()\r\n" +
" $c : TypeC()\r\n" +
" $b : TypeB(parentId == $c.Id)\r\n" +
" $a : TypeA( parentId == $b.Id,\r\n" +
" alphaNode==\"value contains TypeD TypeE data type\", \r\n" +
" firings not contains \"R4 Fired\")\r\n" +
"then\r\n" +
" $a.getFirings().add(\"R4 Fired\");\r\n" +
" update($a);\r\n" +
"end;";
@Test
public void testalphaNode()
{
Logger logger = LoggerFactory.getLogger(AlphaNodeSharingWithDiffPackageName.class);
KnowledgeBuilder builder = KnowledgeBuilderFactory.newKnowledgeBuilder();
builder.add( ResourceFactory.newByteArrayResource( rule1.getBytes() ), ResourceType.DRL);
if ( builder.hasErrors() ) {
throw new RuntimeException(builder.getErrors().toString());
}
builder.add( ResourceFactory.newByteArrayResource( rule2.getBytes() ), ResourceType.DRL);
if ( builder.hasErrors() ) {
throw new RuntimeException(builder.getErrors().toString());
}
builder.add( ResourceFactory.newByteArrayResource( rule3.getBytes() ), ResourceType.DRL);
if ( builder.hasErrors() ) {
throw new RuntimeException(builder.getErrors().toString());
}
builder.add( ResourceFactory.newByteArrayResource( rule4.getBytes() ), ResourceType.DRL);
if ( builder.hasErrors() ) {
throw new RuntimeException(builder.getErrors().toString());
}
KieBaseConfiguration kconf = KnowledgeBaseFactory.newKnowledgeBaseConfiguration();
KnowledgeBase knowledgeBase = KnowledgeBaseFactory.newKnowledgeBase(kconf);
knowledgeBase.addKnowledgePackages(builder.getKnowledgePackages());
StatefulKnowledgeSession ksession = knowledgeBase.newStatefulKnowledgeSession();
TypeC c= new TypeC();
TypeB b= new TypeB();
TypeA a= new TypeA();
TypeD d= new TypeD();
TypeE e= new TypeE();
ksession.insert(a);
ksession.insert(b);
ksession.insert(c);
ksession.insert(d);
ksession.insert(e);
ksession.fireAllRules();
Assert.assertEquals(true, a.getFirings().contains("R1 Fired"));
Assert.assertEquals(true, a.getFirings().contains("R2 Fired"));
Assert.assertEquals(true, a.getFirings().contains("R3 Fired"));
Assert.assertEquals(true, a.getFirings().contains("R4 Fired"));
}
}
{code}
> AlphNode sharing fails to propagate match to BetaNode when match is defined separate rule package
> -------------------------------------------------------------------------------------------------
>
> Key: DROOLS-1010
> URL: https://issues.jboss.org/browse/DROOLS-1010
> Project: Drools
> Issue Type: Bug
> Components: core engine
> Affects Versions: 6.3.0.Final
> Reporter: Anantjot Anand
> Assignee: Mario Fusco
> Attachments: AlphaNodeSharingWithDiffPackageName.java, AlphaNodeSharingWithDiffPackageName.java
>
>
> The issue was happening for us when LHS matches for some rules with thousands of rules in rulebase only one rule would fire in PHREAK algo however all matches will fire in REETO.
> It turns out the root cause was that the two rules that had LHS matching criteria are defined in separate rule package name and was stemming from AlphaNode.equals returning false when it should return true. I believe underlying issue is further in MevelConstraint.equals compares the package name.
> This can be reproduce using attached unit testcase.
> I am not sure of the reasoning behind for the MevelConstraint.equals implementation...if it is important to keep that logic same way...following workaround has worked for me.
> In class org.drools.core.reteoo.CompositeObjectSinkAdapter following function definitions..
> org.drools.core.reteoo.CompositeObjectSinkAdapter.propagateModifyObject(InternalFactHandle, ModifyPreviousTuples, PropagationContext, InternalWorkingMemory)
> org.drools.core.reteoo.CompositeObjectSinkAdapter.propagateAssertObject(InternalFactHandle, PropagationContext, InternalWorkingMemory)
> org.drools.core.reteoo.CompositeObjectSinkAdapter.byPassModifyToBetaNode(InternalFactHandle, ModifyPreviousTuples, PropagationContext, InternalWorkingMemory)
> I changed the call from this.hashedSinkMap.get( hashKey ) to this.hashedSinkMap.getAll( hashKey ) and defined a new function as following to retrieve all alpha nodes that have same HashKey.
> public Object[] getAll(final Object key) {
> final int hashCode = this.comparator.hashCodeOf( key );
> final int index = indexOf( hashCode,
> this.table.length );
> List arr = new ArrayList();
> ObjectEntry current = (ObjectEntry) this.table[index];
> while ( current != null ) {
> if ( hashCode == current.cachedHashCode && this.comparator.equal( key,
> current.key ) ) {
> arr.add(current.value);
> }
> current = (ObjectEntry) current.getNext();
> }
> return arr.toArray();
> }
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
10 years, 3 months
[JBoss JIRA] (DROOLS-1010) AlphNode sharing fails to propagate match to BetaNode when match is defined separate rule package
by Anantjot Anand (JIRA)
[ https://issues.jboss.org/browse/DROOLS-1010?page=com.atlassian.jira.plugi... ]
Anantjot Anand updated DROOLS-1010:
-----------------------------------
Attachment: AlphaNodeSharingWithDiffPackageName.java
> AlphNode sharing fails to propagate match to BetaNode when match is defined separate rule package
> -------------------------------------------------------------------------------------------------
>
> Key: DROOLS-1010
> URL: https://issues.jboss.org/browse/DROOLS-1010
> Project: Drools
> Issue Type: Bug
> Components: core engine
> Affects Versions: 6.3.0.Final
> Reporter: Anantjot Anand
> Assignee: Mario Fusco
> Attachments: AlphaNodeSharingWithDiffPackageName.java, AlphaNodeSharingWithDiffPackageName.java
>
>
> The issue was happening for us when LHS matches for some rules with thousands of rules in rulebase only one rule would fire in PHREAK algo however all matches will fire in REETO.
> It turns out the root cause was that the two rules that had LHS matching criteria are defined in separate rule package name and was stemming from AlphaNode.equals returning false when it should return true. I believe underlying issue is further in MevelConstraint.equals compares the package name.
> This can be reproduce using attached unit testcase.
> I am not sure of the reasoning behind for the MevelConstraint.equals implementation...if it is important to keep that logic same way...following workaround has worked for me.
> In class org.drools.core.reteoo.CompositeObjectSinkAdapter following function definitions..
> org.drools.core.reteoo.CompositeObjectSinkAdapter.propagateModifyObject(InternalFactHandle, ModifyPreviousTuples, PropagationContext, InternalWorkingMemory)
> org.drools.core.reteoo.CompositeObjectSinkAdapter.propagateAssertObject(InternalFactHandle, PropagationContext, InternalWorkingMemory)
> org.drools.core.reteoo.CompositeObjectSinkAdapter.byPassModifyToBetaNode(InternalFactHandle, ModifyPreviousTuples, PropagationContext, InternalWorkingMemory)
> I changed the call from this.hashedSinkMap.get( hashKey ) to this.hashedSinkMap.getAll( hashKey ) and defined a new function as following to retrieve all alpha nodes that have same HashKey.
> public Object[] getAll(final Object key) {
> final int hashCode = this.comparator.hashCodeOf( key );
> final int index = indexOf( hashCode,
> this.table.length );
> List arr = new ArrayList();
> ObjectEntry current = (ObjectEntry) this.table[index];
> while ( current != null ) {
> if ( hashCode == current.cachedHashCode && this.comparator.equal( key,
> current.key ) ) {
> arr.add(current.value);
> }
> current = (ObjectEntry) current.getNext();
> }
> return arr.toArray();
> }
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
10 years, 3 months
[JBoss JIRA] (DROOLS-1010) AlphNode sharing fails to propagate match to BetaNode when match is defined separate rule package
by Anantjot Anand (JIRA)
[ https://issues.jboss.org/browse/DROOLS-1010?page=com.atlassian.jira.plugi... ]
Anantjot Anand reopened DROOLS-1010:
------------------------------------
My typo falsely made me believe that I was successful in writing the reproducer. I now have a reproducer working correctly to reproduce this issue. I am not sure if this would allow me to attach the reproducer here but if not I will send you separate email with Unit test.
{code:java}
package com.test.unittest;
import java.util.HashSet;
import org.drools.core.audit.event.ActivationLogEventFilter;
import org.junit.Assert;
import org.junit.Test;
import org.kie.api.KieBaseConfiguration;
import org.kie.api.io.ResourceType;
import org.kie.internal.KnowledgeBase;
import org.kie.internal.KnowledgeBaseFactory;
import org.kie.internal.builder.KnowledgeBuilder;
import org.kie.internal.builder.KnowledgeBuilderFactory;
import org.kie.internal.io.ResourceFactory;
import org.kie.internal.runtime.StatefulKnowledgeSession;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.test.unittest.DroolsTest.TypeA;
import com.test.unittest.DroolsTest.TypeB;
import com.test.unittest.DroolsTest.TypeC;
import com.test.unittest.DroolsTest.TypeD;
import com.test.unittest.DroolsTest.TypeE;
public class AlphaNodeSharingWithDiffPackageName {
public static class TypeA {
private int parentId = 2;
private int id = 3;
public int getParentId() { return parentId; }
public int getId() { return id; }
private String alphaNode;
private HashSet<String> firings = new HashSet<String>();
public HashSet<String> getFirings(){if (firings == null) firings = new HashSet<String>(); return firings;}
public void setFirings(HashSet<String> x){firings = x;}
private String data = "AlphaNodeHashingThreshold Data";
public String getData() { return data; }
public String getAlphaNode() {
return alphaNode;
}
public void setAlphaNode(String alphaNode) {
this.alphaNode = alphaNode;
}
}
public static class TypeB {
private int parentId = 1;
private int id = 2;
public int getParentId() { return parentId; }
public int getId() { return id; }
}
public static class TypeC {
private int parentId = 0;
private int id = 1;
public int getParentId() { return parentId; }
public int getId() { return id; }
}
public static class TypeD {
private int value;
public int getValue() { return value; }
public void setValue(int value) { this.value = value; }
}
public static class TypeE {
private int value;
public int getValue() { return value; }
public void setValue(int value) { this.value = value; }
}
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
}
static String rule1 ="package com.test.rule1;\r\n" +
"\r\n" +
"import "+ TypeA.class.getCanonicalName() +";\r\n" +
"import "+ TypeB.class.getCanonicalName() +";\r\n" +
"import "+ TypeC.class.getCanonicalName() +";\r\n" +
" \r\n" +
"rule R1\r\n" +
" dialect \"java\"\r\n" +
"when\r\n" +
" $c : TypeC()\r\n" +
" $b : TypeB(parentId == $c.Id)\r\n" +
" $a : TypeA( parentId == $b.Id, firings not contains \"R1 Fired\")\r\n" +
"then\r\n" +
" $a.setAlphaNode(\"value contains TypeD TypeE data type\");\r\n" +
" $a.getFirings().add(\"R1 Fired\");\r\n" +
" update($a);\r\n" +
"end";
static String rule2 ="package com.test.rule2;\r\n" +
"\r\n" +
"import "+ TypeA.class.getCanonicalName() +";\r\n" +
"import "+ TypeB.class.getCanonicalName() +";\r\n" +
"import "+ TypeC.class.getCanonicalName() +";\r\n" +
"\r\n" +
"rule R2 \r\n" +
" dialect \"java\"\r\n" +
"when\r\n" +
" $c : TypeC()\r\n" +
" $b : TypeB(parentId == $c.Id)\r\n" +
" $a : TypeA(parentId == $b.Id, \r\n" +
" alphaNode==\"value contains TypeD TypeE data type\", \r\n" +
" firings not contains \"R2 Fired\")\r\n" +
"then\r\n" +
" $a.getFirings().add(\"R2 Fired\");\r\n" +
" update($a);\r\n" +
"end";
static String rule3 ="package com.test.rule3;\r\n" +
"\r\n" +
"import "+ TypeA.class.getCanonicalName() +";\r\n" +
"import "+ TypeB.class.getCanonicalName() +";\r\n" +
"import "+ TypeC.class.getCanonicalName() +";\r\n" +
"import "+ TypeD.class.getCanonicalName() +";\r\n" +
"\r\n" +
"rule R3 \r\n" +
" dialect \"java\"\r\n" +
"when\r\n" +
" $d : TypeD()\r\n" +
" $c : TypeC()\r\n" +
" $b : TypeB(parentId == $c.Id)\r\n" +
" $a : TypeA( parentId == $b.Id,\r\n" +
" alphaNode==\"value contains TypeD TypeE data type\", \r\n" +
" firings not contains \"R3 Fired\")\r\n" +
"then\r\n" +
" $a.getFirings().add(\"R3 Fired\");\r\n" +
" update($a);\r\n" +
"end;";
static String rule4 ="package com.test.rule4;\r\n" +
"\r\n" +
"import "+ TypeA.class.getCanonicalName() +";\r\n" +
"import "+ TypeB.class.getCanonicalName() +";\r\n" +
"import "+ TypeC.class.getCanonicalName() +";\r\n" +
"import "+ TypeE.class.getCanonicalName() +";\r\n" +
"\r\n" +
"rule R4 \r\n" +
" dialect \"java\"\r\n" +
"when\r\n" +
" $e: TypeE()\r\n" +
" $c : TypeC()\r\n" +
" $b : TypeB(parentId == $c.Id)\r\n" +
" $a : TypeA( parentId == $b.Id,\r\n" +
" alphaNode==\"value contains TypeD TypeE data type\", \r\n" +
" firings not contains \"R4 Fired\")\r\n" +
"then\r\n" +
" $a.getFirings().add(\"R4 Fired\");\r\n" +
" update($a);\r\n" +
"end;";
@Test
public void testalphaNode()
{
Logger logger = LoggerFactory.getLogger(AlphaNodeSharingWithDiffPackageName.class);
KnowledgeBuilder builder = KnowledgeBuilderFactory.newKnowledgeBuilder();
builder.add( ResourceFactory.newByteArrayResource( rule1.getBytes() ), ResourceType.DRL);
if ( builder.hasErrors() ) {
throw new RuntimeException(builder.getErrors().toString());
}
builder.add( ResourceFactory.newByteArrayResource( rule2.getBytes() ), ResourceType.DRL);
if ( builder.hasErrors() ) {
throw new RuntimeException(builder.getErrors().toString());
}
builder.add( ResourceFactory.newByteArrayResource( rule3.getBytes() ), ResourceType.DRL);
if ( builder.hasErrors() ) {
throw new RuntimeException(builder.getErrors().toString());
}
builder.add( ResourceFactory.newByteArrayResource( rule4.getBytes() ), ResourceType.DRL);
if ( builder.hasErrors() ) {
throw new RuntimeException(builder.getErrors().toString());
}
KieBaseConfiguration kconf = KnowledgeBaseFactory.newKnowledgeBaseConfiguration();
KnowledgeBase knowledgeBase = KnowledgeBaseFactory.newKnowledgeBase(kconf);
knowledgeBase.addKnowledgePackages(builder.getKnowledgePackages());
StatefulKnowledgeSession ksession = knowledgeBase.newStatefulKnowledgeSession();
TypeC c= new TypeC();
TypeB b= new TypeB();
TypeA a= new TypeA();
TypeD d= new TypeD();
TypeE e= new TypeE();
ksession.insert(a);
ksession.insert(b);
ksession.insert(c);
ksession.insert(d);
ksession.insert(e);
ksession.fireAllRules();
Assert.assertEquals(true, a.getFirings().contains("R1 Fired"));
Assert.assertEquals(true, a.getFirings().contains("R2 Fired"));
Assert.assertEquals(true, a.getFirings().contains("R3 Fired"));
Assert.assertEquals(true, a.getFirings().contains("R4 Fired"));
}
}
{code}
> AlphNode sharing fails to propagate match to BetaNode when match is defined separate rule package
> -------------------------------------------------------------------------------------------------
>
> Key: DROOLS-1010
> URL: https://issues.jboss.org/browse/DROOLS-1010
> Project: Drools
> Issue Type: Bug
> Components: core engine
> Affects Versions: 6.3.0.Final
> Reporter: Anantjot Anand
> Assignee: Mario Fusco
> Attachments: AlphaNodeSharingWithDiffPackageName.java
>
>
> The issue was happening for us when LHS matches for some rules with thousands of rules in rulebase only one rule would fire in PHREAK algo however all matches will fire in REETO.
> It turns out the root cause was that the two rules that had LHS matching criteria are defined in separate rule package name and was stemming from AlphaNode.equals returning false when it should return true. I believe underlying issue is further in MevelConstraint.equals compares the package name.
> This can be reproduce using attached unit testcase.
> I am not sure of the reasoning behind for the MevelConstraint.equals implementation...if it is important to keep that logic same way...following workaround has worked for me.
> In class org.drools.core.reteoo.CompositeObjectSinkAdapter following function definitions..
> org.drools.core.reteoo.CompositeObjectSinkAdapter.propagateModifyObject(InternalFactHandle, ModifyPreviousTuples, PropagationContext, InternalWorkingMemory)
> org.drools.core.reteoo.CompositeObjectSinkAdapter.propagateAssertObject(InternalFactHandle, PropagationContext, InternalWorkingMemory)
> org.drools.core.reteoo.CompositeObjectSinkAdapter.byPassModifyToBetaNode(InternalFactHandle, ModifyPreviousTuples, PropagationContext, InternalWorkingMemory)
> I changed the call from this.hashedSinkMap.get( hashKey ) to this.hashedSinkMap.getAll( hashKey ) and defined a new function as following to retrieve all alpha nodes that have same HashKey.
> public Object[] getAll(final Object key) {
> final int hashCode = this.comparator.hashCodeOf( key );
> final int index = indexOf( hashCode,
> this.table.length );
> List arr = new ArrayList();
> ObjectEntry current = (ObjectEntry) this.table[index];
> while ( current != null ) {
> if ( hashCode == current.cachedHashCode && this.comparator.equal( key,
> current.key ) ) {
> arr.add(current.value);
> }
> current = (ObjectEntry) current.getNext();
> }
> return arr.toArray();
> }
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
10 years, 3 months
[JBoss JIRA] (WFCORE-1311) WFCORE-893 Fix breaks mixed-domain
by Brian Stansberry (JIRA)
[ https://issues.jboss.org/browse/WFCORE-1311?page=com.atlassian.jira.plugi... ]
Brian Stansberry reassigned WFCORE-1311:
----------------------------------------
Assignee: Brian Stansberry
> WFCORE-893 Fix breaks mixed-domain
> ----------------------------------
>
> Key: WFCORE-1311
> URL: https://issues.jboss.org/browse/WFCORE-1311
> Project: WildFly Core
> Issue Type: Bug
> Components: Domain Management, Remoting
> Affects Versions: 2.0.7.Final
> Reporter: Brian Stansberry
> Assignee: Brian Stansberry
> Priority: Critical
> Fix For: 2.0.8.Final
>
>
> The WFCORE-893 fix breaks mixed-domain use cases by adding subsystem=io if its not present. That's ok for standalone, but in a domain it means a subsystem not understood by legacy slaves will get added into profiles used by those slaves. Which will fail.
> I've considered doing some sort of transformer trick to discard this subsystem if its config is default, but I suspect it's better to just not do the WFCORE-893 thing on the DC.
> Discarding might be ok if we just do a resource transformer discard but reject all ops thereafter. Idea being that if the io config is default, matching what legacy slaves did, then we let the slave boot. Then any subsequent op must be either pointless or moving away from default, and must be rejected.
> But still, just not doing the WFCORE-893 thing on the DC is probably better. Or at least simpler right now.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
10 years, 3 months