I'm trying to use spring (@Autowire
annotation into Jaxb Model class)
.....
@XmlAttribute(name = "object-id")
@XmlSchemaType(name = "positiveInteger")
protected BigInteger objectId;
@XmlTransient
@Autowired MediationCacheManager cacheManager;
Where MediationCacheManager
is extended from three interfaces
On creation of JaxbContext i catch an exception:
Exception [EclipseLink-50089] (Eclipse Persistence Services - 2.5.0.v20121116-8650760): org.eclipse.persistence.exceptions.JAXBException
Exception Description: The java interface com.netcracker.mediation.common.caches.api.MediationCacheManager can not be mapped by JAXB as it has multiple mappable parent interfaces. Multiple inheritence is not supported
Of course i understand that eclipselink doesn't support multiple inheritance but how can i skip cacheManager
field from Jaxb processing? As for me - it should be done by XmlTransient
annotation but its no work. Have u any idea?
The issue you are seeing corresponds to a bug (http://bugs.eclipse.org/411993) that we have fixed in the EclipseLink 2.5.1 and 2.6.0 streams. You can download a nightly build from the following link starting July 4, 2013:
WORKAROUND
You can use MOXy's external mapping document to override the supertype of
MediationCacheManager
to make your use case work (see: http://blog.bdoughan.com/2010/12/extending-jaxb-representing-annotations.html):oxm.xml
Demo