org.openxava.util.XavaException: Duplicate component: Product

Hendrik V
  • Hendrik V

    Hendrik V - 2013-02-28

    For no obvious reason, I got the exception "org.openxava.util.XavaException: Duplicate component: MapCheckList"

    After much struggling, I saw that one of the properties was read-only, and this was ultimately causing this error.

    In what was causing it was a mismatch between getters and setters for an int property. I originally had the property as 'int' but changed it to 'Integer' because I got null problems. But I forgot to change the 'int getXXX()' method to 'Integer getXXX()', which is not a Java bug due to unpacking, but it seems that this confused Java Beans, which made it a read-only field, which seems to have cascaded into other problems.

  • Javier Paniza

    Javier Paniza - 2013-03-04

    Hi Hendrik,

    it's very weird that a 'Duplicate component' messages would be shown when you have an error in a getter. Moreover, it makes that developers waste time. So, I would like to fix this issue to produce a more precise message.

    However, I cannot reproduce it. I modify an already existing entity changing int to Integer only in the field, not in the setter and getter, and it works fine. Can you provide a simple code example that I could use to reproduce the case.

    Help others in this forum as I help you.
    Before posting a question search this forum for the answer,
    and read the OpenXava documentation in

    Last edit: Javier Paniza 2013-03-04

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks