This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: DOM to XML parsing Transformer Exception
 
Similar Threads
Writing XML File - Null Pointer Exception
RMI method invocation return value
UTFDataFormatException when executing transform on soapMessage content
Problem saving XML doc due to NoSuchMethodError...
JVM is hung