It will fail if one nation is attacking another. It would have worked against Hitler if the German people had revolted (I guess they did not because they believed in Hitler's ideas, few minority that did not could be got rid off). Nonviolence would not have worked if British people used it against Hitler.
Being shameable is not necessary (but is helpful). For example, the occupy movement in America, even though nonviolent is not successful because the companies (or the top 1%) are not losing anything. There is not enough critical mass to the movement to affect the profits (enough that they take notice).