The majority of WW2 ordinance contained TNT or a mixture of TNT and another stable explosive (to conserve TNT due to its high war time demand). TNT is only reliably detonated with another explosive.
Army tests showed that TNT (no casing) struck by a rifle bullet would only detonate 4% of the time, and that when dropped in a bomb casing without a primer from 4,000 ft on to concrete, it would only detonate 8% of the time.
As hornet pointed out, conditions would have to be just right to penetrate the shell casing, to get to the ordinance canister. Then, enough engergy would have to be imparted to the main charge to cause a detonation. It's not impossible, but it would be an unlikely freak occurance.