This week's book giveaway is in the OCAJP forum.
We're giving away four copies of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) and have Khalid A Mughal & Rolf W Rasmussen on-line!
See this thread for details.
Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

related with java and xml

 
Vishal Methi
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Friends,
I m new to java and xml, hope that you can help me out to reslove my problem. I have an application which is running perfectly on java 1.4 and throwing an exception when i m using java 1.5 which i have (an exception) put at the bottom of this msg.
I have found out when i m getting this exception.
Below is my method where i m getting an exception and
I m getting exception after this line
"transformer.transform(source, result);" i.e last line of this method.

public void transform(String text,
StreamSource stylesource,
StreamResult result)
{
Parser parser = new Parser();
Document document = parser.parse(text);

// Use a Transformer for output
TransformerFactory tFactory = TransformerFactory.newInstance();
Transformer transformer = tFactory.newTransformer(stylesource);

DOMSource source = new DOMSource(document);


transformer.transform(source, result);

}


Could you please help me out.. if you have any idea about it..

and this is the exception which i m getting :

java.lang.StackOverflowError
at org.apache.jasper.runtime.JspWriterImpl.write(JspWriterImpl.java:366)

at org.apache.jasper.runtime.JspWriterImpl.write(JspWriterImpl.java:383)

at com.sun.org.apache.xml.internal.serializer.ToHTMLStream.processAttrib
ute(ToHTMLStream.java:950)
at com.sun.org.apache.xml.internal.serializer.ToHTMLStream.processAttrib
utes(ToHTMLStream.java:1628)
at com.sun.org.apache.xml.internal.serializer.ToHTMLStream.closeStartTag
(ToHTMLStream.java:1654)
at com.sun.org.apache.xml.internal.serializer.ToStream.characters(ToStre
am.java:1382)
at com.sun.org.apache.xml.internal.serializer.ToHTMLStream.characters(To
HTMLStream.java:1433)
at com.sun.org.apache.xml.internal.utils.FastStringBuffer.sendSAXcharact
ers(FastStringBuffer.java:986)
at com.sun.org.apache.xml.internal.dtm.ref.sax2dtm.SAX2DTM2.dispatchChar
actersEvents(SAX2DTM2.java:3086)
at com.sun.org.apache.xalan.internal.xsltc.dom.SAXImpl.characters(SAXImp
l.java:1554)
at com.sun.org.apache.xalan.internal.xsltc.dom.DOMAdapter.characters(DOM
Adapter.java:320)
at com.sun.org.apache.xalan.internal.xsltc.dom.MultiDOM.characters(Multi
DOM.java:533)
at GregorSamsa.applyTemplates()
at GregorSamsa.template$dot$2()
at GregorSamsa.applyTemplates()
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic