Vietnam hating China is understandable; after all, what is now North Vietnam was ruled by Chinese dynasties and/or warlords for more than a thousand years, which despite evidence to the contrary, their nationalist historians still paint as a long period of colonial oppression. Japan's time in Vietnam, like the US's and the French's, was a blink of an eye, by comparison.
It is a complex also shared by Korea, which is why the Koreans (like the Vietnamese) keep trying to paint Chinese history and/or culture as "not Chinese," just so they could avoid being seen as former Chinese subjects that could become so again. It's also why they fear Chinese hegemony much more than American hegemony - because in their mind, China could actually finish the job.
Whenever you see people with persistent dislike of China, it is almost always driven by self-interest. Back in the 1980s and 1990s, Japanese actually had positive sentiments towards China because they were investing heavily in China and saw it as the future of their economic empire. Then the Lost Decade hit and China started rising and taking their jobs/industries and the rest is history. The same is true of the US - the 2000s were the height of US-China relations because the US was certain of its hegemony and saw China as a giant money bag. Then the 2010s hit and the rest we all know about.