java.lang.NullPointerException

xml-xalan-dev | Jeroen Ruijgers (JIRA) | 10 years ago
  1. 0

    Using the currentCVS version of XalanJ2. When I run transformation using single thread, it works fine. When multi threads are using for the transformation using the same xml file and xsl file that is used in single thread test, I get various symptoms. The following three symptoms occur randomly: First Symptom: -------------- javax.xml.transform.TransformerException: 5 >= 1 at org.apache.xpath.XPath.execute(XPath.java(Compiled Code)) at org.apache.xalan.templates.ElemWithParam.getValue(ElemWithParam.java (Compiled Code)) at org.apache.xalan.templates.ElemCallTemplate.execute (ElemCallTemplate.java(Compiled Code)) at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates (TransformerImpl.java(Compiled Code)) ... --------- java.lang.ArrayIndexOutOfBoundsException: 5 >= 1 at java.util.Vector.elementAt(Vector.java(Inlined Compiled Code)) at org.apache.xml.dtm.ref.DTMStringPool.indexToString(DTMStringPool.java (Inlined Compiled Code)) at org.apache.xml.dtm.ref.sax2dtm.SAX2DTM.getStringValue(SAX2DTM.java (Compiled Code)) at org.apache.xpath.objects.XRTreeFrag.str(XRTreeFrag.java(Compiled Code)) at org.apache.xpath.objects.XRTreeFragSelectWrapper.execute (XRTreeFragSelectWrapper.java(Compiled Code)) at org.apache.xpath.XPath.execute(XPath.java(Compiled Code)) ... Second Symptom: --------------- javax.xml.transform.TransformerException: -1 at org.apache.xpath.XPath.execute(XPath.java(Compiled Code)) at org.apache.xalan.templates.ElemWithParam.getValue(ElemWithParam.java (Compiled Code)) at org.apache.xalan.templates.ElemCallTemplate.execute (ElemCallTemplate.java(Compiled Code)) at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates (TransformerImpl.java(Compiled Code)) ... --------- java.lang.ArrayIndexOutOfBoundsException: -1 at org.apache.xml.utils.SuballocatedIntVector.elementAt (SuballocatedIntVector.java(Inlined Compiled Code)) at org.apache.xml.dtm.ref.DTMDefaultBase._firstch(DTMDefaultBase.java (Compiled Code)) at org.apache.xml.dtm.ref.sax2dtm.SAX2DTM.getStringValue(SAX2DTM.java (Compiled Code)) at org.apache.xpath.objects.XRTreeFrag.str(XRTreeFrag.java(Compiled Code)) at org.apache.xpath.objects.XRTreeFragSelectWrapper.execute (XRTreeFragSelectWrapper.java(Compiled Code)) at org.apache.xpath.XPath.execute(XPath.java(Compiled Code)) ... Third Symptom: -------------- javax.xml.transform.TransformerException: Unknown error in XPath. at org.apache.xpath.XPath.execute(XPath.java(Compiled Code)) at org.apache.xalan.templates.ElemWithParam.getValue(ElemWithParam.java (Compiled Code)) at org.apache.xalan.templates.ElemCallTemplate.execute (ElemCallTemplate.java(Compiled Code)) at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates (TransformerImpl.java(Compiled Code)) ... --------- java.lang.NullPointerException at org.apache.xpath.objects.XNodeSet.getStringFromNode(XNodeSet.java (Inlined Compiled Code)) at org.apache.xpath.objects.XNodeSet.str(XNodeSet.java(Compiled Code)) at org.apache.xpath.objects.XRTreeFragSelectWrapper.execute (XRTreeFragSelectWrapper.java(Compiled Code)) at org.apache.xpath.XPath.execute(XPath.java(Compiled Code)) ... ------------------------------------------------------------------- These symptoms are random. Also, the output file is not consistent. In multithread environment, the output file seems to differ for one thread to other. Yash

    Apache's JIRA Issue Tracker | 1 decade ago | Yash Talwar
    java.lang.NullPointerException
  2. Speed up your debug routine!

    Automated exception search integrated into your IDE

  3. 0

    Java getNode after transforming xml with xslt

    Stack Overflow | 3 years ago | user3044773
    java.lang.NullPointerException

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.NullPointerException

      No message provided

      at org.apache.xpath.objects.XNodeSet.getStringFromNode()
    2. Xalan Java
      TransformerImpl.transform
      1. org.apache.xpath.objects.XNodeSet.getStringFromNode(XNodeSet.java:255)
      2. org.apache.xpath.objects.XNodeSet.str(XNodeSet.java:318)
      3. org.apache.xpath.functions.FuncContains.execute(FuncContains.java:87)
      4. org.apache.xpath.functions.FuncNot.execute(FuncNot.java:85)
      5. org.apache.xpath.Expression.bool(Expression.java:230)
      6. org.apache.xpath.XPath.bool(XPath.java:383)
      7. org.apache.xalan.templates.ElemIf.execute(ElemIf.java:208)
      8. org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2339)
      9. org.apache.xalan.templates.ElemIf.execute(ElemIf.java:210)
      10. org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2339)
      11. org.apache.xalan.templates.ElemTemplate.execute(ElemTemplate.java:435)
      12. org.apache.xalan.templates.ElemCallTemplate.execute(ElemCallTemplate.java:273)
      13. org.apache.xalan.templates.ElemApplyTemplates.transformSelectedNodes(ElemApplyTemplates.java:425)
      14. org.apache.xalan.templates.ElemApplyTemplates.execute(ElemApplyTemplates.java:216)
      15. org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2339)
      16. org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:710)
      17. org.apache.xalan.templates.ElemApplyTemplates.transformSelectedNodes(ElemApplyTemplates.java:425)
      18. org.apache.xalan.templates.ElemApplyTemplates.execute(ElemApplyTemplates.java:216)
      19. org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2339)
      20. org.apache.xalan.transformer.TransformerImpl.applyTemplateToNode(TransformerImpl.java:2160)
      21. org.apache.xalan.transformer.TransformerImpl.transformNode(TransformerImpl.java:1213)
      22. org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:668)
      23. org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1129)
      24. org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1107)
      24 frames
    3. my.companies.product
      MeldingValidationServiceSAXImpl.validate
      1. my.companies.product.validation.impl.MeldingValidationServiceSAXImpl.validate(MeldingValidationServiceSAXImpl.java:89)
      1 frame