JiBX
  1. JiBX
  2. JIBX-237

Error when running the binding compiler more than once after adding "enum-value-method" to a value

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: JiBX 1.1.6
    • Fix Version/s: JiBX 1.2.1
    • Component/s: core
    • Labels:
      None
    • Environment:
      JRE 1.6.0_07
    • Number of attachments :
      0

      Description

      After adding the enum-value-method to a value element in the binding file,
      The first binding compilation succeeds and the marshalling / unmarshalling works fine.
      once the binding compiler is run again, the following error appears:

      [bind] Error running binding compiler
      [bind] java.lang.ClassFormatError: Duplicate method name&signature in class file ....

      The only way to resolve this is to either remove the enum-value-method, build, then add it back and build again.
      or clean the entire project binaries and build it from scratch.

      both are time consuming when working with a large project.

        Activity

        Hide
        Jonathan Whitall added a comment -

        This is proving to be a critical issue for me, because I'm using the Maven Assembly plugin and am affected by the following issue:

        http://jira.codehaus.org/browse/MASSEMBLY-94

        In short, because of a design flaw in Maven, the code is cleaned, built, and bound using JiBX, then it's bound using JiBX again, causing this issue.

        As a workaround, perhaps there is a way to configure the JiBX Maven plugin to only run when when the code is compiled?

        Show
        Jonathan Whitall added a comment - This is proving to be a critical issue for me, because I'm using the Maven Assembly plugin and am affected by the following issue: http://jira.codehaus.org/browse/MASSEMBLY-94 In short, because of a design flaw in Maven, the code is cleaned, built, and bound using JiBX, then it's bound using JiBX again, causing this issue. As a workaround, perhaps there is a way to configure the JiBX Maven plugin to only run when when the code is compiled?
        Hide
        Dennis Sosnoski added a comment -

        Added check for _jibx_serialize and _jibx_deserialize binding methods in classes extending java.lang.Enum, so that they'll be handled the same as other methods added by the binding compiler.

        Show
        Dennis Sosnoski added a comment - Added check for _jibx_serialize and _jibx_deserialize binding methods in classes extending java.lang.Enum, so that they'll be handled the same as other methods added by the binding compiler.

          People

          • Assignee:
            Dennis Sosnoski
            Reporter:
            Iddo Rachlewski
          • Votes:
            3 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: