Hi,

I may have discovered a bug in jakarta-taglibs-standard-1.1.2.

The JSP code

<x:transform doc="${onlineevents_archiveDoc}"
xslt="${onlineevents_archiveXSLT}">
<x:param name="order" value="${order}" />
</x:transform>

is very occasionally causing a NullPointerException, with the
following stack trace:

java.lang.NullPointerException
*** 
org.apache.taglibs.standard.tag.common.xml.TransformSupport.addParameter(TransformSupport.java:221)
*** 
org.apache.taglibs.standard.tag.common.xml.ParamSupport.doEndTag(ParamSupport.java:74)
*** 
org.apache.jsp.onlineevents.archive.default_jsp._jspx_meth_x_param_0(default_jsp.java:546)
*** 
org.apache.jsp.onlineevents.archive.default_jsp._jspx_meth_x_transform_0(default_jsp.java:515)
*** 
org.apache.jsp.onlineevents.archive.default_jsp._jspService(default_jsp.java:206)
*** org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
*** javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
*** 
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)
*** org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
*** org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
*** javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
*** 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
*** 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
*** 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
*** 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
*** 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
*** 
org.apache.catalina.cluster.tcp.ReplicationValve.invoke(ReplicationValve.java:346)
*** 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
*** 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
*** org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
*** org.apache.coyote.ajp.AjpAprProcessor.process(AjpAprProcessor.java:425)
*** 
org.apache.coyote.ajp.AjpAprProtocol$AjpConnectionHandler.process(AjpAprProtocol.java:452)
*** org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1285)
*** java.lang.Thread.run(Thread.java:595)

Looking at the source of TransformSupport, I see the offending method is:

    public void addParameter(String name, Object value) {
        t.setParameter(name, value);
    }

implying that instance variable 't' (of type
javax.xml.transform.Transformer) is set to null - which suggests some
kind of weird bug where it is either overwritten or not initialised
properly.

I'm a bit stuck as I can't reproduce this myself; it seems to be
occurring at random several times a day on my production site.

I had thought it was a concurrency issue and have tried wrapping the
call to <x:transform> in a synchronized block, just in case, but it
hasn't made any noticeable difference.

I don't know enough about the taglib lifecycle and tag pooling to
tackle this myself, so any help or insights would be appreciated!

The server information is:
Tomcat 5.5.17
JVM: Sun 1.5.0_07-b03
OS: SunOS 5.9
Arch: sparc

Cheers,
Rob

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to