F
flarosa
Hi,
I'm dealing with an unknown version of Tomcat running under JDK 1.6.
While I'm sure I can figure out what version of Tomcat I have,
altering it is not an option because I am a developer in a large
organization and the code I write must deploy correctly on many other
machines, all of which are running the same instance of Tomcat. I am
not able to change this environment.
I wrote some XML parsing code that uses the normal classes defined in
JDK 1.6, such as javax.xml.parsers.DocumentBuilderFactory, etc. When I
compile the code against JDK 1.6 it seems fine, but when I deploy it
to Tomcat I get java.lang.NoSuchMethod errors when calling functions
such as Node.getTextContent().
My guess is that the classpath in Tomcat contains some pre-JDK 1.4
definition of the javax.xml classes that don't conform to what I'm
compiling against. I have never done XML parsing with anything less
than JDK 1.4 or anything other than the interfaces provided by Sun in
the standard JDKs. So I have no idea what it is I'm dealing with here.
How can I change my source code in such a way that I get the JDK 1.6
classes instead of these old versions from Tomcat?
Thanks,
Frank
I'm dealing with an unknown version of Tomcat running under JDK 1.6.
While I'm sure I can figure out what version of Tomcat I have,
altering it is not an option because I am a developer in a large
organization and the code I write must deploy correctly on many other
machines, all of which are running the same instance of Tomcat. I am
not able to change this environment.
I wrote some XML parsing code that uses the normal classes defined in
JDK 1.6, such as javax.xml.parsers.DocumentBuilderFactory, etc. When I
compile the code against JDK 1.6 it seems fine, but when I deploy it
to Tomcat I get java.lang.NoSuchMethod errors when calling functions
such as Node.getTextContent().
My guess is that the classpath in Tomcat contains some pre-JDK 1.4
definition of the javax.xml classes that don't conform to what I'm
compiling against. I have never done XML parsing with anything less
than JDK 1.4 or anything other than the interfaces provided by Sun in
the standard JDKs. So I have no idea what it is I'm dealing with here.
How can I change my source code in such a way that I get the JDK 1.6
classes instead of these old versions from Tomcat?
Thanks,
Frank