java - Xstream no-args constructor error -
i'm getting following error when tries create instance of 'transacao'
`error: cannot construct br.com.cbmp.ecommerce.resposta.transacao not have no-args constructor : cannot construct br.com.cbmp.ecommerce.resposta.transacao not have no-args constructor ` ---- debugging information ---- message : cannot construct br.com.cbmp.ecommerce.resposta.transacao not have no-args constructor cause-exception : com.thoughtworks.xstream.converters.reflection.objectaccessexception cause-message : cannot construct br.com.cbmp.ecommerce.resposta.transacao not have no-args constructor ` class : br.com.cbmp.ecommerce.resposta.transacao required-type : br.com.cbmp.ecommerce.resposta.transacao path : /transacao
i aware there's bug xstream 1.3.1 , jdk7, i'm using xstream 1.3.1 , jdk6. ideas why error still happening?
thanks
3 solutions:
- provide no-args constructor (obvious)
- make object implement serializable.
- upgrade xstream 1.4.4*
i use solution #2 time.
*i verified 1.2.2 doesn't work , 1.4.4 work, haven't tried versions in-between
Comments
Post a Comment