> Because it takes several transformations to
> hit
Consistently after one transformation, two transforms? How many is
several? Is any concurrent access involved?
> In the constructor of XRTreeFrag the call
> org.apache.xpath.XPathContext.getDTM(int root) is returning null and the
root is not zero.
Yes, that is what I would suspect over what would be basically a dangling
reference if detach() or destruct() was called.
If you could give a line number in the stylesheet, either from the
exception stack dump or by printing the ElemValueOf's line number from
org.apache.xalan.templates.ElemValueOf.execute(ElemValueOf.java:319) (from
your stack trace), it would help. If I can look at the stylesheet and see
where it is breaking, I suspect that along with your stack dump will be
enough to diagnose the bug, and hopefully kill it.
I suspect this has something to do with the code that was put into the last
release that tries to use a single DTM for multiple result tree fragments (
XRTreeFrag), in order to cut down on object creation. Your reported bug
about "Variable accessed before it is bound!" exception would be in the
same code logic. So I am guessing you are doing something in particular in
your stylesheet to stress this kind of thing. (Since you supplied a
stylesheet in that case, I can look at that tomorrow).
To double check, the "Variable accessed before it is bound!" problem and
the NullPointerException are two completely different bugs, is that
correct?
-scott
"Frank E. Weiss"
<[EMAIL PROTECTED]> To: [EMAIL PROTECTED]
cc: (bcc: Scott
Boag/Cambridge/IBM)
03/19/2002 03:43 Subject: Re: Stylesheet Reuse
NullPointerException
PM
> The NullPointer occurs within a named template at
org.apache.xpath.objects.XRTreeFrag.xstr(). The member variable m_dtm
> is null and m_allowRelease is true. I'm assuming either detach() or
destruct() was called. It could be a race or some
> bad laogic that leads to xstr() being called after detach() or destruct
(). But I need to confirm the last two calls (I
> just figured out a way).
I verified that neither detach() nor destruct() are being called prior to
xstr(). In the constructor of XRTreeFrag the call
org.apache.xpath.XPathContext.getDTM(int root) is returning null and the
root is not zero.