You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@servicemix.apache.org by "Greg Lucas (JIRA)" <ji...@apache.org> on 2009/12/01 14:38:52 UTC

[jira] Created: (SMXCOMP-682) Drools component attempts to process message twice

Drools component attempts to process message twice
--------------------------------------------------

                 Key: SMXCOMP-682
                 URL: https://issues.apache.org/activemq/browse/SMXCOMP-682
             Project: ServiceMix Components
          Issue Type: Bug
          Components: servicemix-drools
            Reporter: Greg Lucas


The simple drools component in the loan-broker-bpel-example tries to process the incoming message exchange twice, resulting in an exception (see below). Running the example once produces the expected  result but with this error in the log; running it again fails. 

The stack trace below is from SMX 4.1 (see patch for SMX4-437 with updated README for running this). On SMX 3.3 the error is different but the underlying issue of the same exchange being dispatched back to the drools component is the same. 

01:44:51,794 | ERROR | -drools-thread-3 | DroolsComponent                  | icemix.common.AsyncBaseLifeCycle  480 | Error processing exchange org.apache.servicemix.jbi.runtime.impl.InOutImpl@61e285
org.drools.spi.ConsequenceException: javax.jbi.messaging.MessagingException: Out message already set
	at org.drools.base.DefaultConsequenceExceptionHandler.handleException(DefaultConsequenceExceptionHandler.java:13)
	at org.drools.common.DefaultAgenda.fireActivation(DefaultAgenda.java:558)
	at org.drools.common.DefaultAgenda.fireNextItem(DefaultAgenda.java:518)
	at org.drools.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:475)
	at org.drools.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:439)
	at org.apache.servicemix.drools.DroolsExecutionContext.start(DroolsExecutionContext.java:77)
	at org.apache.servicemix.drools.DroolsEndpoint.startDroolsExecutionContext(DroolsEndpoint.java:319)
	at org.apache.servicemix.drools.DroolsEndpoint.drools(DroolsEndpoint.java:276)
	at org.apache.servicemix.drools.DroolsEndpoint.handleProviderExchange(DroolsEndpoint.java:259)
	at org.apache.servicemix.drools.DroolsEndpoint.process(DroolsEndpoint.java:222)
	at org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLifeCycle.java:627)
	at org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBaseLifeCycle.java:581)
	at org.apache.servicemix.common.AsyncBaseLifeCycle.processExchangeInTx(AsyncBaseLifeCycle.java:478)
	at org.apache.servicemix.common.AsyncBaseLifeCycle$2.run(AsyncBaseLifeCycle.java:347)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
	at java.lang.Thread.run(Thread.java:619)
Caused by: javax.jbi.messaging.MessagingException: Out message already set
	at org.apache.servicemix.jbi.runtime.impl.MessageExchangeImpl.setOutMessage(MessageExchangeImpl.java:188)
	at org.apache.servicemix.jbi.runtime.impl.MessageExchangeImpl.setMessage(MessageExchangeImpl.java:152)
	at org.apache.servicemix.drools.model.JbiHelper.answer(JbiHelper.java:201)
	at org.apache.servicemix.drools.model.JbiHelper.answer(JbiHelper.java:188)
	at org.apache.servicemix.drools.Rule_CreditHistory_0.consequence(Rule_CreditHistory_0.java:7)
	at org.apache.servicemix.drools.Rule_CreditHistory_0ConsequenceInvoker.evaluate(Rule_CreditHistory_0ConsequenceInvoker.java:20)
	at org.drools.common.DefaultAgenda.fireActivation(DefaultAgenda.java:554)
	... 15 more


I've replaced the drools component with a camel component and the example runs fine, so this does not seem specific to BPEL. I'll see if I can come up with a simpler test case though. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (SMXCOMP-682) Drools component attempts to process message twice

Posted by "Greg Lucas (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/SMXCOMP-682?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Greg Lucas closed SMXCOMP-682.
------------------------------

    Resolution: Working as Designed

