The doctrine of papal infallibility is an untruth. Only God is infallible. As for John Paul II’s kissing of the Koran, it was poor judgment. Since he made an error, he couldn’t be infallible. To say that he was is to put Him on the same level as God. That would be blasphemy.
Assuming you're a Christian, you're seriously mistaken. In fact, Christians believe that the human authors of scripture were inspired, which is a higher gift than infallibility. (Inspiration is the ability to say exactly what God wants said; infallibility the merely negative protection against saying what God does not want said.)
As for John Paul IIs kissing of the Koran, it was poor judgment. Since he made an error, he couldnt be infallible.
Infallibility only protects teaching (and only protects that when it meets certain specific conditions), not "judgement" or "setting a bad example". See Die Hard the Hunter's post for details.