gsunil15 Posted September 3, 2009 Share Posted September 3, 2009 Hi All, I am working on IReport 3.0.0. When I am trying to save the Jrxml content in to DataBase it is giving the error.net.sf.jasperreports.engine.JRException: org.xml.sax.SAXParseException: Invalid byte 2 of 3-byte UTF-8 sequence. at net.sf.jasperreports.engine.xml.JRXmlLoader.loadXML(JRXmlLoader.java:243) at net.sf.jasperreports.engine.xml.JRXmlLoader.loadXML(JRXmlLoader.java:226) at net.sf.jasperreports.engine.xml.JRXmlLoader.load(JRXmlLoader.java:214)My Jrxml contains below Query : SELECT application."APPLICATION_NUMBER" AS application_APPLICATION_NUMBER, person."PERSON_NUMBER" AS person_PERSON_NUMBER, person."FIRST_NAME" AS person_FIRST_NAME, person."LAST_NAME" AS person_LAST_NAME, application."PERSON_NUMBER" AS application_PERSON_NUMBER, application."APPLICATION_DATE" AS application_APPLICATION_DATEFROM "dbo"."application" application, "dbo"."person" personWHERE application.person_number = person.person_numberAND application.application_date>=${desde a data} and application.application_date<=${até à data} Link to comment Share on other sites More sharing options...
mdahlman Posted September 3, 2009 Share Posted September 3, 2009 gsunil15, I expect that the problem is not related to your query. Can you post the .jrxml file? Regards,Matt Link to comment Share on other sites More sharing options...
gsunil15 Posted September 3, 2009 Author Share Posted September 3, 2009 I was reading the content of Jrxml file and saving the content in the form of byte arry in to the Database .Then reading the content from the DB and forming the Jasperdesign object. While creating the japerdesign object getting the error---Invalid byte 2 of 3-byte UTF-8 sequence.find the attached Jrxml file . please find the below code: byte [] reportContent=null; try{new ByteArrayInputStream(reportContent); reportContent = ReportTemplate.getReportContent(); ( iam uisng hibernate, so Iam using Vo object of Report template table)reportStream = JasperDesign jasperDesign = JRXmlLoader.load(reportStream);------getting the error at this line. JRDesignQuery jrd =(JRDesignQuery)jasperDesign.getQuery(); Link to comment Share on other sites More sharing options...
gsunil15 Posted September 3, 2009 Author Share Posted September 3, 2009 My Query contains some Portuguese characters also, Is there any problem with portuguese characters while parsing the Jrxml content and constructing the Japser design object. Please find the source code below. RegardsSunil kumar.GCode:byte [] reportContent=null; try{reportContent = ReportTemplate.getReportContent(); ( iam uisng hibernate, so Iam using Vo object of Report template table)reportStream =new ByteArrayInputStream(reportContent); JasperDesign jasperDesign = JRXmlLoader.load(reportStream);------getting the error at this line. JRDesignQuery jrd =(JRDesignQuery)jasperDesign.getQuery(); Link to comment Share on other sites More sharing options...
mdahlman Posted September 3, 2009 Share Posted September 3, 2009 I don't see anything wrong with the report. Sorry. Try the JasperReports forum, you may be better results there. Regards,Matt Link to comment Share on other sites More sharing options...
linvicch Posted September 4, 2009 Share Posted September 4, 2009 I had a similiar problem as well but it was because of the different version of ireport and jasperserver is was using :) For each version of JS, its best to use the same corresponding version for ireport 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