This is only an issue with the rules file for the loan-broker example. Drools will fire all the rules, so the LHS of each rule needs an additional condition to check if the exchange has already been handled. 

> Drools component attempts to process message twice
> --------------------------------------------------
>
>                 Key: SMXCOMP-682
>                 URL: https://issues.apache.org/activemq/browse/SMXCOMP-682
>             Project: ServiceMix Components
>          Issue Type: Bug
>          Components: servicemix-drools
>            Reporter: Greg Lucas
>
> The simple drools component in the loan-broker-bpel-example tries to process the incoming message exchange twice, resulting in an exception (see below). Running the example once produces the expected  result but with this error in the log; running it again fails. 
> The stack trace below is from SMX 4.1 (see patch for SMX4-437 with updated README for running this). On SMX 3.3 the error is different but the underlying issue of the same exchange being dispatched back to the drools component is the same. 
> 01:44:51,794 | ERROR | -drools-thread-3 | DroolsComponent                  | icemix.common.AsyncBaseLifeCycle  480 | Error processing exchange org.apache.servicemix.jbi.runtime.impl.InOutImpl@61e285
> org.drools.spi.ConsequenceException: javax.jbi.messaging.MessagingException: Out message already set
> 	at org.drools.base.DefaultConsequenceExceptionHandler.handleException(DefaultConsequenceExceptionHandler.java:13)
> 	at org.drools.common.DefaultAgenda.fireActivation(DefaultAgenda.java:558)
> 	at org.drools.common.DefaultAgenda.fireNextItem(DefaultAgenda.java:518)
> 	at org.drools.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:475)
> 	at org.drools.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:439)
> 	at org.apache.servicemix.drools.DroolsExecutionContext.start(DroolsExecutionContext.java:77)
> 	at org.apache.servicemix.drools.DroolsEndpoint.startDroolsExecutionContext(DroolsEndpoint.java:319)
> 	at org.apache.servicemix.drools.DroolsEndpoint.drools(DroolsEndpoint.java:276)
> 	at org.apache.servicemix.drools.DroolsEndpoint.handleProviderExchange(DroolsEndpoint.java:259)
> 	at org.apache.servicemix.drools.DroolsEndpoint.process(DroolsEndpoint.java:222)
> 	at org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLifeCycle.java:627)
> 	at org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBaseLifeCycle.java:581)
> 	at org.apache.servicemix.common.AsyncBaseLifeCycle.processExchangeInTx(AsyncBaseLifeCycle.java:478)
> 	at org.apache.servicemix.common.AsyncBaseLifeCycle$2.run(AsyncBaseLifeCycle.java:347)
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
> 	at java.lang.Thread.run(Thread.java:619)
> Caused by: javax.jbi.messaging.MessagingException: Out message already set
> 	at org.apache.servicemix.jbi.runtime.impl.MessageExchangeImpl.setOutMessage(MessageExchangeImpl.java:188)
> 	at org.apache.servicemix.jbi.runtime.impl.MessageExchangeImpl.setMessage(MessageExchangeImpl.java:152)
> 	at org.apache.servicemix.drools.model.JbiHelper.answer(JbiHelper.java:201)
> 	at org.apache.servicemix.drools.model.JbiHelper.answer(JbiHelper.java:188)
> 	at org.apache.servicemix.drools.Rule_CreditHistory_0.consequence(Rule_CreditHistory_0.java:7)
> 	at org.apache.servicemix.drools.Rule_CreditHistory_0ConsequenceInvoker.evaluate(Rule_CreditHistory_0ConsequenceInvoker.java:20)
> 	at org.drools.common.DefaultAgenda.fireActivation(DefaultAgenda.java:554)
> 	... 15 more
> I've replaced the drools component with a camel component and the example runs fine, so this does not seem specific to BPEL. I'll see if I can come up with a simpler test case though. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.