VIllager won't switch jobs and wont let you trade when a job item (example: a lectern) isnt placed next to it.
The bug is demonstrated in the youtube video above or this video: https://www.youtube.com/watch?v=rJUZdeoktV4&feature=youtu.be
Related issues
duplicates
Comments

Duplicate of MC-154201

I got the same problem, it happens when you trade onece with the villager and the "trade hour" pased, the nex day I know that the villager get blocked beacause you already trade with him, but if you remove the working table it dosent lose the trades or the xp, but you can´t trade with him
This is normal villagers won't trade jobs at a certain time of day.