He ran for President of the United States twice , in 2004 and 2008 , but was defeated by John Kerry and Barack Obama in the Primaries . He was also chosen to be the Democratic candidate for Vice-President in 2004 , but was defeated by Dick Cheney . He was the Democratic nominee for Vice President in 2004 , and was a candidate for the Democratic presidential nomination in 2004 and 2008 .