• 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 :

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
at com.sun.org.apache.xml.internal.serializer.ToHTMLStream.processAttrib
at com.sun.org.apache.xml.internal.serializer.ToHTMLStream.closeStartTag
at com.sun.org.apache.xml.internal.serializer.ToStream.characters(ToStre
at com.sun.org.apache.xml.internal.serializer.ToHTMLStream.characters(To
at com.sun.org.apache.xml.internal.utils.FastStringBuffer.sendSAXcharact
at com.sun.org.apache.xml.internal.dtm.ref.sax2dtm.SAX2DTM2.dispatchChar
at com.sun.org.apache.xalan.internal.xsltc.dom.SAXImpl.characters(SAXImp
at com.sun.org.apache.xalan.internal.xsltc.dom.DOMAdapter.characters(DOM
at com.sun.org.apache.xalan.internal.xsltc.dom.MultiDOM.characters(Multi
at GregorSamsa.applyTemplates()
at GregorSamsa.template$dot$2()
at GregorSamsa.applyTemplates()
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!