Hi Antonis,
What is the release of your PI system? What is the Patch Level of XI_AF and MESSAGING components? I'd suggest you to patch both to the highest patch level that corresponds to your release and SP level.
For 6.40, please check out Note 863930 and 881308.
Best regards,
Bálint