There is a bug where, if you put a diamond sword in an anvil, with an enchanted book, in this case an unbreaking 3 one, it will show you the new enchanted diamond sword in the anvil, but once you take the sword out of the anvil and put it in your inventory, it will revert the sword back to its original form and give you the book back. Also, it will consume your experience until you log off and log back in. Is this known, or unknown. According to the Minecraft wiki, it should work in survival.
I just found out: It is due to too few levels experience: It displays "requires 13 levels" and it won't work with 13 But in my case with 16 levels it worked. Diamond sword Sharpness 5 + Looting 3 + Unbreaking 3 (book)
I think I may know what caused it... I think it dealt with our modification of repair cost, in that the client still received the cost and thinks it should be higher but the server allows lower, but then when the server charges less the client gets confused. However as of 2 days ago the update I rolled out changed it so that Repair cost on preexisting items is stripped off and will always be 0. So hopefully it should be resolved now. This is a fail on mojang because they duplicate the logic for determining repair cost so even if server changes it, client doesnt know :/ Heres hoping 1.5 fixes that so we can have more control over anvil costs.
It worked! I just SHIFT-CLICKED out of the anvil, and it worked. At the same time, when I just clicked and dragged, it didn't work.
I had the same problem. The anvil was asking for 16 levels. I tried it again with 19 xp levels, but it still didn't work. I tried again with 25 levels, and it worked, leaving me with 5 levels (meaning it charged 20 instead of 16). It seems like if you add on about 25% of the shown requirement, it should work.