The crux of this question is how you define a 'war'. I personally think of a sustained and continuous military conflict between two factions which is decisively concluded by military victory - a bit of a windy definition I know, but the best I can think of right now
The Hundred Years War falls outside this definition because over the long century in question, there were three separate but related conflicts between Britain and France, with periods of up to 25 years peace in between. The Eighty Years War between the Spanish Netherlands and Spain was similarly disjointed. I must admit though, I'm not entirely sure what the longest war is by my own definition