Mapping with DOZER without method set

37 views
Skip to first unread message

Raphael Milani

unread,
Mar 24, 2015, 12:51:13 PM3/24/15
to dozer-...@googlegroups.com
I am trying to convert two classes that have an attribute of type java.util.List, but one of the classes does not have a method "set*" only the method "get*" like this:

<mapping>
        <class-a>com.hsbc.hbbr.model.onboarding.bussvc.xml.bean.SocioPj</class-a>
        <class-b>com.hsbc.hbbr.model.onboarding.bussvc.xml.jaxb.SocioPjXml</class-b>
        <field>
            <a set-method="getListaSocios().add">listaSocios</a>
            <b>listaSocios</b>
            <a-hint>com.hsbc.hbbr.model.onboarding.bussvc.xml.bean.SocioPf,com.hsbc.hbbr.model.onboarding.bussvc.xml.bean.SocioPj</a-hint>
            <b-hint>com.hsbc.hbbr.model.onboarding.bussvc.xml.jaxb.SocioPfXml,com.hsbc.hbbr.model.onboarding.bussvc.xml.jaxb.SocioPjXml</b-hint>
        </field>
    </mapping>
The example above the class: SocioPj doesn´t have a method setListSocios() when I tried to convert I catch this error
[Time:2015-03-24 11:29:08,055][Level:ERROR][Thread:http-bio-8080-exec-10][OnboardingCCMFulfillmentImpl] org.dozer.MappingException: java.lang.ClassNotFoundException: /add
I have no idea to solve this issue.
Reply all
Reply to author
Forward
0 new messages