Was the invasion of Iraq was an unjust war? One could claim that bad intelligence from the CIA misled the administration. If you believe it is a just war, maybe you should have known better, but you committed no offense other than incompetence.
Yet even if you make this argument, Paul Wolfowitz admitted the real reason for the war (see below), which you may agree violates point 3 of the doctrine of just war (see below).
http://www.defenselink.mil/transcripts/2003/tr20030509-depsecdef0223.html
Paul Wolfowitz, "The truth is that for reasons that have a lot to do with the U.S. government bureaucracy we settled on the one issue that everyone could agree on which was weapons of mass destruction as the core reason ...".
What then was the real reason for the war in Iraq? Connections between Saddam Hussein and Al Queda? "[The] issue about links to terrorism is the one about which there's the most disagreement within the bureaucracy...".
Saddam's abuse of his own people? "[This] is a reason to help the Iraqis but it's not a reason to put American kids' lives at risk, certainly not on the scale we did it".
The real reason, "...it undoubtedly was true that if we could make progress on the Israeli-Palestinian issue we would provide a better set of circumstances to deal with Saddam Hussein, but that it was equally true the other way around that if we could deal with Saddam Hussein it would provide a better set of circumstances for dealing with the Arab-Israeli issue."
http://www.mtholyoke.edu/acad/intrel/pol116/justwar.htm
Principles of the Just War
1) A just war can only be waged as a last resort. All non-violent options must be exhausted before the use of force can be justified.
2) A war is just only if it is waged by a legitimate authority. Even just causes cannot be served by actions taken by individuals or groups who do not constitute an authority sanctioned by whatever the society and outsiders to the society deem legitimate.
3) A just war can only be fought to redress a wrong suffered. For example, self-defense against an armed attack is always considered to be a just cause (although the justice of the cause is not sufficient--see point #4). Further, a just war can only be fought with "right" intentions: the only permissible objective of a just war is to redress the injury.
4) A war can only be just if it is fought with a reasonable chance of success. Deaths and injury incurred in a hopeless cause are not morally justifiable.
5) The ultimate goal of a just war is to re-establish peace. More specifically, the peace established after the war must be preferable to the peace that would have prevailed if the war had not been fought.
6) The violence used in the war must be proportional to the injury suffered. States are prohibited from using force not necessary to attain the limited objective of addressing the injury suffered.
7) The weapons used in war must discriminate between combatants and non-combatants. Civilians are never permissible targets of war, and every effort must be taken to avoid killing civilians. The deaths of civilians are justified only if they are unavoidable victims of a deliberate attack on a military target.