MarshalException for XmlIDREF used on interfaces · Issue #900 · javaee/jaxb-v2 (original) (raw)

This repository was archived by the owner on Feb 5, 2019. It is now read-only.

This repository was archived by the owner on Feb 5, 2019. It is now read-only.

@glassfishrobot

Description

@glassfishrobot

Marshaller bails with "A cycle is detected in the object graph. This will cause infinitely deep XML: ..." when marshalling an XmlIDREF for an interface. This issue does not occur when using the default JAXB implementation bundled with Java runtime, only with the 'standalone' jaxb-impl. A workaround for this issue is to include a XmlJavaTypeAdapter (AnyTypeAdapter is sufficient) along with the XmlIDREF annotation on the interface, or to use the Java runtime implementation instead.

Attached is a sample test model which demonstrates this issue.

Environment

Windows 7 64-bit, JDK 7 64-bit

Affected Versions

[2.2.5]