I don't have any better ideas for solving the refugee problem than anybody else, but I think that it does reflect some fundamental aspects of human nature and the human condition. Borders are designed to keep others out, and they reflect conditions that existed long before nations or formal borders existed. The history of the human race is the history of cooperation in groups to compete against other groups, and that history has left us with instincts to help and instincts to exclude.
Groups and cultures resist dilution and replacement with other cultures. Those without any power to resist vanished long ago. Many Europeans, quite understandably, fear that the flood of refugees from the Middle East and Africa will not only be a drain on their resources but disruptive to their culture. Other Europeans, moved by the human tragedy the refugees face, are eager to help. Most, I would guess, have both these feelings in varying degrees.
Most of the refugees are fleeing war and civil chaos, though many are just looking to escape desperate poverty. Ideally, we would like to ameliorate the conditions that made them flee, but that's not one of the powers of our magic wand, or at least, not such an easy power. Europe might have the power, or at least be able to achieve the power, to impose a peace on Syria. Who would welcome that? At the least, it too would be a bloody business.
In my opinion, the ultimate driving force behind much of the refugee problem is overpopulation. Unlike any other time in history we (the human race collectively) have the technological means to achieve control of overpopulation in a relatively humane fashion. It does, however, require a profoundly disruptive cultural innovation: education and empowerment of women.