TOKYO — President Obama encountered setbacks to two of his most cherished foreign-policy projects on Thursday, as he failed to achieve a trade deal that undergirds his strategic pivot to Asia and the Middle East peace process suffered a potentially irreparable breakdown.

Mr. Obama had hoped to use his visit here to announce an agreement under which Japan would open its markets in rice, beef, poultry and pork, a critical step toward the Trans-Pacific Partnership, the proposed regional trade pact. But Prime Minister Shinzo Abe was not able to overcome entrenched resistance from Japan’s farmers in time for the president’s visit.

In Jerusalem, Israel’s announcement that it was suspending stalemated peace negotiations with the Palestinians, after a reconciliation between the Palestine Liberation Organization and the militant group Hamas, posed yet another obstacle to restarting a troubled peace process in which Secretary of State John Kerry has been greatly invested.

The setbacks, though worlds apart in geography and history, speak to the common challenge Mr. Obama has had in translating his ideas and ambitions into enduring policies. He has watched outside forces unravel his best-laid plans, from resetting relations with Russia to managing the epochal political change in the Arab world. On Thursday, as Russia staged military exercises on the border with Ukraine, Mr. Kerry denounced broken promises from the Kremlin but took no specific action.