udumanajmeer Posted October 3, 2013 Share Posted October 3, 2013 org.apache.xerces.impl.io.MalformedByteSequenceException: Invalid byte 1 of 1-byte UTF-8 sequence.while am trying to get pdf am getting this error.i have used Jasper 5.1.0<?xml version="1.0" encoding="UTF-8"?> in this line is my jrxml file Link to comment Share on other sites More sharing options...
hishamkmr Posted October 3, 2013 Share Posted October 3, 2013 can u upload the jrxml file? Link to comment Share on other sites More sharing options...
udumanajmeer Posted October 3, 2013 Author Share Posted October 3, 2013 No, just i have to compile and print the pdf in one location. thats all, but in this scenario i have got org.apache.xerces.impl.io.MalformedByteSequenceException: Invalid byte 1 of 1-byte UTF-8 sequence. error.JasperReport report = JasperCompileManager.compileReport(path2+"OnlineMainReport.jasper");JasperPrint print = JasperFillManager.fillReport(report,hm,ds);JasperExportManager.exportReportToPdfFile(print,pdfPath);path2 = D:TestWorkspace.metadata.pluginsorg.eclipse.wst.server.coretmp0wtpwebappsloginhiresharedjasper. this is jasper locationI think after this line i got error. Link to comment Share on other sites More sharing options...
hishamkmr Posted October 3, 2013 Share Posted October 3, 2013 r u trying to parse the xml inside java code with UTF-8 encoding? Link to comment Share on other sites More sharing options...
udumanajmeer Posted October 4, 2013 Author Share Posted October 4, 2013 No am not trying to parse the xml inside java. i have no idea about that. can u help me where i'll write that parsing here in my code Link to comment Share on other sites More sharing options...
udumanajmeer Posted October 5, 2013 Author Share Posted October 5, 2013 Please any one can u help me.... while am trying to get pdf i got this error.org.apache.xerces.impl.io.MalformedByteSequenceException: Invalid byte 1 of 1-byte UTF-8 sequence.my java code here,JasperReport report = JasperCompileManager.compileReport(path2+"OnlineMainReport.jasper"); // i got that error in this lineJasperPrint print = JasperFillManager.fillReport(report,hm,ds);pdfPath = path+strDate+"_"+examName.replace(" ", "")+".pdf";JasperExportManager.exportReportToPdfFile(print,pdfPath);path2 = D:TestWorkspace.metadata.pluginsorg.eclipse.wst.server.coretmp0wtpwebappsloginhiresharedjasper. this is jasper location2013-10-0109-59-49_apptitudetest // pdf file name should save in destination location like thisi dont know how i include parsing xml code in java, exactly where i want to include xml parsing code here..please help me any one... am awaiting for your valuable reply soon.... my task is pending by this error.... reply very soon...thanks to advance... Link to comment Share on other sites More sharing options...
hishamkmr Posted October 7, 2013 Share Posted October 7, 2013 iam guessing the problem is bcos of trying to compile the jasper file two times..replace the error line with below cod and try JasperReport jasperReport = (JasperReport)JRLoader.loadObject(new File(path2+"OnlineMainReport.jasper"));let me know the result.. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now