Details

    • Type: Improvement Improvement
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: current
    • Fix Version/s: milestone 1
    • Component/s: www
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: All

    • Issuezilla Id:
      35

      Description

      When someone fails to create a right attribute, JAXP fails with error messages
      like this:

      Exception in thread "main" org.w3c.dom.DOMException: NAMESPACE_ERR: An attempt
      is made to create or change an object in a way which is incorrect with regard to
      namespaces.
      at
      com.sun.org.apache.xerces.internal.dom.CoreDocumentImpl.checkNamespaceWF(CoreDocumentImpl.java:2388)
      at
      com.sun.org.apache.xerces.internal.dom.AttrNSImpl.setName(AttrNSImpl.java:126)
      at
      com.sun.org.apache.xerces.internal.dom.AttrNSImpl.<init>(AttrNSImpl.java:111)
      at
      com.sun.org.apache.xerces.internal.dom.CoreDocumentImpl.createAttributeNS(CoreDocumentImpl.java:2012)
      at
      com.sun.org.apache.xerces.internal.dom.ElementImpl.setAttributeNS(ElementImpl.java:684)
      at
      com.sun.org.apache.xalan.internal.xsltc.trax.SAX2DOM.startElement(SAX2DOM.java:134)
      at
      com.sun.org.apache.xml.internal.serializer.ToXMLSAXHandler.closeStartTag(ToXMLSAXHandler.java:205)
      at
      com.sun.org.apache.xml.internal.serializer.ToXMLSAXHandler.characters(ToXMLSAXHandler.java:524)
      at
      com.sun.org.apache.xalan.internal.xsltc.trax.TransformerHandlerImpl.characters(TransformerHandlerImpl.java:168)
      at
      com.sun.xml.bind.v2.runtime.unmarshaller.DomLoader.text(DomLoader.java:102)
      at
      com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext.text(UnmarshallingContext.java:415)
      at
      com.sun.xml.bind.v2.runtime.unmarshaller.InterningXmlVisitor.text(InterningXmlVisitor.java:53)
      at
      com.sun.xml.bind.v2.runtime.unmarshaller.StAXStreamConnector.processText(StAXStreamConnector.java:330)
      at
      com.sun.xml.bind.v2.runtime.unmarshaller.StAXStreamConnector.handleEndElement(StAXStreamConnector.java:208)
      at
      com.sun.xml.bind.v2.runtime.unmarshaller.StAXStreamConnector.bridge(StAXStreamConnector.java:177)
      at
      com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:333)
      at
      com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:305)
      at
      com.sun.xml.ws.mex.client.MetadataClient.createMetadata(MetadataClient.java:278)
      at mexinterop.client.MexInteropClient.main(MexInteropClient.java:112)
      Java Result: 1

      We really need the error message to contain more information to assist the
      developer how to go about fixing the problem. For example, it could have said:

      (localName="xyz", uri="foobar", qname="abc:def:ghi")

      which now has enough information, that is, the qname is wrong.

        Activity

        There are no comments yet on this issue.

          People

          • Assignee:
            jaxp-issues
            Reporter:
            kohsuke
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated: