There is no requirement that Oswald hate JFK in order to be the assassin of the President of the United States. Deranged people do not have to operate according to logic and reason. The big difference between the JFK assassination and other types of assassinations is that in this case the target came to the assassin rather than the assassin having to seek out the target. In the latter case, the assassin has to pick someone from everyone else in the world to target. So they may have some real or imagined grievance against that individual. In this case, however, the presidential motorcade came, by chance, directly by Oswald's place of work. Oswald would have assassinated Nixon, LBJ or anyone else if they had been President at that moment. It was not specific to JFK. As a result, any apparent lack of animosity to JFK himself is not particularly relevant to the act.