That is an excellent point, Sander, and I will investigate the source files being used. I have however done my own unit testing with the same xml file on both environments and only one throws this exception. Could there be a pre-formatting process somewhere that is different?
And Jeff, I think you may be right in that in that I am also using a different version of Apache Axis on one of the boxes. It is also possible that it is creating the Element object from the SOAP request differnetly changing the structure, and possibly including white spaces. That may be a possibility? Thank you kindly, Matt > -----Original Message----- > From: Sander Bos [mailto:[EMAIL PROTECTED] > Sent: Thursday, August 07, 2003 12:51 AM > To: [EMAIL PROTECTED] > Subject: RE: ClassCastException > > > > Dear Matt, > > > ClassCastException: com.apache.xerces.dom.DeferredTextImpl > > > > when I try to cast a Node to an Element: > > > > Element elem = (Element)sourceElem.getFirstChild(); > > > > Now, I have xercesImpl.jar at the front of the classpath so > > no other class > > copy could be picked up instead. And I can't seem to get why > > this is so? > > Is there any other possible package that could cause this? > > Anyone have any > > thoughts? > > My 'any thoughts' are that it is probably not a classloading issue > (unless the issue is that a different Xerces is used), from the > exception I would say that sourceElem is definitely a Xerces node. It's > simply that sourceElem.getFirstChild is a text-node, not an element. Are > you sure sourceElem could not have text-nodes as children (whitespace/ > white space between elements can also produce a text node for instance)? > > Kind regards, > > --Sander. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
