JiBX
  1. JiBX
  2. JIBX-118

add-constructors does not work with classes mapped as abstract

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: JiBX 1.1
    • Fix Version/s: JiBX 1.1.3
    • Component/s: core
    • Labels:
      None
    • Environment:
      MacOS X, Java 5.0, Ant 1.6
    • Number of attachments :
      0

      Description

      I have a mapping for a collection that contains objects of type A. A is an abstract static inner class. Classes B and C are concrete static inner classes that extend from A. I have mapped A with abstract="true" and used map-as="A" with classes B and C. None of these classes has a default constructor so I have add-constructors="true" set on the binding element.

      The binding compiler runs fine, marshalling works OK but unmarshalling fails with a NoSuchMethodError that refers to a no-arg constructor for class A.

      It seems that JiBX does not add default constructors for abstract classes.

        Activity

        Dennis Sosnoski made changes -
        Field Original Value New Value
        Assignee Dennis Sosnoski [ dsosnoski ]
        Hide
        Dennis Sosnoski added a comment -

        This should be fixed in the 1.1.3 code. Please retest with that or the current code, available as the 1.1.4-SNAPSHOT jars on http://jibx.sourceforge.net/maven/jibx/jars/ , and respond if there are still problems.

        Show
        Dennis Sosnoski added a comment - This should be fixed in the 1.1.3 code. Please retest with that or the current code, available as the 1.1.4-SNAPSHOT jars on http://jibx.sourceforge.net/maven/jibx/jars/ , and respond if there are still problems.
        Dennis Sosnoski made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Fix Version/s JiBX 1.1.3 [ 13202 ]
        Dennis Sosnoski made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

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

            Dates

            • Created:
              Updated:
              Resolved: