java.lang.NullPointerException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • 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
    via by Yash Talwar,
  • Convert xml to csv with xsl java
    via Stack Overflow by Francy
    ,
  • javascript in  XSLT?
    via by 16227,
    • java.lang.NullPointerException at org.apache.xpath.objects.XNodeSet.getStringFromNode(XNodeSet.java:255) at org.apache.xpath.objects.XNodeSet.str(XNodeSet.java:318) at org.apache.xpath.functions.FuncContains.execute(FuncContains.java:87) at org.apache.xpath.functions.FuncNot.execute(FuncNot.java:85) at org.apache.xpath.Expression.bool(Expression.java:230) at org.apache.xpath.XPath.bool(XPath.java:383) at org.apache.xalan.templates.ElemIf.execute(ElemIf.java:208) at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2339) at org.apache.xalan.templates.ElemIf.execute(ElemIf.java:210) at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2339) at org.apache.xalan.templates.ElemTemplate.execute(ElemTemplate.java:435) at org.apache.xalan.templates.ElemCallTemplate.execute(ElemCallTemplate.java:273) at org.apache.xalan.templates.ElemApplyTemplates.transformSelectedNodes(ElemApplyTemplates.java:425) at org.apache.xalan.templates.ElemApplyTemplates.execute(ElemApplyTemplates.java:216) at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2339) at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:710) at org.apache.xalan.templates.ElemApplyTemplates.transformSelectedNodes(ElemApplyTemplates.java:425) at org.apache.xalan.templates.ElemApplyTemplates.execute(ElemApplyTemplates.java:216) at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2339) at org.apache.xalan.transformer.TransformerImpl.applyTemplateToNode(TransformerImpl.java:2160) at org.apache.xalan.transformer.TransformerImpl.transformNode(TransformerImpl.java:1213) at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:668) at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1129) at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1107) at my.companies.product.validation.impl.MeldingValidationServiceSAXImpl.validate(MeldingValidationServiceSAXImpl.java:89)
    No Bugmate found.