Jump to content
Changes to the Jaspersoft community edition download ×

can nobody solve "Invalid byte 1 of 1-byte UTF-8"?


jkoorts

Recommended Posts

Hi I see many newbies including me have to following problem that no one seems to be able to remark on let alone fix.

 

What we do is we follow the JasperReports for developers book. What they instruct you to do in the first few pages is:

 

1. create a xml report template file EXACTLY as in the ebook

2. open build.xml and type EXACTLY

 

<target name="viewDesignXML" description="Launches the design viewer">

<java classname="net.sf.jasperreports.view.JasperDesignViewer" fork="true">

<arg value="-XML"/>

<arg value="-F${file.name}.jrxml"/>

<classpath refid="classpath"/>

</java>

</target>

 

3. when running this ant script you should see the template displayed nicely. It did so we turned the page.

 

 

4. open a project and type EXACTLY the code JasperCompileManager.compileReportToFile("somefilename");

5. open build.xml and type EXACTLY

 

<target name="viewDesignXML" description="Launches the design viewer">

<java classname="net.sf.jasperreports.view.JasperDesignViewer" fork="true">

<arg value="-XML"/>

<arg value="-F${file.name}.jrxml"/>

<classpath refid="classpath"/>

</java>

</target>

 

6. Run the script and you should see the compiled template displayed nicely. IT DOES NOT!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

 

We get this! Can ANYONE solve this!? I-Report can open my compiled template fine, but this thing called JasperDesignViewer cant!!1 Yes we all tried ISO 8859-1 and it gave THE SAME problem.

 

 

org.apache.xerces.impl.io.MalformedByteSequenceException: Invalid byte 1 of 1-byte UTF-8 sequence.

at org.apache.xerces.impl.io.UTF8Reader.invalidByte(Unknown Source)

at org.apache.xerces.impl.io.UTF8Reader.read(Unknown Source)

at org.apache.xerces.impl.XMLEntityScanner.load(Unknown Source)

at org.apache.xerces.impl.XMLEntityScanner.skipString(Unknown Source)

at org.apache.xerces.impl.XMLVersionDetector.determineDocVersion(Unknown Source)

at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)

at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)

at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)

at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)

at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)

at org.apache.commons.digester.Digester.parse(Digester.java:1647)

at net.sf.jasperreports.engine.xml.JRXmlLoader.loadXML(JRXmlLoader.java:238)

at net.sf.jasperreports.engine.xml.JRXmlLoader.loadXML(JRXmlLoader.java:225)

at net.sf.jasperreports.engine.xml.JRXmlLoader.load(JRXmlLoader.java:213)

at net.sf.jasperreports.engine.xml.JRXmlLoader.load(JRXmlLoader.java:167)

at net.sf.jasperreports.engine.xml.JRXmlLoader.load(JRXmlLoader.java:151)

at net.sf.jasperreports.view.JRDesignViewer.loadReport(JRDesignViewer.java:531)

at net.sf.jasperreports.view.JRDesignViewer.<init>(JRDesignViewer.java:155)

at net.sf.jasperreports.view.JasperDesignViewer.<init>(JasperDesignViewer.java:51)

at net.sf.jasperreports.view.JasperDesignViewer.viewReportDesign(JasperDesignViewer.java:177)

at net.sf.jasperreports.view.JasperDesignViewer.main(JasperDesignViewer.java:152)

 

NESTED BY :

org.apache.xerces.impl.io.MalformedByteSequenceException: Invalid byte 1 of 1-byte UTF-8 sequence.

at org.apache.xerces.impl.io.UTF8Reader.invalidByte(Unknown Source)

at org.apache.xerces.impl.io.UTF8Reader.read(Unknown Source)

at org.apache.xerces.impl.XMLEntityScanner.load(Unknown Source)

at org.apache.xerces.impl.XMLEntityScanner.skipString(Unknown Source)

at org.apache.xerces.impl.XMLVersionDetector.determineDocVersion(Unknown Source)

at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)

at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)

at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)

at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)

at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)

at org.apache.commons.digester.Digester.parse(Digester.java:1647)

at net.sf.jasperreports.engine.xml.JRXmlLoader.loadXML(JRXmlLoader.java:238)

at net.sf.jasperreports.engine.xml.JRXmlLoader.loadXML(JRXmlLoader.java:225)

at net.sf.jasperreports.engine.xml.JRXmlLoader.load(JRXmlLoader.java:213)

at net.sf.jasperreports.engine.xml.JRXmlLoader.load(JRXmlLoader.java:167)

at net.sf.jasperreports.engine.xml.JRXmlLoader.load(JRXmlLoader.java:151)

at net.sf.jasperreports.view.JRDesignViewer.loadReport(JRDesignViewer.java:531)

at net.sf.jasperreports.view.JRDesignViewer.<init>(JRDesignViewer.java:155)

at net.sf.jasperreports.view.JasperDesignViewer.<init>(JasperDesignViewer.java:51)

at net.sf.jasperreports.view.JasperDesignViewer.viewReportDesign(JasperDesignViewer.java:177)

at net.sf.jasperreports.view.JasperDesignViewer.main(JasperDesignViewer.java:152)

 

NESTED BY :

net.sf.jasperreports.engine.JRException: Invalid byte 1 of 1-byte UTF-8 sequence.

at net.sf.jasperreports.engine.xml.JRXmlLoader.loadXML(JRXmlLoader.java:246)

at net.sf.jasperreports.engine.xml.JRXmlLoader.loadXML(JRXmlLoader.java:225)

at net.sf.jasperreports.engine.xml.JRXmlLoader.load(JRXmlLoader.java:213)

at net.sf.jasperreports.engine.xml.JRXmlLoader.load(JRXmlLoader.java:167)

at net.sf.jasperreports.engine.xml.JRXmlLoader.load(JRXmlLoader.java:151)

at net.sf.jasperreports.view.JRDesignViewer.loadReport(JRDesignViewer.java:531)

at net.sf.jasperreports.view.JRDesignViewer.<init>(JRDesignViewer.java:155)

at net.sf.jasperreports.view.JasperDesignViewer.<init>(JasperDesignViewer.java:51)

at net.sf.jasperreports.view.JasperDesignViewer.viewReportDesign(JasperDesignViewer.java:177)

at net.sf.jasperreports.view.JasperDesignViewer.main(JasperDesignViewer.java:152)

Caused by: org.apache.xerces.impl.io.MalformedByteSequenceException: Invalid byte 1 of 1-byte UTF-8 sequence.

at org.apache.xerces.impl.io.UTF8Reader.invalidByte(Unknown Source)

at org.apache.xerces.impl.io.UTF8Reader.read(Unknown Source)

at org.apache.xerces.impl.XMLEntityScanner.load(Unknown Source)

at org.apache.xerces.impl.XMLEntityScanner.skipString(Unknown Source)

at org.apache.xerces.impl.XMLVersionDetector.determineDocVersion(Unknown Source)

at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)

at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)

at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)

at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)

at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)

at org.apache.commons.digester.Digester.parse(Digester.java:1647)

at net.sf.jasperreports.engine.xml.JRXmlLoader.loadXML(JRXmlLoader.java:238)

... 9 more

Link to comment
Share on other sites

  • 11 months later...
  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

  • 1 month later...

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...