cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 26445] - NPE at o.a.xalan.transformer.TransformerImpl.java:1497
Date Mon, 08 Mar 2004 20:16:02 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=26445>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=26445

NPE at o.a.xalan.transformer.TransformerImpl.java:1497

joerg.heinicke@gmx.de changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dev@cocoon.apache.org
         AssignedTo|dev@cocoon.apache.org       |KajKandler@conficio.com



------- Additional Comments From joerg.heinicke@gmx.de  2004-03-08 20:16 -------
Have you done any further research? I had a look at the place in the code:

  public void setParameter(String name, String namespace, Object value)
  {

    VariableStack varstack = getXPathContext().getVarStack();
    QName qname = new QName(namespace, name);
    XObject xobject = XObject.create(value, getXPathContext());
    
    StylesheetRoot sroot = m_stylesheetRoot;
    Vector vars = sroot.getVariablesAndParamsComposed();
    int i = vars.size();
    while (--i >= 0)
    {
      ElemVariable variable = (ElemVariable)vars.elementAt(i);
      if(variable.getXSLToken() == Constants.ELEMNAME_PARAMVARIABLE && 
         variable.getName().equals(qname))
      {
          varstack.setGlobalVariable(i, xobject);
      }
    }
  }

vars.size() is in ine 1497 and causes the NPE. I don't know how you can enforce
this NPE. Bug the CVS on TransformerImpl
(http://cvs.apache.org/viewcvs.cgi/xml-xalan/java/src/org/apache/xalan/transformer/TransformerImpl.java)
shows a fix near to the in the stacktrace mentioned line (refering to bug
#25368). The patch is included in the new Xalan 2.6.0 version, so maybe you try
this one. It's included in recent Cocoon 2.1 from CVS.

Please report back. Otherwise we have to put the blame on your stylesheet (or
your usage in general) or on Xalan and close the bug.

Joerg

Mime
View raw message