Officially, the longest war in history was between the Netherlands and the Isles of Scilly, which lasted from 1651 to 1986. There were no casualties.
That state of war probably never existed, and was basically just a quirky little myth.
The reason for the myth being started is kind of weird. During the British Civil Wars of the mid-seventeenth century, the Parliamentarian forces defeated the royalists. The Royal Navy, however, escaped, and made anchor at the Isles of Scilly, a small archipelago off the Cornish coast. The predominant landowner there was a Royalist, so they considered it to be a safe haven while the Stuart cause plotted its next move.
Although the Parliamentary forces lacked a powerful navy, they had allied with the Dutch Republic. The Dutch, possessing one of the strongest navies in Europe, would be more than a match for the royalist forces, and were at any rate eager to wipe out a potential rival for control of the seas. Since the Royal Navy couldn't do much about Parliamentary control of Great Britain, its commanders chose instead to launch a commerce-raiding campaign against Parliament's Dutch allies. This effort at
guerre de course came to an end in 1651 when Admiral Maarten Tromp led a Dutch armada to Scilly, seeking to eliminate the royalist threat.
Tromp supposedly declared war on the islands - and only the islands, because the rest of England was in Parliament's hands - but within a month, Parliamentary forces convinced the Scilly Royalists to surrender anyway. According to the myth, however, matters were never really settled with the Dutch, who simply went home without signing a peace treaty. The legend grew over the centuries, until the 1980s when local islander government staged a mock treaty-signing PR event with the Dutch ambassador to the UK in order to put the whole thing to rest. The islanders had sent the Dutch embassy an official request to see if the state of war was legit, and the embassy's staff apparently verified that it was.
Unfortunately for the tale of this 335 Year War, Tromp's initial declaration of war is dubious. It probably didn't happen: the evidence in favor is extremely scanty. And even if it did happen, Tromp had had no authorization from the Republic to actually declare war on Scilly. And even if Tromp's instructions had somehow included a declaration of war, a war against Scilly would be invalid because Scilly was not and has never been its own country. But failing all those requirements, a war between the Dutch and Scilly would have been terminated in 1654, after the First Anglo-Dutch War (allies fell out rather quickly in the seventeenth century), when the two countries signed their own peace treaty, and Scilly was covered under that treaty as part of England.
Or, as the British themselves would say: it's a load of bollocks.
The war became "official" because the Dutch embassy in London verified it in 1986, and the embassy was, to put it bluntly, wrong. Either embassy state knew they were wrong and wanted to stage a fun PR event, or they failed to apply proper historical rigor to the very scanty evidence.