My theory ( swedish citizen) comes close to suppression of guilt and history. Racialbiology was a huge subject in europe during the early 20th century. This lead to a common belief that the "white" european was "superior" to other races. This also (depending on your view on history) caused WW2.
After WW2, Europe was pretty much left with the guilt of what had happened. Guilt turned into a tabu against anything that could be viewed as racist. Today we see rising crime stats, precieved threats to our own culture and naturally people start looking for the source of the issues, trying to find a scapegoat. The tabu comes into play since it is considered wrong to do anything that is percieved as racist. Breaking the tabu = a lot of attention and interest = a lot of press. Press starts painting up an image of a racist Europe, where it in most cases is only a small minority that is actually racist.
In a lot of European countries the fact that the older generations have never even come in contact with foreigners until today only serves to enhance the problem.
TL;DR Europe is generally not racist and the dislike for immigrants isn't nearly as wide-spred as the media makes it out to be.
(Horrible spelling can be attributed to being tired at the time of writing.)