This is why JHI are so loved by Turkish players: there have no Achillies' heel like other units. Missiles? They carry a large shield. Cavalry? Armour? They are armed with polearms. No armour? Their attack is high enough to deal with that. AP? They don't wear much armour so it has little effect.
So there is no obvious counter unit. But there are two things you can do:
1) Overwhelm them and grind them down. If you can sandwich them between two good units, they won't last as long. No unit would.
2) Grind them down from a distance: yes, they have large shields, but these only offer protection from the front. If you can get a unit at their back, they suddenly are much more vulnerable. Mounted archers and Jinnetes are especially suited for this due to their speed. Javelins and naptha work even better, but this requires a pinning unit, takes more time to get into position (and time is lives when you fight a powerful unit like JHI) and you should expect a lot of friendly casualities when using naphta.
I would recommend against using javelins when fighting a powerful unit like JHI. Unless you are fast, chances are that the pinning unit will flee before the javilineers get going. Using javelins or naphta without a pinning unit is a skill I do not posses.
Bookmarks