updated Java and Scala examples to newest Thrift