4

I'm pretty new to MuleESB. I'm using Mule Standalone 3.8.1 with a configuration to filter HTTP requests using the xpath3() function. The configuration I have used is as follows.

<http:listener-config name="HTTP_Listener_Configuration" host="localhost" port="8081" />
<http:request-config name="HTTP_Request_Configuration" host="example.com" port="8081" basePath="basePath" responseTimeout="120000" />

<custom-transformer name="XML_Transformer" class="org.mule.module.xml.transformer.XmlToOutputHandler"/>

<message-properties-transformer name="Response_Error_Transformer">
  <add-message-property key="http.status" value="500"/>
  <add-message-property key="Content-Type" value="text/xml" />
</message-properties-transformer>

<message-properties-transformer name="Response_Transformer">
  <add-message-property key="Content-Type" value="text/xml" />
</message-properties-transformer>

<set-payload name="Create_Error_Response" value="
  &lt;PurchaseOrder PurchaseOrderNumber=&quot;99503&quot; OrderDate=&quot;1999-10-20&quot;&gt;
    &lt;fault&gt;
      &lt;code&gt;500&lt;/code&gt;
      &lt;message&gt;#[flowVars['errorMessage']]&lt;/message&gt;
    &lt;/fault&gt;
  &lt;/PurchaseOrder&gt;" />

<flow name="Choice_Flow">
  <http:listener config-ref="HTTP_Listener_Configuration" path="productFilter" />
  <choice>
    <when expression="#[xpath3('//Item[1]/ProductName') == 'Laptop']">
      <transformer ref="XML_Transformer"/>
      <http:request config-ref="HTTP_Request_Configuration" path="EchoService" method="POST" />
      <flow-ref name="Response_Transformer" />
    </when>

    <otherwise>
      <flow-ref name="Response_Error_Transformer" />
      <set-variable variableName="errorMessage" value="First item must be a Laptop" />
      <flow-ref name="Create_Error_Response" />
    </otherwise>
  </choice>
</flow>

When I'm sending HTTP requests at 10 threads it's working fine. But, then when I tried sending requests at 500 threads, some of the requests got failed. The request is an XML with 2500 Item elements. I don't see any descriptive errors in the logs or anywhere, but the requests got failed. After this happens, some of the requests got failed even for small thread numbers, and I couldn't find any error in files in the logs directory. Only error I see in the mule.log file is as follows. This is written at the first occurrence of this error. Then, simply, nothing.

Exception: java.lang.NoClassDefFoundError thrown from the UncaughtExceptionHandler in thread "[default].http.listener(6)"

Can someone please explain me what's going on here? How to do this without any error? Is something wrong with my configuration?

P. Smith
  • 41
  • 3
  • The error message is incomplete. You should show more lines for it. For example the name of the missing class should be visible. – aled Jul 10 '19 at 00:32

0 Answers0