wood burning stoves 2.0*
The moose likes XML and Related Technologies and the fly likes DOM to XML parsing Transformer Exception Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "DOM to XML parsing Transformer Exception" Watch "DOM to XML parsing Transformer Exception" New topic
Author

DOM to XML parsing Transformer Exception

Girdher Singh
Greenhorn

Joined: Feb 12, 2012
Posts: 12
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.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: DOM to XML parsing Transformer Exception