Often you will find with bioinformatic tools, is that the output from one tool may not be compatible with another. If you are having this problem there is a good chance someone else has also encountered the same thing. For class, we incorporated Picard tools (which is part of the GATK pipeline) and found that the output from bwa was offensive in cases where the read was unmapped (based on flags) but the MAPQ not set to zero.
ERROR: Record 643, Read name FCC1LGYACXX:3:1314:10126:29246, MAPQ should be 0 for unmapped read
Searching through the GATK forums, I found that this was an issue specific to bwa:
"Ultimately, this is a BWA issue - it's the program generating the offending alignments. But this particular error is pretty inoffensive - as long as the unmapped flag is set, the MAPQ is unimportant to just about any program out there. So in my view, using LENIENT validation in Picard to avoid this issue is okay (I don't believe GATK cares about this error)"