There seems to be a conflict between the apache::thrift namespace used in the generated code and the org::apache namespace when specified in the .thrift file. I noticed this when trying to compile a c++ client for Cassandra.
It seems that since the generated c++ files are in the org::apache namespace, when the compiler sees something like apache::thrift::protocol, it tries to look for org::apache::thrift::protocol. One fix for this would be to instead use ::apache::thrift in the generated code. Another fix would be to use org::apache::thrift as the thrift namespace.
I'm attaching a minimal example (most files taken from the tutorial) to demonstrate the issue. If you change the namespace in the .thrift file (as well as the using directives in the client and server), it will compile fine.