When repairing weapons on anvil in Survival mode, you'll get the message "to expensive".
By switching to creative mode you will see the needed xp-Levels.
The Problem is that the Message "to expensive" will appear in survival mode, even if you have enough xp.
(Example in screenshots)
Fire Aspect II
others = same problem