Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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. #80

Closed
tan9 opened this issue Sep 13, 2023 · 0 comments · Fixed by #81

Comments

@tan9
Copy link
Contributor

tan9 commented Sep 13, 2023

When woodstox was in the classpath (or deployed to JBoss EAP application server), SDOS encountered an issue outputting attributes with namespaces, such as "office:version".

Here's the complete exception stack trace:

Tests run: 185, Failures: 5, Errors: 0, Skipped: 0, Time elapsed: 6.205 sec <<< FAILURE!
testWriteBoolean(com.github.miachm.sods.OfficeValueTypeTest)  Time elapsed: 0.565 sec  <<< FAILURE!
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.checkDOMNSErr(CoreDocumentImpl.java:2546)
	at com.sun.org.apache.xerces.internal.dom.AttrNSImpl.setName(AttrNSImpl.java:117)
	at com.sun.org.apache.xerces.internal.dom.AttrNSImpl.<init>(AttrNSImpl.java:78)
	at com.sun.org.apache.xerces.internal.dom.CoreDocumentImpl.createAttributeNS(CoreDocumentImpl.java:2163)
	at com.sun.org.apache.xerces.internal.dom.ElementImpl.setAttributeNS(ElementImpl.java:659)
	at com.ctc.wstx.dom.DOMOutputElement.addAttribute(DOMOutputElement.java:210)
	at com.ctc.wstx.dom.WstxDOMWrappingWriter.outputAttribute(WstxDOMWrappingWriter.java:561)
	at com.ctc.wstx.dom.WstxDOMWrappingWriter.writeAttribute(WstxDOMWrappingWriter.java:251)
	at com.github.miachm.sods.OfficeValueType$1.write(OfficeValueType.java:41)
	at com.github.miachm.sods.OfficeValueTypeTest.lambda$assertWrite$0(OfficeValueTypeTest.java:217)
	at com.github.miachm.sods.OfficeValueTypeTest$NodeAssert.of(OfficeValueTypeTest.java:286)
	at com.github.miachm.sods.OfficeValueTypeTest.assertWrite(OfficeValueTypeTest.java:214)
	at com.github.miachm.sods.OfficeValueTypeTest.testWriteBoolean(OfficeValueTypeTest.java:60)

Refer to https://github.com/miachm/SODS/pull/78/checks

miachm added a commit that referenced this issue Sep 13, 2023
…ctly

Fixes #80 Handle XML with namespaces correctly.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant