javax.xml.transform.TransformerException: 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.

Spring JIRA | Jeff Peterson | 9 years ago
  1. 0

    [SWS-275] NAMESPACE_ERR: An attempt is made to create or change an object in a way which is incorrect with regard to namespaces. - Spring JIRA

    spring.io | 12 months ago
    javax.xml.transform.TransformerException: 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.
  2. 0

    This error is the result of improper handing of namespaces and their prefixes. Specifically, when using the default namespace attribute "xmlns". For example: <soap:Envelope> <soap:Body> <foo xmlns="bar" /> </soap:Body> </soap:Envelope> The full stack trace is as follows: javax.xml.transform.TransformerException: 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 org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:501) at org.springframework.ws.server.endpoint.support.PayloadRootUtils.getPayloadRootQName(PayloadRootUtils.java:87) at org.springframework.ws.server.endpoint.mapping.PayloadRootQNameEndpointMapping.resolveQName(PayloadRootQNameEndpointMapping.java:57) at org.springframework.ws.server.endpoint.mapping.AbstractQNameEndpointMapping.getLookupKeyForMessage(AbstractQNameEndpointMapping.java:33) at org.springframework.ws.server.endpoint.mapping.AbstractMapBasedEndpointMapping.getEndpointInternal(AbstractMapBasedEndpointMapping.java:106) at org.springframework.ws.server.endpoint.mapping.AbstractEndpointMapping.getEndpoint(AbstractEndpointMapping.java:83) at org.springframework.ws.server.MessageDispatcher.getEndpoint(MessageDispatcher.java:242) at org.springframework.ws.server.MessageDispatcher.dispatch(MessageDispatcher.java:195) at org.springframework.ws.server.MessageDispatcher.receive(MessageDispatcher.java:162) at org.springframework.ws.transport.support.WebServiceMessageReceiverObjectSupport.handleConnection(WebServiceMessageReceiverObjectSupport.java:87) at org.springframework.ws.transport.http.WebServiceMessageReceiverHandlerAdapter.handle(WebServiceMessageReceiverHandlerAdapter.java:57) at org.springframework.ws.transport.http.MessageDispatcherServlet.doService(MessageDispatcherServlet.java:197) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:476) at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:441) at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1072) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:465) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:348) at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6981) at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321) at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121) at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3892) at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2766) at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:224) at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:183) Caused by: 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 org.apache.xml.utils.DOMBuilder.startElement(DOMBuilder.java:374) at org.apache.xalan.transformer.TransformerIdentityImpl.startElement(TransformerIdentityImpl.java:1072) at org.springframework.ws.soap.saaj.support.SaajXmlReader.handleElement(SaajXmlReader.java:140) at org.springframework.ws.soap.saaj.support.SaajXmlReader.handleNode(SaajXmlReader.java:123) at org.springframework.ws.soap.saaj.support.SaajXmlReader.parse(SaajXmlReader.java:115) at org.springframework.ws.soap.saaj.support.SaajXmlReader.parse(SaajXmlReader.java:96) at org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:484) ... 25 more Normally this error is associated with a buggy version of Xalan-J. In this case, however, it appears to be an error in org.springframework.ws.soap.saaj.support.SaajXmlReader. I have isolated the problem and will supply a patch.

    Spring JIRA | 9 years ago | Jeff Peterson
    javax.xml.transform.TransformerException: 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.
  3. 0

    This error is the result of improper handing of namespaces and their prefixes. Specifically, when using the default namespace attribute "xmlns". For example: <soap:Envelope> <soap:Body> <foo xmlns="bar" /> </soap:Body> </soap:Envelope> The full stack trace is as follows: javax.xml.transform.TransformerException: 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 org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:501) at org.springframework.ws.server.endpoint.support.PayloadRootUtils.getPayloadRootQName(PayloadRootUtils.java:87) at org.springframework.ws.server.endpoint.mapping.PayloadRootQNameEndpointMapping.resolveQName(PayloadRootQNameEndpointMapping.java:57) at org.springframework.ws.server.endpoint.mapping.AbstractQNameEndpointMapping.getLookupKeyForMessage(AbstractQNameEndpointMapping.java:33) at org.springframework.ws.server.endpoint.mapping.AbstractMapBasedEndpointMapping.getEndpointInternal(AbstractMapBasedEndpointMapping.java:106) at org.springframework.ws.server.endpoint.mapping.AbstractEndpointMapping.getEndpoint(AbstractEndpointMapping.java:83) at org.springframework.ws.server.MessageDispatcher.getEndpoint(MessageDispatcher.java:242) at org.springframework.ws.server.MessageDispatcher.dispatch(MessageDispatcher.java:195) at org.springframework.ws.server.MessageDispatcher.receive(MessageDispatcher.java:162) at org.springframework.ws.transport.support.WebServiceMessageReceiverObjectSupport.handleConnection(WebServiceMessageReceiverObjectSupport.java:87) at org.springframework.ws.transport.http.WebServiceMessageReceiverHandlerAdapter.handle(WebServiceMessageReceiverHandlerAdapter.java:57) at org.springframework.ws.transport.http.MessageDispatcherServlet.doService(MessageDispatcherServlet.java:197) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:476) at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:441) at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1072) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:465) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:348) at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6981) at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321) at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121) at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3892) at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2766) at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:224) at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:183) Caused by: 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 org.apache.xml.utils.DOMBuilder.startElement(DOMBuilder.java:374) at org.apache.xalan.transformer.TransformerIdentityImpl.startElement(TransformerIdentityImpl.java:1072) at org.springframework.ws.soap.saaj.support.SaajXmlReader.handleElement(SaajXmlReader.java:140) at org.springframework.ws.soap.saaj.support.SaajXmlReader.handleNode(SaajXmlReader.java:123) at org.springframework.ws.soap.saaj.support.SaajXmlReader.parse(SaajXmlReader.java:115) at org.springframework.ws.soap.saaj.support.SaajXmlReader.parse(SaajXmlReader.java:96) at org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:484) ... 25 more Normally this error is associated with a buggy version of Xalan-J. In this case, however, it appears to be an error in org.springframework.ws.soap.saaj.support.SaajXmlReader. I have isolated the problem and will supply a patch.

    Spring JIRA | 9 years ago | Jeff Peterson
    javax.xml.transform.TransformerException: 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.
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Unable To Create Message Factory For Soap: Provider Com.Sun.Xml.Messaging..

    wpthm.com | 1 year ago
    com.sun.xml.messaging.saaj.SOAPExceptionImpl: Unable to create envelope from given source:
  6. 0

    XMLA, Mondrian and JDK 6.0

    pentaho.com | 1 year ago
    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.

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. 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 org.apache.xml.utils.DOMBuilder.startElement()
    2. Xalan Java
      TransformerIdentityImpl.startElement
      1. org.apache.xml.utils.DOMBuilder.startElement(DOMBuilder.java:374)
      2. org.apache.xalan.transformer.TransformerIdentityImpl.startElement(TransformerIdentityImpl.java:1072)
      2 frames
    3. Spring WS Core
      SaajXmlReader.parse
      1. org.springframework.ws.soap.saaj.support.SaajXmlReader.handleElement(SaajXmlReader.java:140)
      2. org.springframework.ws.soap.saaj.support.SaajXmlReader.handleNode(SaajXmlReader.java:123)
      3. org.springframework.ws.soap.saaj.support.SaajXmlReader.parse(SaajXmlReader.java:115)
      4. org.springframework.ws.soap.saaj.support.SaajXmlReader.parse(SaajXmlReader.java:96)
      4 frames
    4. Xalan Java
      TransformerIdentityImpl.transform
      1. org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:484)
      1 frame
    5. Spring WS Core
      MessageDispatcherServlet.doService
      1. org.springframework.ws.server.endpoint.support.PayloadRootUtils.getPayloadRootQName(PayloadRootUtils.java:87)
      2. org.springframework.ws.server.endpoint.mapping.PayloadRootQNameEndpointMapping.resolveQName(PayloadRootQNameEndpointMapping.java:57)
      3. org.springframework.ws.server.endpoint.mapping.AbstractQNameEndpointMapping.getLookupKeyForMessage(AbstractQNameEndpointMapping.java:33)
      4. org.springframework.ws.server.endpoint.mapping.AbstractMapBasedEndpointMapping.getEndpointInternal(AbstractMapBasedEndpointMapping.java:106)
      5. org.springframework.ws.server.endpoint.mapping.AbstractEndpointMapping.getEndpoint(AbstractEndpointMapping.java:83)
      6. org.springframework.ws.server.MessageDispatcher.getEndpoint(MessageDispatcher.java:242)
      7. org.springframework.ws.server.MessageDispatcher.dispatch(MessageDispatcher.java:195)
      8. org.springframework.ws.server.MessageDispatcher.receive(MessageDispatcher.java:162)
      9. org.springframework.ws.transport.support.WebServiceMessageReceiverObjectSupport.handleConnection(WebServiceMessageReceiverObjectSupport.java:87)
      10. org.springframework.ws.transport.http.WebServiceMessageReceiverHandlerAdapter.handle(WebServiceMessageReceiverHandlerAdapter.java:57)
      11. org.springframework.ws.transport.http.MessageDispatcherServlet.doService(MessageDispatcherServlet.java:197)
      11 frames
    6. Spring MVC
      FrameworkServlet.doPost
      1. org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:476)
      2. org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:441)
      2 frames
    7. JavaServlet
      HttpServlet.service
      1. javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
      2. javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
      2 frames
    8. Atmosphere weblogic
      WebAppServletContext$ServletInvocationAction.run
      1. weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1072)
      2. weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:465)
      3. weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:348)
      4. weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6981)
      4 frames
    9. weblogic.security.acl
      AuthenticatedSubject.doAs
      1. weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
      1 frame
    10. weblogic.security.service
      SecurityManager.runAs
      1. weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
      1 frame
    11. Atmosphere weblogic
      ServletRequestImpl.execute
      1. weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3892)
      2. weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2766)
      2 frames
    12. weblogic.kernel
      ExecuteThread.run
      1. weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:224)
      2. weblogic.kernel.ExecuteThread.run(ExecuteThread.java:183)
      2 frames