Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Devaka Cooray
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Martijn Verburg
  • Frits Walraven
  • Himai Minh

Related with java and xml

 
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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()
 
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
Please don't post the same question in more than one forum.
[ February 07, 2007: Message edited by: Paul Sturrock ]
 
Time is mother nature's way of keeping everything from happening at once. And this is a tiny ad:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
    Bookmark Topic Watch Topic
  • New Topic