JiBX
  1. JiBX
  2. JIBX-67

Marshaller/Unmarshaller must be the same class

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Minor Minor
    • Resolution: Cannot Reproduce
    • Affects Version/s: 1.0-RC0
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Environment:
      JiBX RC0, JDK 1.5.0_02, Eclipse 3.0.2
    • Number of attachments :
      0

      Description

      I tried to set the marshaller and unmarshaller to different classes, like this:

      <mapping class="com.somepackage.InlineParagraph"
      marshaller="com.somepackage.inline.InlineMarshaller"
      unmarshaller="com.somepackage.inline.InlineUnmarshaller"
      name="P"
      />

      The bind worked successfully, but when I tried to do an unmarshall, I got the
      following exception at runtime:
      java.lang.AbstractMethodError: com.somepackage.JiBX_fullxmlInlineUnmarshaller_23.marshal(Ljava/lang/Object;Lorg/jibx/runtime/IMarshallingContext;)V
      at com.somepackage.InlineParagraph.marshal(InlineParagraph.java)
      at org.jibx.runtime.impl.MarshallingContext.marshalRoot(MarshallingContext.java:963)
      at org.jibx.runtime.impl.MarshallingContext.marshalDocument(MarshallingContext.java:1055)
      ...

      It appears that the marshall method is being called on the unmarshaller, which doesn't sound right.
      To get around the problem, I used the same class to do the marshalling and unmarshalling.

        Activity

        Hide
        Dennis Sosnoski added a comment -

        I've added a test of this to the standard JiBX test cases and haven't seen any problem. Based on the stack trace, I suspect an error within the com.somepackage.InlineParagraph.marshal(InlineParagraph.java) user code.

        Show
        Dennis Sosnoski added a comment - I've added a test of this to the standard JiBX test cases and haven't seen any problem. Based on the stack trace, I suspect an error within the com.somepackage.InlineParagraph.marshal(InlineParagraph.java) user code.

          People

          • Assignee:
            Dennis Sosnoski
            Reporter:
            JasonTitus
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: