Exception trying to extract entities from metadata