JiBX

UTF-8 custom writers produce NPE

Details

  • Type: Bug Bug
  • Status: Open Open
  • Priority: Blocker Blocker
  • Resolution: Unresolved
  • Affects Version/s: JiBX 1.2.2
  • Fix Version/s: None
  • Component/s: core
  • Labels:
    None
  • Number of attachments :
    0

Description

Unresolvable NullPointerException in the MarshallingContext class when you develop custom implementation of the UTF8StreamWriter.

Caused by: java.lang.NullPointerException
at org.jibx.runtime.impl.MarshallingContext.setOutput(MarshallingContext.java:240)
at org.jibx.runtime.impl.MarshallingContext.startDocument(MarshallingContext.java:459)
at org.jibx.runtime.impl.MarshallingContext.marshalDocument(MarshallingContext.java:1082)
at com.espacenet.ops.domain.util.jibx.JibxMarshalingUtils.marshal(JibxMarshalingUtils.java:41)

Additionally, you can't develop any other writer which marshal UTF-8 because it's always replaced by default UTF8StreamWriter.

Do something with it guys. With this issue open nobody can develop any writers different from default (e.g JSON writer).

Activity

Hide
Dennis Sosnoski added a comment -

The setOutput() methods all assume they're managing the XMLWriter. This is awkward code, but is there any reason you can't just use setXmlWriter() to set the writer directly (instead of one of the setOutput() methods)?

Show
Dennis Sosnoski added a comment - The setOutput() methods all assume they're managing the XMLWriter. This is awkward code, but is there any reason you can't just use setXmlWriter() to set the writer directly (instead of one of the setOutput() methods)?

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated: