> I'm working with jaxb 1.0.2.
>
> I'm trying to use <xjc:typeSubstitution type="complex"> for some objects
> with xsd:ID and xsd:IDREF attributes. Just adding the tag breaks things.
> (Removing it fixes the problems, but then I can't use the feature.)
>
> Inside of the jaxb-generated TypeImpl.java, the code tries to cast the
> xsd:IDREF instances to com.sun.xml.bind.marshaller.IdentifiableObjects.
>
> But the objects don't implement the interface, so I get a
> ClassCastException (took some digging to find it.
> Util.handlePrintConversionException looses it inside an
> AbortSerializationException).
>
> IDs work fine without <xjc:typeSubstitution type="complex">. (I need
> the typeSubstitution to give the jaxb-gnerated objects some behavior.)
>
> Is this a known bug fixed in the latest weekly drop? (Should I be using
> those instead of JaxB 1.0.2?)
No, this is the first time I've heard about that bug. Sounds like you
found a new bug.
If you could file a bug in
http://jaxb.dev.java.net/ for this and post a
schema to reproduce the problem, that would be great.
> Is there a work-around?
>
> Thanks,
regards,
--
Kohsuke Kawaguchi
Sun Microsystems kohsuke.kawaguchi_at_sun.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_jaxb.dev.java.net
For additional commands, e-mail: users-help_at_jaxb.dev.java.net