To be BARKING UP the wrong tree

To be BARKING UP the wrong ? tree
To be wrong about the reason for something or the way to achieve something:

Example:
Scientists in Switzerland realized that most other researchers had been barking up the wrong tree.

Perhaps you don't know this idiom yet. So add it to your collection on ProgLingo ?