Mishkat al-Masabih 531, 532
Jabir said:
We went out on a journey, and one of our men was struck by a stone which wounded him in the head. He had a nocturnal emission and asked his companions whether they could find any permission for him to perform ablution with earth, but they replied that they could not when he was able to get water; so the man washed and died. When we came to the Prophet he was told about that and said, "Then killed him, God kill them! Why did they not ask when they did not know? The only cure for ignorance is to ask. It would have been enough for him to use earth and tie a rag over the sore, then wipe over it and wash the rest of his body." 

Abu Dawud transmitted it, and Ibn Majah transmitted it from ‘Ata’ b. Abu Rabah from Ibn ‘Abbas.
وَعَنْ جَابِرٍ قَالَ: خَرَجْنَا فِي سَفَرٍ فَأَصَابَ رجلا منا حجر فَشَجَّهُ فِي رَأسه ثمَّ احْتَلَمَ فَسَأَلَ أَصْحَابه فَقَالَ هَل تَجِدُونَ لي رخصَة فِي التَّيَمُّم فَقَالُوا مَا نجد لَك رخصَة وَأَنت تقدر على الْمَاءِ فَاغْتَسَلَ فَمَاتَ فَلَمَّا قَدِمْنَا عَلَى النَّبِيِّ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ أخبر بذلك فَقَالَ قَتَلُوهُ قَتلهمْ الله أَلا سَأَلُوا إِذْ لَمْ يَعْلَمُوا فَإِنَّمَا شِفَاءُ الْعِيِّ السُّؤَالُ إِنَّمَا كَانَ يَكْفِيهِ أَن يتَيَمَّم ويعصر أَو يعصب شكّ مُوسَى عَلَى جُرْحِهِ خِرْقَةً ثُمَّ يَمْسَحَ عَلَيْهَا وَيَغْسِلَ سَائِر جسده. رَوَاهُ أَبُو دَاوُد
وَرَوَاهُ ابْنُ مَاجَهْ عَنْ عَطَاءِ بْنِ أَبِي رَبَاح عَن ابْن عَبَّاس