-
Couldn't load subscription status.
- Fork 38.8k
Closed
Closed
Copy link
Labels
in: dataIssues in data modules (jdbc, orm, oxm, tx)Issues in data modules (jdbc, orm, oxm, tx)type: bugA general bugA general bug
Milestone
Description
Archie Cobbs opened SPR-7257 and commented
If you try to marshall an object into a DOMResult that was created with the DOMResult() no-arg constructor, you get this:
java.lang.IllegalArgumentException: DOMResult does not contain Node
at org.springframework.util.Assert.notNull(Assert.java:112)
at org.springframework.oxm.support.AbstractMarshaller.marshalDomResult(AbstractMarshaller.java:192)
at org.springframework.oxm.support.AbstractMarshaller.marshal(AbstractMarshaller.java:93)
But why? The Javadoc for DOMResult states:
If no output DOM source is set, the transformation will create a Document node as the holder for the result of the transformation, which may be retrieved with getNode().
So this check is in violation of the DOM API. In any case, I can't create the node because I don't know what the document element is going to be (in general, only the marshaller knows that).
Affects: 3.0.2
Referenced from: commits f72c431
Metadata
Metadata
Assignees
Labels
in: dataIssues in data modules (jdbc, orm, oxm, tx)Issues in data modules (jdbc, orm, oxm, tx)type: bugA general bugA general bug