We've been bitten by this in the recent past, and ended up modifying our
already customized subclass of ScriptableOutputStream to ignore the
absence of the global XML object. We had to ditch xmlbeans, as it
unfortunately pools objects in thread local variables, causing ugly memory
leaks when you use dynamic code reloading and a fixed set of pooled
threads; I won't go into details of the problem here...
Anyway, ScriptableOutputStream shouldn't freak out with an exception when
any standard object is missing; it should just ignore it and carry on. I
might raise a BugZilla issue for it.