when you receive encap failed message, this means that you do not have layer2 to layer3 mapping
for eg, if you have frame-relay network and if you do not have DLCIs mapped to layer3 or your frame switch does not have routes, you get the encap fail message.
So, going back to your problem, whatever you are trying to ping, your problem is ARP issue.
HTH
R/Yusuf