Just because something is written down, it doesn't mean its right. I've found errors in birth, marriage, death certs, parish registers, electoral rolls and even on gravestones!
As for your quandary - can you find a James who could be an alternative person, who has a child same name as the one on the marriage cert?
Could your John have been John James or James John? Or maybe the person filling in the marriage cert just misheard.
I've got a marriage cert where the groom has an unusual name. The registrar recorded it wrongly, but the groom signed correctly!