Could you please be specific about what particular query fails. You may set TASK logging category in MWS to Debug, this should print out all queries being executed, so we should see it before an exception
Second, there are likely additional exceptions found in the MWS logs, those you have attached do not provide exact details on where it failed. If you can cleanly reproduce error, then attach portion of MWS logs starting from the very first exception observed + debug traces of query details.
I would like also to question on why from your CAF application (not sure if this is task application or just a general CAF app) you need to use PCTaskClient remote APIs to talk via web services to very same MWS where task engine is running. PCTaskClient is to be used by any external applications needed to access TE. From MWS app you can use embedeed and much more efficient APIs, like when you create Custom Task Inbox you may see its using TaskSearchContentProvider which exposes a functionally identical search interface.
#MWS-CAF-Task-Engine#webMethods#webMethods-BPMS