I'm going to leave this here for others as I've spent an entire day tracking down this issue.
After lots of code changes, I began getting this error from what, was, very stable code.
WHERE afid=0x AND amid=0x;]; Key may not be empty
Notice that the afid and amid are unset, they should be hex SHA1's, which causes Cassandra to puke out the Key may not be empty
error.
As it turns out, this was caused by an upgrade to commons-codec from 1.11 to 1.15.
This may be what's causing your error as well, or it could be this:Cassandra InvalidQueryException: Key may not be empty
Good luck.