Here's an excellent explanation from another Java forum:

java - StreamCorruptedException: invalid type code: AC - Stack Overflow