java.lang.IllegalStateException: Only owner thread can write to message: Thread[[enricher-issue-bug].HTTP_Listener_Configuration.worker.01,5,main]/Thread[[enricher-issue-bug].enricher-issue.01,5,main]

MuleSoft JIRA | Evangelina Martinez Ruiz Moreno | 2 years ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    If the flow is configured with non-blocking processing strategy, when making a request inside an enricher an access violation Exception is thrown when the enricher tries to write the result in the target . {panel} ERROR 2015-09-24 14:07:10,765 [[enricher-issue-bug].enricher-issue.01] org.mule.exception.DefaultMessagingExceptionStrategy: ******************************************************************************** Message : Execution of the expression "flowVars['response']=__object_for_enrichment" failed. (org.mule.api.expression.ExpressionRuntimeException). Message payload is of type: BufferInputStream Code : MULE_ERROR--2 -------------------------------------------------------------------------------- Exception stack is: 1. Only owner thread can write to message: Thread[[enricher-issue-bug].HTTP_Listener_Configuration.worker.01,5,main]/Thread[[enricher-issue-bug].enricher-issue.01,5,main] (java.lang.IllegalStateException) org.mule.DefaultMuleMessage:1781 (null) 2. Execution of the expression "flowVars['response']=__object_for_enrichment" failed. (org.mule.api.expression.ExpressionRuntimeException) org.mule.el.mvel.MVELExpressionLanguage:232 (http://www.mulesoft.org/docs/site/current3/apidocs/org/mule/api/expression/ExpressionRuntimeException.html) 3. Execution of the expression "flowVars['response']=__object_for_enrichment" failed. (org.mule.api.expression.ExpressionRuntimeException). Message payload is of type: BufferInputStream (org.mule.api.MessagingException) org.mule.processor.NonBlockingProcessorExecutor$NonBlockingProcessorExecutorReplyToHandler:122 (http://www.mulesoft.org/docs/site/current3/apidocs/org/mule/api/MessagingException.html) -------------------------------------------------------------------------------- Root Exception stack trace: java.lang.IllegalStateException: Only owner thread can write to message: Thread[[enricher-issue-bug].HTTP_Listener_Configuration.worker.01,5,main]/Thread[[enricher-issue-bug].enricher-issue.01,5,main] at org.mule.DefaultMuleMessage.newException(DefaultMuleMessage.java:1781) at org.mule.DefaultMuleMessage.checkMutable(DefaultMuleMessage.java:1767) at org.mule.DefaultMuleMessage.assertAccess(DefaultMuleMessage.java:1696) + 3 more (set debug level logging or '-Dmule.verbose.exceptions=true' for everything) ******************************************************************************** {panel} Attaching app to reproduce and logs

    MuleSoft JIRA | 2 years ago | Evangelina Martinez Ruiz Moreno
    java.lang.IllegalStateException: Only owner thread can write to message: Thread[[enricher-issue-bug].HTTP_Listener_Configuration.worker.01,5,main]/Thread[[enricher-issue-bug].enricher-issue.01,5,main]
  2. 0

    If the flow is configured with non-blocking processing strategy, when making a request inside an enricher an access violation Exception is thrown when the enricher tries to write the result in the target . {panel} ERROR 2015-09-24 14:07:10,765 [[enricher-issue-bug].enricher-issue.01] org.mule.exception.DefaultMessagingExceptionStrategy: ******************************************************************************** Message : Execution of the expression "flowVars['response']=__object_for_enrichment" failed. (org.mule.api.expression.ExpressionRuntimeException). Message payload is of type: BufferInputStream Code : MULE_ERROR--2 -------------------------------------------------------------------------------- Exception stack is: 1. Only owner thread can write to message: Thread[[enricher-issue-bug].HTTP_Listener_Configuration.worker.01,5,main]/Thread[[enricher-issue-bug].enricher-issue.01,5,main] (java.lang.IllegalStateException) org.mule.DefaultMuleMessage:1781 (null) 2. Execution of the expression "flowVars['response']=__object_for_enrichment" failed. (org.mule.api.expression.ExpressionRuntimeException) org.mule.el.mvel.MVELExpressionLanguage:232 (http://www.mulesoft.org/docs/site/current3/apidocs/org/mule/api/expression/ExpressionRuntimeException.html) 3. Execution of the expression "flowVars['response']=__object_for_enrichment" failed. (org.mule.api.expression.ExpressionRuntimeException). Message payload is of type: BufferInputStream (org.mule.api.MessagingException) org.mule.processor.NonBlockingProcessorExecutor$NonBlockingProcessorExecutorReplyToHandler:122 (http://www.mulesoft.org/docs/site/current3/apidocs/org/mule/api/MessagingException.html) -------------------------------------------------------------------------------- Root Exception stack trace: java.lang.IllegalStateException: Only owner thread can write to message: Thread[[enricher-issue-bug].HTTP_Listener_Configuration.worker.01,5,main]/Thread[[enricher-issue-bug].enricher-issue.01,5,main] at org.mule.DefaultMuleMessage.newException(DefaultMuleMessage.java:1781) at org.mule.DefaultMuleMessage.checkMutable(DefaultMuleMessage.java:1767) at org.mule.DefaultMuleMessage.assertAccess(DefaultMuleMessage.java:1696) + 3 more (set debug level logging or '-Dmule.verbose.exceptions=true' for everything) ******************************************************************************** {panel} Attaching app to reproduce and logs

    MuleSoft JIRA | 2 years ago | Evangelina Martinez Ruiz Moreno
    java.lang.IllegalStateException: Only owner thread can write to message: Thread[[enricher-issue-bug].HTTP_Listener_Configuration.worker.01,5,main]/Thread[[enricher-issue-bug].enricher-issue.01,5,main]

    Root Cause Analysis

    1. java.lang.IllegalStateException

      Only owner thread can write to message: Thread[[enricher-issue-bug].HTTP_Listener_Configuration.worker.01,5,main]/Thread[[enricher-issue-bug].enricher-issue.01,5,main]

      at org.mule.DefaultMuleMessage.newException()
    2. Mule Core
      DefaultMuleMessage.assertAccess
      1. org.mule.DefaultMuleMessage.newException(DefaultMuleMessage.java:1781)
      2. org.mule.DefaultMuleMessage.checkMutable(DefaultMuleMessage.java:1767)
      3. org.mule.DefaultMuleMessage.assertAccess(DefaultMuleMessage.java:1696)
      3 frames