URL url = new URL(location);
Hi there,

I've been trying to deploy my app into tomcat.
It works fine for tomcat3.1, however, I got a
exception error, java.lang.NoSuchMethodError,
when deploying it into tomcat3.2.1. 
The exception occurrd in root.normalize() line.

Here is a piece of code that I was using,

            InputSource xmlInp = new
InputSource(url.openStream());

            DocumentBuilderFactory docBuilderFactory =
DocumentBuilderFactory.newInstance();
            DocumentBuilder parser =
docBuilderFactory.newDocumentBuilder();
            doc = parser.parse(xmlInp);
            Element root = doc.getDocumentElement();
            java.lang.reflect.Method[]
m=root.getClass().getDeclaredMethods();
            for (int i=0; i<m.length; i++)
              System.out.println("" + i + ":" + m[i]);
            root.normalize();   // exception occurs

The standard output of println statement is listed 
below.  normalize() method is listed in No.4.  
Why is tomcat complaining?
How do I overcome this?

 0:public java.lang.String
com.sun.xml.tree.ElementNode.toString()
 1:public void
com.sun.xml.tree.ElementNode.write(java.io.Writer)
throws java.io.IOException
 2:public void
com.sun.xml.tree.ElementNode.trimToSize()
 3:public org.w3c.dom.NamedNodeMap
com.sun.xml.tree.ElementNode.getAttributes()
 4:public void
com.sun.xml.tree.ElementNode.normalize()
 5:public java.lang.String
com.sun.xml.tree.ElementNode.getAttribute(java.lang.String,java.lang.String)
 6:public java.lang.String
com.sun.xml.tree.ElementNode.getAttribute(java.lang.String)
 7:public void
com.sun.xml.tree.ElementNode.setAttribute(java.lang.String,java.lang.String)
throws org.w3c.dom.DOMException
 8:public void
com.sun.xml.tree.ElementNode.removeAttribute(java.lang.String)
throws org.w3c.dom.DOMException
 9:public void
com.sun.xml.tree.ElementNode.setIdAttributeName(java.lang.String)
 10:public java.lang.String
com.sun.xml.tree.ElementNode.getIdAttributeName()
 11:public java.lang.String
com.sun.xml.tree.ElementNode.getPrefix()
 12:public void
com.sun.xml.tree.ElementNode.setPrefix(java.lang.String)
 13:public java.lang.String
com.sun.xml.tree.ElementNode.getNodeName()
 14:public org.w3c.dom.Node
com.sun.xml.tree.ElementNode.cloneNode(boolean)
 15:public short
com.sun.xml.tree.ElementNode.getNodeType()
 16:void
com.sun.xml.tree.ElementNode.setAttributes(com.sun.xml.tree.AttributeSet)
 17:public void
com.sun.xml.tree.ElementNode.setReadonly(boolean)
 18:protected void
com.sun.xml.tree.ElementNode.setTag(java.lang.String)
 19:public org.w3c.dom.Attr
com.sun.xml.tree.ElementNode.getAttributeNode(java.lang.String,java.lang.String)
 20:public org.w3c.dom.Attr
com.sun.xml.tree.ElementNode.getAttributeNode(java.lang.String)
 21:public void
com.sun.xml.tree.ElementNode.writeXml(com.sun.xml.tree.XmlWriteContext)
throws java.io.IOException
 22:void
com.sun.xml.tree.ElementNode.checkChildType(int)
throws org.w3c.dom.DOMException
 23:public java.lang.String
com.sun.xml.tree.ElementNode.getLocalName()
 24:public java.lang.String
com.sun.xml.tree.ElementNode.getNamespace()
 25:public java.lang.String
com.sun.xml.tree.ElementNode.getTagName()
 26:public java.lang.Object
com.sun.xml.tree.ElementNode.getUserObject()
 27:public org.w3c.dom.Attr
com.sun.xml.tree.ElementNode.removeAttributeNode(org.w3c.dom.Attr)
throws org.w3c.dom.DOMException
 28:public int
com.sun.xml.tree.ElementNode.removeWhiteSpaces(char[])
 29:public org.w3c.dom.Attr
com.sun.xml.tree.ElementNode.setAttributeNode(org.w3c.dom.Attr)
throws org.w3c.dom.DOMException
 30:public void
com.sun.xml.tree.ElementNode.setUserObject(java.lang.Object)

Thanks!

ct

__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail - only $35 
a year!  http://personal.mail.yahoo.com/

Reply via email to