In general, this is cause by not all operations in task service are enclosed in transaction (for instance queries - like in the exception above) and since they access blob data postgresql does not allow to do that not being part of transaction thus this error happens.
I opened jira for this so please keep an eye on it.
HTH