• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

DOM to XML parsing Transformer Exception

 
Girdher Singh
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ,

I am getting following error while application is trying to make some xml parsing. I am using xsl file.


com.knights.camelot.pos.receipt.templates.TemplateException: Failed to appply receipt template.
at com.knights.camelot.pos.receipt.templates.rml.RMLReceiptTemplate.apply(RMLReceiptTemplate.java:38)
at com.knights.camelot.pos.receipt.ReceiptGenerator.generateReceipt(ReceiptGenerator.java:73)
at com.knights.camelot.pos.model.SaleActivityModel.printReceipts(SaleActivityModel.java:910)
at com.knights.camelot.pos.actions.PrintReceiptAction$1.run(PrintReceiptAction.java:34)
at foxtrot.AbstractWorkerThread$2.run(AbstractWorkerThread.java:49)
at java.security.AccessController.doPrivileged(Native Method)
at foxtrot.AbstractWorkerThread.runTask(AbstractWorkerThread.java:45)
at foxtrot.workers.DefaultWorkerThread.run(DefaultWorkerThread.java:153)
at java.lang.Thread.run(Unknown Source)
Caused by: javax.xml.transform.TransformerException: javax.xml.transform.TransformerException: java.lang.RuntimeException: InvocationTargetException when invoking public java.lang.String com.knights.camelot.pos.model.PaymentModel.getPaymentDescription(): java.lang.NullPointerException
at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(Unknown Source)
at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(Unknown Source)
at com.knights.xml.ObjectXMLTransformer.transform(Unknown Source)
at com.knights.xml.ObjectXMLTransformer.transformToString(Unknown Source)
at com.knights.xml.ObjectXMLTransformer.transformToInputStream(Unknown Source)
at com.knights.camelot.pos.receipt.templates.rml.RMLReceiptTemplate.apply(RMLReceiptTemplate.java:36)
... 8 more
Caused by: javax.xml.transform.TransformerException: java.lang.RuntimeException: InvocationTargetException when invoking public java.lang.String com.knights.camelot.pos.model.PaymentModel.getPaymentDescription(): java.lang.NullPointerException
at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.getDOM(Unknown Source)
... 14 more
Caused by: java.lang.RuntimeException: InvocationTargetException when invoking public java.lang.String com.knights.camelot.pos.model.PaymentModel.getPaymentDescription(): java.lang.NullPointerException
at org.infohazard.domify.ElementAdapter.getWrapped(ElementAdapter.java:420)
at org.infohazard.domify.ElementAdapter.getNodeListAdapter(ElementAdapter.java:449)
at org.infohazard.domify.ElementAdapter.getFirstChild(ElementAdapter.java:625)
at com.sun.org.apache.xalan.internal.xsltc.trax.DOM2SAX.parse(Unknown Source)
at com.sun.org.apache.xalan.internal.xsltc.trax.DOM2SAX.parse(Unknown Source)
at com.sun.org.apache.xalan.internal.xsltc.trax.DOM2SAX.parse(Unknown Source)
at com.sun.org.apache.xalan.internal.xsltc.trax.DOM2SAX.parse(Unknown Source)
at com.sun.org.apache.xalan.internal.xsltc.trax.DOM2SAX.parse(Unknown Source)
at com.sun.org.apache.xalan.internal.xsltc.trax.DOM2SAX.parse(Unknown Source)
at com.sun.org.apache.xalan.internal.xsltc.trax.DOM2SAX.parse(Unknown Source)
at com.sun.org.apache.xalan.internal.xsltc.dom.XSLTCDTMManager.getDTM(Unknown Source)
at com.sun.org.apache.xalan.internal.xsltc.dom.XSLTCDTMManager.getDTM(Unknown Source)


Till now I have reached to a consensus that there is some issue with string. It is marked as null(default),it must be "".but I am not sure if I am wrong or right.


Here is the code which Is referenced in the code for exception





I am waiting for any kind of guidance.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic