-2

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.

cyberthreat
  • 179
  • 13
  • 1
    Which driver are you using and which version? Could you also post the schema + minimal code that replicates the problem? Cheers! – Erick Ramirez Feb 19 '21 at 21:21
  • This doesn't look like a question. You may want to convert this in to a question and an answer. – geocodezip Feb 19 '21 at 21:24
  • This is OBVIOUSLY NOT a question and had you READ the post you can clearly see that I'm just leaving evidence for someone else to find when they google search for an answer, for hours, as I did. Thanks for the downvote! :( That's what I get for trying to help. – cyberthreat Feb 20 '21 at 03:30

1 Answers1

0

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

Dharman
  • 30,962
  • 25
  • 85
  • 135
cyberthreat
  • 179
  • 13