Of course, there are counter-arguments to each of these examples, but that's kind of the point: trade and war don't happen on a random basis, so which one is causing or preventing the other is hard to say. Nations that expect to go to war soon, start looking for other trading partners. It doesn't mean that continuing the trade would have kept the war from happening, it just means wars are usually preceded by a period of rising animosity short of war.
Plus, the Ukraine's decision to pursue EU membership did not lead to a reduction of the threat of war in the Ukraine. Quite the opposite, actually.