I have a Spring enabled stand-alone app that creates XML documents and transforms them into KML. When I run the application using JRE 1.5, I receive a NullPointerException. If I use JRE 1.6 the program runs like a charm. Even is I use a JRE of 1.6 with a target of 1.5 it runs. Only when JRE is 1.5 does the program fail. A previous version runs on 1.5 OR 1.6 but isn't as Spring intensive.
The NullPointer comes when the XML is normalized or transformed (Taking normalize out just causes the transformer to throw the NullPointer).
Has anyone else had or heard of this type of problem?
I have debugged both versions, all attributes are identical up to the point of calling normalize() on the xml only one throws a NullPointer and one does not.
Nickolas Case wrote:I don't believe using a different DOM would matter.
Are you sure? Cause it sure looks like a bug in that "normalize()" method. A different DOM implementation (or a different JDK, which includes a different DOM implementation) would fix that.
Joined: Apr 26, 2008
I tried normalizeDocument() instead of normalize(). Nothing. I even removed normalize() from the code altogether. But my transformer threw the nullPointer instead. There is no normalize() in my transform.