[Home]  [List]  [News]  [Docs]  [FAQ]  [Downloads]  [Resources]  [About]
Search :
/Home /List

list4xt : Mailing list for the XT users community.

[list4xt] Re: Null pointer exception in XT

Subject: [list4xt] Re: Null pointer exception in XT

User: Website

From: Larry_Mason@i2.com
Date: 11/10/2001 - 22:30


Here is what I am doing.
       XSLProcessor cache =
(XSLProcessorImpl)pageContext.getAttribute("cachedxsl",
pageContext.APPLICATION_SCOPE);
       if (cache == null)
       {
          // lots of code removed here to make it simpler to read
          cache = new XSLProcessorImpl();
          cache.loadStylesheet(fileInputSource(stylesheet));
          pageContext.setAttribute("cachedxsl", cache,
pageContext.APPLICATION_SCOPE);
       }
       xsl = (XSLProcessorImpl)cache.clone();
So yes I am reusing the same stylesheet in each thread but am also using a
clone of it per thread.
Any other ideas?
Cheers!
Larry

"Sebastien Sahuc" <ssahuc@intalio.com>
Sent by: list4xt-bounce@4xt.org
10/11/01 03:15 PM
Please respond to list4xt

 
        To: <list4xt@4xt.org>
        cc:
        Subject: [list4xt] Re: Null pointer exception in XT

Hi Larry,

XSLProcessorImpl is thread safe as long as you don't use the same instance
concurrently. If you whish to process the same style sheet in different
thread, you need to clone the XSLProcessImpl isntance and that' is, no
more
synch needed.

Hope this help,

Sebastien S.

> -----Original Message-----
> From: list4xt-bounce@4xt.org [mailto:list4xt-bounce@4xt.org]On Behalf Of
> Larry_Mason@i2.com
> Sent: Thursday, October 11, 2001 12:52 PM
> To: list4xt@4xt.org
> Cc: jjc@jclark.com
> Subject: [list4xt] Null pointer exception in XT
>
>
> I believe I have an unsafe thread condition. Below is the stack
> trace for
> a very repeatable condition when I don't synchronize calls to the
> transformation process. Before I start wading through the code, can
> anyone tell me what type of XSLT might be the cause? For example,
> node-set or copy-of or ...
> Thanks in advance.
> Larry
>
> XSLT error:java.lang.NullPointerException
>
> java.lang.NullPointerException
> at
> com.jclark.xsl.sax.MultiNamespaceResult.endElementContent(MultiNam
> espaceResult.java,
> Compiled Code)
> at com.jclark.xsl.sax.ResultBase.endElement(ResultBase.java,
> Compiled Code)
> at com.jclark.xsl.tr.CopyAction.invoke(CopyAction.java, Compiled
> Code)
> at com.jclark.xsl.tr.AppendAction.invoke(AppendAction.java,
> Compiled Code)
> at
>
com.jclark.xsl.tr.ProcessContextImpl.processSafe(ProcessContextImpl.java,
> Compiled Code)
> at
> com.jclark.xsl.tr.ProcessContextImpl.process(ProcessContextImpl.ja
> va,Compiled
> Code)
> at com.jclark.xsl.tr.ProcessAction.invoke(ProcessAction.java,
> Compiled Code)
> at com.jclark.xsl.tr.AppendAction.invoke(AppendAction.java,
> Compiled Code)
> at
> com.jclark.xsl.tr.LiteralElementAction.invoke(LiteralElementAction.java,
> Compiled Code)
> at com.jclark.xsl.tr.AppendAction.invoke(AppendAction.java,
> Compiled Code)
> at
>
com.jclark.xsl.tr.ProcessContextImpl.processSafe(ProcessContextImpl.java,
> Compiled Code)
> at
> com.jclark.xsl.tr.ProcessContextImpl.process(ProcessContextImpl.ja
> va,Compiled
> Code)
> at com.jclark.xsl.tr.ProcessAction.invoke(ProcessAction.java,
> Compiled Code)
> at com.jclark.xsl.tr.AppendAction.invoke(AppendAction.java,
> Compiled Code)
> at
>
com.jclark.xsl.tr.ProcessContextImpl.processSafe(ProcessContextImpl.java,
> Compiled Code)
> at
> com.jclark.xsl.tr.ProcessContextImpl.process(ProcessContextImpl.ja
> va,Compiled
> Code)
> at com.jclark.xsl.tr.ProcessAction.invoke(ProcessAction.java,
> Compiled Code)
> at com.jclark.xsl.tr.AppendAction.invoke(AppendAction.java,
> Compiled Code)
> at com.jclark.xsl.tr.CopyAction.invoke(CopyAction.java, Compiled
> Code)
> at com.jclark.xsl.tr.AppendAction.invoke(AppendAction.java,
> Compiled Code)
> at
>
com.jclark.xsl.tr.ProcessContextImpl.processSafe(ProcessContextImpl.java,
> Compiled Code)
> at
> com.jclark.xsl.tr.ProcessContextImpl.process(ProcessContextImpl.ja
> va,Compiled
> Code)
> at com.jclark.xsl.tr.ProcessAction.invoke(ProcessAction.java,
> Compiled Code)
> at com.jclark.xsl.tr.AppendAction.invoke(AppendAction.java,
> Compiled Code)
> at com.jclark.xsl.tr.IfAction.invoke(IfAction.java, Compiled
Code)
> at com.jclark.xsl.tr.IfAction.invoke(IfAction.java, Compiled
Code)
> at com.jclark.xsl.tr.AppendAction.invoke(AppendAction.java,
> Compiled Code)
> at
>
com.jclark.xsl.tr.ProcessContextImpl.processSafe(ProcessContextImpl.java,
> Compiled Code)
> at com.jclark.xsl.tr.SheetImpl.process(SheetImpl.java, Compiled
> Code)
> at
> com.jclark.xsl.sax.XSLProcessorImpl.parse(XSLProcessorImpl.java,
Compiled
> Code)
>
>
>
> --
> Mailing list for the XT users community. (http://sexhelp.org)
> (mailto:list4xt-request@4xt.org?Subject=unsubscribe to unsubscribe)

--
Mailing list for the XT users community.     (http://canaanchamber.com)
(mailto:list4xt-request@4xt.org?Subject=unsubscribe to unsubscribe)

-- Mailing list for the XT users community. (http://marijuanabizmerchantprocessing.com) (mailto:list4xt-request@4xt.org?Subject=unsubscribe to unsubscribe)



Archive générée par hypermail 2b28 le 06/11/2001 - 11:46 CET

webmaster@4xt.org