"com/sun/org/apache/xerces/internal/dom/DocumentImpl"
I doubt very much that that is the correct package since the naming convention for packages would call for starting with either com.sun or org.apache.
Perhaps you have a mixture of old and new code - there have been a number of versions of xerces and of the
Java standard library XML packages.
Bill