It is very hard to answer this question without expressing a personal opinion, but i'll try my best.
The closest that the Israelis and the Palestinians ever got to reaching a permanent solution to their conflict was at the Camp David summit of 2000. Ehud Barak, the Israeli prime minister back then met with Yasser Arafat, the president of the Palestinian authority. Knowing that outbreak of violence is imminent, both paries felt that the success of this summit was critical. That is why both have gone an extra length to try and reach an agreement.
However, the negotiation has eventually ended in a deadblock. It seems that there were only two major issues that prevented the sides from reaching the final agreement.
The first issue is the sovereignty of jerusalem. The Palestinians have demanded full control over the eastern part of jerusalem, and mosty importantly the old-city (which is very sacred to all 3 major religions). It is rumored that the Israeli delegates might have been willing to make some compromises in eastern jerusalem, but they just couldn't agree to handing out the old city.
The second issue was the "Right of return". The Palestinians demanded that every arab that was driven out of his home during the wars since 1948 and on, should have a complete right to return to his old own. The Israelis couldn't agree to this, since it means that arabs will take over areas which are wildely populated by Israelis right. It seems that agreeing to such a demand would eventually lead to the cessation of Israel.
I believe that by making compromises about this two issues, both parties might be able to reach an agreement and permanently end violence.
The israelis need to realize that the easten parts of jerusalem, which are already mostly populated by arabs, should be a Palestinian territory. More painfully, both parties have to agree to give the old city of Jerusalem a special status. This part of the city should turn to a state-within-a-state, much like the Vattican. It should be an international territory control by an organization based on maintaining the current status-quo.
Secondly, the Palestinians have to abandon their hopes of the right of return and understand that Israel is here to stay. Palsetinian refugeed that were driven away from their homes should not be allowed to return to their old homes. However, they should recieve some other form of compensation. This would most likely be a monetary compensation, funded by the international community.
Tragically, it seems that both sides in this conflict are still in predominance not willing to these two compromises. This means that the violence will probably still retain in at least the near future.