Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 3.2.2 (EE only)
-
Fix Version/s: 3.1.4 (EE only), 3.2.3 (EE only), 3.3.1
-
Component/s: Transport: TCP / UDP / SSL / Multicast
-
Labels:
-
User impact:High
-
Configuration:
-
Log Output:
-
Similar Issues:None
Description
Scenario: Mule application with outbound TCP endpoint (client) and Mule application with inbound TCP endpoint (server). The TCP connector is configured as follows at both ends.
<tcp:connector name="tcpConnector" validateConnections="false">
<tcp:safe-protocol payloadOnly="false" />
</tcp:connector>
Note that payloadOnly="false". When a message is received by the TCP inbound endpoint, Mule throws an exception stating that the Mule Context must not be null. When payloadOnly is set to false, the receiving program expects an entire Mule Message. In the class TransformerPairWireFormat, Mule creates a Transformer called inboundTransformer which is called to effect this transformation. It seems as though this transformer is not being initialised properly. In fact when the execution of the stack trace passes through this class, the Mule Context of the inboundTransformer is already null. This causes the exception further down the stack trace.
Note that in MuleMessageWorker, doWrite calls wireFormat.setMuleContext(RequestContext.getEvent().getMuleContext())
but doRead does not. This is why the initialisation of TransformerPairWireFormat is failing. Moreover, one cannot simply add this line to doRead() as there is no event in play while it is executing.