do you know, either from the Exception message text itself or from a database request log what kind of error occurs, in case that there is some failing database request? As you stated, the query itself is correct and works.
looks like the received result stream contains some characters after the root element had been closed.
I suggest you create an issue with full description of used Tamino version, TAPI4J version, example program and database backup.