dcsimg
problem serialization a xml
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   matias_gel
Posted On:   Tuesday, November 29, 2005 09:17 AM

hi all, i just trying to port a java code from windows to linux, its a webapp using jetty, and the target os is fedora 4, i have a problem when i trying to fill a report (injasperreport) with a xml.... first the problem is with the xml, its can be serializated ... i dont know why, think its a problem with permission in java, but i try to open a text file in the same directory of the xml file and writed and its work fine... let me show you my code: //XML public static final void generateXMLAgencySold(GbjCollection collection,String xmlFile) { try { FileOutputStream fos = new FileOutputStream(xmlFile); // XERCES 1 or 2 additionnal classes. OutputFormat of = new OutputFormat("XML","ISO-8859-1",true);    More>>

hi all, i just trying to port a java code from windows to linux, its a webapp using jetty, and the target os is fedora 4, i have a problem when i trying to fill a report (injasperreport) with a xml.... first the problem is with the xml, its can be serializated ... i dont know why, think its a problem with permission in java, but i try to open a text file in the same directory of the xml file and writed and its work fine... let me show you my code:

//XML public static final void generateXMLAgencySold(GbjCollection collection,String xmlFile) { try { FileOutputStream fos = new FileOutputStream(xmlFile); // XERCES 1 or 2 additionnal classes. OutputFormat of = new OutputFormat("XML","ISO-8859-1",true); of.setIndent(1); of.setIndenting(true); // of.setDoctype(null,"users.dtd"); XMLSerializer serializer = new XMLSerializer(fos,of); // SAX2.0 ContentHandler.//the problem is here when i try to serialize //!!!!!!!!!!!!!!!!!!! ContentHandler hd = serializer.asContentHandler(); hd.startDocument();


in jetty the error there i get is: org.apache.xml.serialize.EncodingInfo: class definition not found


but i try it in tomcat and the error is file permission error....
any idea???

thanks all

   <<Less
About | Sitemap | Contact