[JBoss JIRA] (JBAS-9552) java.lang.LinkageError: loader constraint violation: loader (instance of com/documentum/fc/client/impl/bof/classmgmt/URLClassLoaderEx) previously initiated loading for a different type with name "javax/xml/namespace/QName"
by Sergey Smirnov (JIRA)
[ https://issues.jboss.org/browse/JBAS-9552?page=com.atlassian.jira.plugin.... ]
Sergey Smirnov updated JBAS-9552:
---------------------------------
Description:
I work with Documentum platform, can any one adnise me with next proplem:
First loaded from this part :
[Loaded javax.xml.namespace.QName from /u01/documentum/ord/shared/jboss5.1.0/lib/endorsed/stax-api.jar]
and then
[Loaded javax.xml.namespace.QName from jar:file:/u01/documentum/ord/shared/jboss5.1.0/server/DctmServer_MethodServer/deploy/bpm.ear/bpm.war/WEB-INF/lib/sibc.jms.jar!/]
18:25:09,251 INFO [STDOUT] 2013-11-12 18:25:09,250 ERROR [http-0.0.0.0-9080-49] [ru.atconsulting.dms.methods.workflow.integration.contractex.event.ATCWFExecuteEvent] - loader constraint violation: loader (instance of com/documentum/fc/client/impl/bof/classmgmt/URLClassLoaderEx) previously initiated loading for a different type with name "javax/xml/namespace/QName" .....................
java.lang.LinkageError: loader constraint violation: loader (instance of com/documentum/fc/client/impl/bof/classmgmt/URLClassLoaderEx) previously initiated loading for a different type with name "javax/xml/namespace/QName"
at oracle.apps.xxrt.xxcn348.contract.service.ContractServicePortBindingStub._initOperationDesc1(ContractServicePortBindingStub.java:30)
at oracle.apps.xxrt.xxcn348.contract.service.ContractServicePortBindingStub.<clinit>(ContractServicePortBindingStub.java:20)
at ru.company.esed.services.integration.contractex.dctm2oebs.common.AbstractWSClientContractEx.perform(AbstractWSClientContractEx.java:163)
at ru.company.dms.methods.workflow.integration.contractex.event.requests.impl.ConfirmContractCreateImpl.exec(ConfirmContractCreateImpl.java:47)
at ru.company.dms.methods.workflow.integration.contractex.event.requests.impl.AbstractForwardRequest.forward(AbstractForwardRequest.java:127)
at ru.company.dms.methods.workflow.integration.contractex.event.ATCWFExecuteEvent.doTask(ATCWFExecuteEvent.java:128)
at com.documentum.bpm.rtutil.WorkflowMethod.execute(WorkflowMethod.java:214)
at com.documentum.bpm.rtutil.AbstractWorkflowMethod.executeMethod(AbstractWorkflowMethod.java:27)
at com.documentum.bpm.rtutil.GenericWorkflowMethod.execute(GenericWorkflowMethod.java:124)
at com.documentum.bpm.rtutil.GenericWorkflowMethod.execute(GenericWorkflowMethod.java:65)
at com.documentum.mthdservlet.DfMethodRunner.runIt(Unknown Source)
at com.documentum.mthdservlet.AMethodRunner.runAndReturnStatus(Unknown Source)
at com.documentum.mthdservlet.DoMethod.invokeMethod(Unknown Source)
at com.documentum.mthdservlet.DoMethod.doPost(Unknown Source)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:598)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:662)
After analyze app server i found :
Like this:
$DOCUMENTUM_SHARED\jboss5.1.0\server\DctmServer_MethodServer\deploy\bpm.ear\bpm.war\WEB-INF\lib\jaxrpc.jar\javax\xml\namespace\QName.class
$DOCUMENTUM_SHARED\jboss5.1.0\server\DctmServer_MethodServer\deploy\bpm.ear\bpm.war\WEB-INF\lib\sibc.jms.jar\javax\xml\namespace\QName.class
$DOCUMENTUM_SHARED\jboss5.1.0\server\DctmServer_MethodServer\deploy\bpm.ear\bpm.war\WEB-INF\lib\qname.jar\javax\xml\namespace\QName.class
$DOCUMENTUM_SHARED\jboss5.1.0\lib\endorsed\stax-api.jar\javax\xml\namespace\QName.class
as a result, I get the error in my custom module :
java.lang.LinkageError: loader constraint violation: loader (instance of com/documentum/fc/client/impl/bof/classmgmt/URLClassLoaderEx) previously initiated loading for a different type with name "javax/xml/namespace/QName"
How can I fixed that?
was:
I work with Documentum platform, can any one adnise me with next proplem:
First loaded from this part :
[Loaded javax.xml.namespace.QName from /u01/documentum/ord/shared/jboss5.1.0/lib/endorsed/stax-api.jar]
and then
[Loaded javax.xml.namespace.QName from jar:file:/u01/documentum/ord/shared/jboss5.1.0/server/DctmServer_MethodServer/deploy/bpm.ear/bpm.war/WEB-INF/lib/sibc.jms.jar!/]
18:25:09,251 INFO [STDOUT] 2013-11-12 18:25:09,250 ERROR [http-0.0.0.0-9080-49] [ru.atconsulting.dms.methods.workflow.integration.contractex.event.ATCWFExecuteEvent] - loader constraint violation: loader (instance of com/documentum/fc/client/impl/bof/classmgmt/URLClassLoaderEx) previously initiated loading for a different type with name "javax/xml/namespace/QName" .....................
java.lang.LinkageError: loader constraint violation: loader (instance of com/documentum/fc/client/impl/bof/classmgmt/URLClassLoaderEx) previously initiated loading for a different type with name "javax/xml/namespace/QName"
at oracle.apps.xxrt.xxcn348.contract.service.ContractServicePortBindingStub._initOperationDesc1(ContractServicePortBindingStub.java:30)
at oracle.apps.xxrt.xxcn348.contract.service.ContractServicePortBindingStub.<clinit>(ContractServicePortBindingStub.java:20)
at ru.atconsulting.esed.services.integration.contractex.dctm2oebs.common.AbstractWSClientContractEx.perform(AbstractWSClientContractEx.java:163)
at ru.company.dms.methods.workflow.integration.contractex.event.requests.impl.ConfirmContractCreateImpl.exec(ConfirmContractCreateImpl.java:47)
at ru.company.dms.methods.workflow.integration.contractex.event.requests.impl.AbstractForwardRequest.forward(AbstractForwardRequest.java:127)
at ru.company.dms.methods.workflow.integration.contractex.event.ATCWFExecuteEvent.doTask(ATCWFExecuteEvent.java:128)
at com.documentum.bpm.rtutil.WorkflowMethod.execute(WorkflowMethod.java:214)
at com.documentum.bpm.rtutil.AbstractWorkflowMethod.executeMethod(AbstractWorkflowMethod.java:27)
at com.documentum.bpm.rtutil.GenericWorkflowMethod.execute(GenericWorkflowMethod.java:124)
at com.documentum.bpm.rtutil.GenericWorkflowMethod.execute(GenericWorkflowMethod.java:65)
at com.documentum.mthdservlet.DfMethodRunner.runIt(Unknown Source)
at com.documentum.mthdservlet.AMethodRunner.runAndReturnStatus(Unknown Source)
at com.documentum.mthdservlet.DoMethod.invokeMethod(Unknown Source)
at com.documentum.mthdservlet.DoMethod.doPost(Unknown Source)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:598)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:662)
After analyze app server i found :
Like this:
$DOCUMENTUM_SHARED\jboss5.1.0\server\DctmServer_MethodServer\deploy\bpm.ear\bpm.war\WEB-INF\lib\jaxrpc.jar\javax\xml\namespace\QName.class
$DOCUMENTUM_SHARED\jboss5.1.0\server\DctmServer_MethodServer\deploy\bpm.ear\bpm.war\WEB-INF\lib\sibc.jms.jar\javax\xml\namespace\QName.class
$DOCUMENTUM_SHARED\jboss5.1.0\server\DctmServer_MethodServer\deploy\bpm.ear\bpm.war\WEB-INF\lib\qname.jar\javax\xml\namespace\QName.class
$DOCUMENTUM_SHARED\jboss5.1.0\lib\endorsed\stax-api.jar\javax\xml\namespace\QName.class
as a result, I get the error in my custom module :
java.lang.LinkageError: loader constraint violation: loader (instance of com/documentum/fc/client/impl/bof/classmgmt/URLClassLoaderEx) previously initiated loading for a different type with name "javax/xml/namespace/QName"
How can I fixed that?
> java.lang.LinkageError: loader constraint violation: loader (instance of com/documentum/fc/client/impl/bof/classmgmt/URLClassLoaderEx) previously initiated loading for a different type with name "javax/xml/namespace/QName"
> ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: JBAS-9552
> URL: https://issues.jboss.org/browse/JBAS-9552
> Project: Application Server 3 4 5 and 6
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: ClassLoading
> Affects Versions: JBossAS-5.1.0.GA
> Reporter: Sergey Smirnov
> Assignee: Ales Justin
> Labels: jboss, worked
>
> I work with Documentum platform, can any one adnise me with next proplem:
> First loaded from this part :
> [Loaded javax.xml.namespace.QName from /u01/documentum/ord/shared/jboss5.1.0/lib/endorsed/stax-api.jar]
> and then
> [Loaded javax.xml.namespace.QName from jar:file:/u01/documentum/ord/shared/jboss5.1.0/server/DctmServer_MethodServer/deploy/bpm.ear/bpm.war/WEB-INF/lib/sibc.jms.jar!/]
> 18:25:09,251 INFO [STDOUT] 2013-11-12 18:25:09,250 ERROR [http-0.0.0.0-9080-49] [ru.atconsulting.dms.methods.workflow.integration.contractex.event.ATCWFExecuteEvent] - loader constraint violation: loader (instance of com/documentum/fc/client/impl/bof/classmgmt/URLClassLoaderEx) previously initiated loading for a different type with name "javax/xml/namespace/QName" .....................
> java.lang.LinkageError: loader constraint violation: loader (instance of com/documentum/fc/client/impl/bof/classmgmt/URLClassLoaderEx) previously initiated loading for a different type with name "javax/xml/namespace/QName"
> at oracle.apps.xxrt.xxcn348.contract.service.ContractServicePortBindingStub._initOperationDesc1(ContractServicePortBindingStub.java:30)
> at oracle.apps.xxrt.xxcn348.contract.service.ContractServicePortBindingStub.<clinit>(ContractServicePortBindingStub.java:20)
> at ru.company.esed.services.integration.contractex.dctm2oebs.common.AbstractWSClientContractEx.perform(AbstractWSClientContractEx.java:163)
> at ru.company.dms.methods.workflow.integration.contractex.event.requests.impl.ConfirmContractCreateImpl.exec(ConfirmContractCreateImpl.java:47)
> at ru.company.dms.methods.workflow.integration.contractex.event.requests.impl.AbstractForwardRequest.forward(AbstractForwardRequest.java:127)
> at ru.company.dms.methods.workflow.integration.contractex.event.ATCWFExecuteEvent.doTask(ATCWFExecuteEvent.java:128)
> at com.documentum.bpm.rtutil.WorkflowMethod.execute(WorkflowMethod.java:214)
> at com.documentum.bpm.rtutil.AbstractWorkflowMethod.executeMethod(AbstractWorkflowMethod.java:27)
> at com.documentum.bpm.rtutil.GenericWorkflowMethod.execute(GenericWorkflowMethod.java:124)
> at com.documentum.bpm.rtutil.GenericWorkflowMethod.execute(GenericWorkflowMethod.java:65)
> at com.documentum.mthdservlet.DfMethodRunner.runIt(Unknown Source)
> at com.documentum.mthdservlet.AMethodRunner.runAndReturnStatus(Unknown Source)
> at com.documentum.mthdservlet.DoMethod.invokeMethod(Unknown Source)
> at com.documentum.mthdservlet.DoMethod.doPost(Unknown Source)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
> at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
> at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
> at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
> at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
> at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
> at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
> at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
> at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
> at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
> at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
> at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
> at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:598)
> at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
> at java.lang.Thread.run(Thread.java:662)
> After analyze app server i found :
> Like this:
> $DOCUMENTUM_SHARED\jboss5.1.0\server\DctmServer_MethodServer\deploy\bpm.ear\bpm.war\WEB-INF\lib\jaxrpc.jar\javax\xml\namespace\QName.class
> $DOCUMENTUM_SHARED\jboss5.1.0\server\DctmServer_MethodServer\deploy\bpm.ear\bpm.war\WEB-INF\lib\sibc.jms.jar\javax\xml\namespace\QName.class
> $DOCUMENTUM_SHARED\jboss5.1.0\server\DctmServer_MethodServer\deploy\bpm.ear\bpm.war\WEB-INF\lib\qname.jar\javax\xml\namespace\QName.class
> $DOCUMENTUM_SHARED\jboss5.1.0\lib\endorsed\stax-api.jar\javax\xml\namespace\QName.class
>
> as a result, I get the error in my custom module :
> java.lang.LinkageError: loader constraint violation: loader (instance of com/documentum/fc/client/impl/bof/classmgmt/URLClassLoaderEx) previously initiated loading for a different type with name "javax/xml/namespace/QName"
> How can I fixed that?
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 8 months
[JBoss JIRA] (DROOLS-322) Memory corruption using property reactivity in phreak
by Mario Fusco (JIRA)
[ https://issues.jboss.org/browse/DROOLS-322?page=com.atlassian.jira.plugin... ]
Mario Fusco resolved DROOLS-322.
--------------------------------
Fix Version/s: 6.0.1.Final
Resolution: Done
> Memory corruption using property reactivity in phreak
> -----------------------------------------------------
>
> Key: DROOLS-322
> URL: https://issues.jboss.org/browse/DROOLS-322
> Project: Drools
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Reporter: Mario Fusco
> Assignee: Mario Fusco
> Fix For: 6.0.1.Final
>
>
> This issue can be reproduced with the test case pasted below. Note that if you remove the @PropertyReactive annotation from the Hero class the test becomes green.
> More in detail the problem is caused by the fact that at some point, with property reactivity on, the method RuleNetworkEvaluator.doUpdatesReorderLeftMemory at line 802 tries to remove a leftTuple from an already empty memory causing the size to drop to -1 and then the memory corruption you found this morning.
> I believe that this is in turn caused by the fact that with property reactivity some updated staged left tuples are missing (because not propagated by the AlphaNode.modifyObject method at line 148) and this prevents the correct update of the memories.
> {code}
> @Test
> public void testWumpus() {
> String drl = "import org.drools.compiler.integrationtests.Misc2Test.Hero;\n" +
> "import org.drools.compiler.integrationtests.Misc2Test.StepForwardCommand;\n" +
> "import org.drools.compiler.integrationtests.Misc2Test.ChangeDirectionCommand;\n" +
> "\n" +
> "rule RotateLeft when\n" +
> " $h : Hero( goingRight == true )\n" +
> " $dc : ChangeDirectionCommand()\n" +
> "then\n" +
> " retract ( $dc ); \n" +
> " modify ( $h ) { setGoingRight( false ) };\n" +
> "end\n" +
> "\n" +
> "rule RotateRight when\n" +
> " $h : Hero( goingRight == false )\n" +
> " $dc : ChangeDirectionCommand()\n" +
> "then\n" +
> " retract ( $dc ); \n" +
> " modify ( $h ) { setGoingRight( true ) };\n" +
> "end\n" +
> "\n" +
> "rule StepLeft when\n" +
> " $h : Hero( goingRight == false )\n" +
> " $sc : StepForwardCommand()\n" +
> "then\n" +
> " retract ( $sc ); \n" +
> " modify ( $h ) { setPos( $h.getPos()-1 ) };\n" +
> "end\n" +
> "\n" +
> "rule StepRight when\n" +
> " $h : Hero( goingRight == true )\n" +
> " $sc : StepForwardCommand()\n" +
> "then\n" +
> " retract ( $sc );\n" +
> " modify ( $h ) { setPos( $h.getPos()+1 ) };\n" +
> "end\n";
> KnowledgeBuilderConfiguration kbConf = KnowledgeBuilderFactory.newKnowledgeBuilderConfiguration();
> KnowledgeBase kbase = loadKnowledgeBaseFromString( kbConf, drl );
> StatefulKnowledgeSession ksession = kbase.newStatefulKnowledgeSession();
> Hero hero = new Hero(1);
> ksession.insert(hero);
> ksession.fireAllRules();
> ksession.insert(new StepForwardCommand());
> ksession.fireAllRules();
> ksession.insert(new StepForwardCommand());
> ksession.fireAllRules();
> assertEquals(3, hero.getPos());
> ksession.insert(new ChangeDirectionCommand());
> ksession.fireAllRules();
> ksession.insert(new StepForwardCommand());
> ksession.fireAllRules();
> assertEquals(2, hero.getPos());
> }
> @PropertyReactive
> public static class Hero {
> private int pos = 1;
> private boolean goingRight = true;
> public Hero(int pos) {
> this.pos = pos;
> }
> public int getPos() {
> return pos;
> }
> public void setPos(int pos) {
> this.pos = pos;
> }
> public boolean isGoingRight() {
> return goingRight;
> }
> public void setGoingRight(boolean goingRight) {
> this.goingRight = goingRight;
> }
> }
> public static class ChangeDirectionCommand { }
> public static class StepForwardCommand { }
> {code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 8 months
[JBoss JIRA] (DROOLS-322) Memory corruption using property reactivity in phreak
by Mario Fusco (JIRA)
[ https://issues.jboss.org/browse/DROOLS-322?page=com.atlassian.jira.plugin... ]
Mario Fusco reassigned DROOLS-322:
----------------------------------
Assignee: Mario Fusco (was: Mark Proctor)
> Memory corruption using property reactivity in phreak
> -----------------------------------------------------
>
> Key: DROOLS-322
> URL: https://issues.jboss.org/browse/DROOLS-322
> Project: Drools
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Reporter: Mario Fusco
> Assignee: Mario Fusco
>
> This issue can be reproduced with the test case pasted below. Note that if you remove the @PropertyReactive annotation from the Hero class the test becomes green.
> More in detail the problem is caused by the fact that at some point, with property reactivity on, the method RuleNetworkEvaluator.doUpdatesReorderLeftMemory at line 802 tries to remove a leftTuple from an already empty memory causing the size to drop to -1 and then the memory corruption you found this morning.
> I believe that this is in turn caused by the fact that with property reactivity some updated staged left tuples are missing (because not propagated by the AlphaNode.modifyObject method at line 148) and this prevents the correct update of the memories.
> {code}
> @Test
> public void testWumpus() {
> String drl = "import org.drools.compiler.integrationtests.Misc2Test.Hero;\n" +
> "import org.drools.compiler.integrationtests.Misc2Test.StepForwardCommand;\n" +
> "import org.drools.compiler.integrationtests.Misc2Test.ChangeDirectionCommand;\n" +
> "\n" +
> "rule RotateLeft when\n" +
> " $h : Hero( goingRight == true )\n" +
> " $dc : ChangeDirectionCommand()\n" +
> "then\n" +
> " retract ( $dc ); \n" +
> " modify ( $h ) { setGoingRight( false ) };\n" +
> "end\n" +
> "\n" +
> "rule RotateRight when\n" +
> " $h : Hero( goingRight == false )\n" +
> " $dc : ChangeDirectionCommand()\n" +
> "then\n" +
> " retract ( $dc ); \n" +
> " modify ( $h ) { setGoingRight( true ) };\n" +
> "end\n" +
> "\n" +
> "rule StepLeft when\n" +
> " $h : Hero( goingRight == false )\n" +
> " $sc : StepForwardCommand()\n" +
> "then\n" +
> " retract ( $sc ); \n" +
> " modify ( $h ) { setPos( $h.getPos()-1 ) };\n" +
> "end\n" +
> "\n" +
> "rule StepRight when\n" +
> " $h : Hero( goingRight == true )\n" +
> " $sc : StepForwardCommand()\n" +
> "then\n" +
> " retract ( $sc );\n" +
> " modify ( $h ) { setPos( $h.getPos()+1 ) };\n" +
> "end\n";
> KnowledgeBuilderConfiguration kbConf = KnowledgeBuilderFactory.newKnowledgeBuilderConfiguration();
> KnowledgeBase kbase = loadKnowledgeBaseFromString( kbConf, drl );
> StatefulKnowledgeSession ksession = kbase.newStatefulKnowledgeSession();
> Hero hero = new Hero(1);
> ksession.insert(hero);
> ksession.fireAllRules();
> ksession.insert(new StepForwardCommand());
> ksession.fireAllRules();
> ksession.insert(new StepForwardCommand());
> ksession.fireAllRules();
> assertEquals(3, hero.getPos());
> ksession.insert(new ChangeDirectionCommand());
> ksession.fireAllRules();
> ksession.insert(new StepForwardCommand());
> ksession.fireAllRules();
> assertEquals(2, hero.getPos());
> }
> @PropertyReactive
> public static class Hero {
> private int pos = 1;
> private boolean goingRight = true;
> public Hero(int pos) {
> this.pos = pos;
> }
> public int getPos() {
> return pos;
> }
> public void setPos(int pos) {
> this.pos = pos;
> }
> public boolean isGoingRight() {
> return goingRight;
> }
> public void setGoingRight(boolean goingRight) {
> this.goingRight = goingRight;
> }
> }
> public static class ChangeDirectionCommand { }
> public static class StepForwardCommand { }
> {code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 8 months
[JBoss JIRA] (DROOLS-330) Rule Inheritance using Extends keyword fails when the Sub Rule Appears before the Super Rule
by Mario Fusco (JIRA)
[ https://issues.jboss.org/browse/DROOLS-330?page=com.atlassian.jira.plugin... ]
Mario Fusco resolved DROOLS-330.
--------------------------------
Fix Version/s: 5.5.1.Final
6.0.0.Final
Resolution: Done
> Rule Inheritance using Extends keyword fails when the Sub Rule Appears before the Super Rule
> --------------------------------------------------------------------------------------------
>
> Key: DROOLS-330
> URL: https://issues.jboss.org/browse/DROOLS-330
> Project: Drools
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Affects Versions: 5.5.0.Final
> Environment: Ubuntu 12.04 LTS in VM
> Reporter: Mike Fauzy
> Assignee: Mario Fusco
> Priority: Minor
> Fix For: 5.5.1.Final, 6.0.0.Final
>
>
> In Drools 5.5.0.Final the extends keyword allows one rule (SubRule) to extend another rule (SuperRule). SubRule should only fire if all of the conditions for SubRule and SuperRule are met.
> If SubRule is listed after SuperRule after in the .drl file, then it works correctly. However, if SubRule is listed before SuperRule in the .drl file, then only the SubRule's conditions need to be met for the rule to fire.
> A temporary workaround is to list all SubRules after the SuperRules.
> This might be related to: https://issues.jboss.org/browse/DROOLS-100
> To reproduce:
> I have a junit test packaged for Maven and Eclipse, but I don't see any place to add the file.
> Create 2 .drl files where rule "sub" extends rule "super". Setup a boolean that is true for the sub, but false for the super.
> In the first file, place the sub before the super. In the second file, reverse the two.
> Observe that the sub fires when it is in the file before the super, but not after. It should not fire either time.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 8 months
[JBoss JIRA] (DROOLS-330) Rule Inheritance using Extends keyword fails when the Sub Rule Appears before the Super Rule
by Mario Fusco (JIRA)
[ https://issues.jboss.org/browse/DROOLS-330?page=com.atlassian.jira.plugin... ]
Mario Fusco reassigned DROOLS-330:
----------------------------------
Assignee: Mario Fusco (was: Mark Proctor)
> Rule Inheritance using Extends keyword fails when the Sub Rule Appears before the Super Rule
> --------------------------------------------------------------------------------------------
>
> Key: DROOLS-330
> URL: https://issues.jboss.org/browse/DROOLS-330
> Project: Drools
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Affects Versions: 5.5.0.Final
> Environment: Ubuntu 12.04 LTS in VM
> Reporter: Mike Fauzy
> Assignee: Mario Fusco
> Priority: Minor
>
> In Drools 5.5.0.Final the extends keyword allows one rule (SubRule) to extend another rule (SuperRule). SubRule should only fire if all of the conditions for SubRule and SuperRule are met.
> If SubRule is listed after SuperRule after in the .drl file, then it works correctly. However, if SubRule is listed before SuperRule in the .drl file, then only the SubRule's conditions need to be met for the rule to fire.
> A temporary workaround is to list all SubRules after the SuperRules.
> This might be related to: https://issues.jboss.org/browse/DROOLS-100
> To reproduce:
> I have a junit test packaged for Maven and Eclipse, but I don't see any place to add the file.
> Create 2 .drl files where rule "sub" extends rule "super". Setup a boolean that is true for the sub, but false for the super.
> In the first file, place the sub before the super. In the second file, reverse the two.
> Observe that the sub fires when it is in the file before the super, but not after. It should not fire either time.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 8 months