It is a familiar situation for Barry, who was wanted by Liverpool two summers ago only to see the move blocked by O'Neill, before finally moving to Eastlands a year later.
"My advice to him would be to try to get the situation sorted as quickly as possible," Barry told the Daily Mail.
"Mentally, it is tough to deal with and it does mess with your brain.
"As soon as I had made my mind up that it was not going to happen, and committed to playing for Villa again, my mind stopped wandering elsewhere.
"My advice is for him to speak to Martin O'Neill to try to get the situation cleared and then he can concentrate on what needs to be done for the season. He has got a long career ahead of him.
"It's exactly the same situation as the one I was in. It is hard to say that Martin O'Neill or Villa are doing anything wrong.
"They have put a valuation on James and if it is not being met they are within their rights to turn offers down. But it is tough for the player."