users@jaxb.java.net

Re: Unable to apply a customisation in a multiple compilation scenario

From: Aleksei Valikov <valikov_at_gmx.net>
Date: Fri, 6 Jun 2008 12:04:26 +0200

Hi.

> Thanks very much for the quick response. Do you know what that flag actually
> does? Looking at the code for the episode plugin, that flag is always set.
> Is how it works documented anywhere?

See BISchemaBidning:

    /**
     * If false, it means not to generate any classes from this namespace.
     * No ObjectFactory, no classes (the only way to bind them is by using
     * &lt;jaxb:class ref="..."/>)
     */
    @XmlAttribute(name="map")
    public boolean map = true;

> Additionally, if that flag really
> causes the behaviour you describe, why does the second example in my issue
> work when core is still imported and used extensively?

I'm sorry, it's hard to tell it without further investigation.
What I did is just tried your last example without episodes (worked)
then found out what breaks it by deduction. I believe the source of
the problem is really somewhere in simply type processing. See
SimpleTypeBuilder, how and where it's called for further clues.

> I actually just tried my example that's currently failing in two branches of
> our project. The code was branched very recently, and all code related to
> JAXB is identical. The code works in one and fails in the other - both with
> the same episode files. Essentially we've found this problem to simply be
> extremely sensitive - changing some random apparently unrelated thing causes
> it to work or break.

Non-determenistic behaviour... Maybe also due to the order in which
schema files are loaded or processed - if there are hash maps or sets
in the game and so on. There must be a deeper problem, I believe.

> Any more ideas as to what might be happening or what I might be able to do
> to work around it?

Well, I've faces quite a lot of such problems and what usually hels is
source code, debugger, time, patience and persistence.

Bye.
/lexi