Questions about compulsive disorders [licking, chasing lights etc] often come up with regards to Cavaliers.
Firstly get a vet to check the dog to make sure there is nothing else going on - they may need referral to a specialist to rule out conditions.
Usually distraction techniques are used to treat these conditions, extreme cases may require medication. This isn't something that will resolve overnight especially after a long period of time.
A trainer using positive, reward based techniques should be able to help.
Victoria Stilwell has produced a video about obsessive compulsive disorders
***SORRY I DIDN'T REALISE YOU WERE EXPECTED TO PAY TO WATCH THIS - BUT FOR THOSE WITH DOGS WITH ISSUES IT IS WORTH WATCHING***