Problema anotação interface

2 respostas
T

pessoal estou com o seguinte problema.
Tenho uma interface ACMModel e milhares de classes que estendem dela.
Porem tenho uma classe ( policyDefinition )que contem um attributo deste tipo.
e meu web service passa como parametro o objeto do tipo PolicyDefinition;
mas quando eu subo o tomcat ele mostra o seguinte erro:

com.sun.xml.ws.transport.http.servlet.WSServletContextListener contextInitialized
GRAVE: WSSERVLET11: failed to parse runtime descriptor: javax.xml.ws.WebServiceException: Unable to create JAXBContext
javax.xml.ws.WebServiceException: Unable to create JAXBContext
at com.sun.xml.ws.model.AbstractSEIModelImpl.createJAXBContext(AbstractSEIModelImpl.java:164)

public interface ACMModel{
 ...
}

public class PolicyDefinition{
   private ACMModel acm;
}

public void savePolicyModule(PolicyDefinition policy);

como eu devo fazer a anotação deste atributo e interface?
Obrigado!

2 Respostas

T

?

T

Ajuda ai pessoal. :smiley:

Caused by: java.security.PrivilegedActionException: com.sun.xml.bind.v2.runtime.IllegalAnnotationsException: 2 counts of IllegalAnnotationExceptions

pt.ptinovacao.products.ams.designer.common.model.ACMModel is an interface, and JAXB cant handle interfaces.

this problem is related to the following location:

at pt.ptinovacao.products.ams.designer.common.model.ACMModel

at public pt.ptinovacao.products.ams.designer.common.model.ACMModel pt.ptinovacao.products.ams.designer.model.ValidatorDataTransferObject.getModel()

at pt.ptinovacao.products.ams.designer.model.ValidatorDataTransferObject

at public pt.ptinovacao.products.ams.designer.model.ValidatorDataTransferObject pt.ptinovacao.products.ams.components.changePlan.service.jaxws.SaveChangePlanResponse._return

at pt.ptinovacao.products.ams.components.changePlan.service.jaxws.SaveChangePlanResponse

pt.ptinovacao.products.ams.designer.common.model.ACMModel does not have a no-arg default constructor.

this problem is related to the following location:

at pt.ptinovacao.products.ams.designer.common.model.ACMModel

at public pt.ptinovacao.products.ams.designer.common.model.ACMModel pt.ptinovacao.products.ams.designer.model.ValidatorDataTransferObject.getModel()

at pt.ptinovacao.products.ams.designer.model.ValidatorDataTransferObject

at public pt.ptinovacao.products.ams.designer.model.ValidatorDataTransferObject pt.ptinovacao.products.ams.components.changePlan.service.jaxws.SaveChangePlanResponse._return

at pt.ptinovacao.products.ams.components.changePlan.service.jaxws.SaveChangePlanResponse
Criado 7 de novembro de 2012
Ultima resposta 8 de nov. de 2012
Respostas 2
Participantes 1