If you already have a jar containing the class, and you still get the class-not-found error, then you've got classloader confusion. That might mean that there's a jar in the common area of the servlet container which needs ElementTraversal, but you put the jar containing ElementTraversal into one of the web applications. Classloaders for the common area of the servlet container can't load classes from any of the web applications.
There's still the question of why there's such a jar in the common area; but maybe the problem is something else. You'll want to look at the stack trace to see what is looking for ElementTraversal. Is that class in a jar in your web app, or in a common jar somewhere? Start from there anyway.
(I would also advise looking at the servlet container. Everything you've said so far is about Maven and your
IDE, presupposing that we understand completely how they generate your web application. Well, I don't understand that and perhaps you don't either. My point is that you need to look at the failing component to diagnose the failure, rather than looking at the tools used to generate the failing component.)
And if it were me I wouldn't include Xerces in my application at all. The code you posted works with the standard
Java API and doesn't require additional XML packages; providing the additional XML packages in your web app may be the source of the classloader confusion.