Russo-Japanese War
To avoid war, Japan wanted to compromise with Russia even if it got the better deal.  Japan wanted more of Korea and China than it thought Russia would offer.  Japan decided to attack before the railway was ready to help Russia fight a war.