You cannot declare war through the diplomacy menu if you have any levies raised. It is also possible for a war to end inconclusively, which happens when the CB becomes invalid, the defender's liege title changes, the defender becomes unlanded, or (depending on the CB) the attacker dies. The CB used affects how warscore is calculated and determines the results of the three possible peace treaties: See also: Diplomatic actions#Declare war and Casus Belli