开发者

org.xml.sax.SAXParseException with JasperReports [closed]

Closed. This question needs debugging details. It is not currently accepting answers.

Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.

Closed 2 years ago.

Improve this question

Sorry for dummy question, but i lost my whole day to start with JasperReport. The problem is that i always receive this exception: "org.xml.sax.SAXParseException: Premature end of file." when i am trying to read .jrxml file. It is not possible to not to be well-formed, because its generated with iReport.

I 开发者_Python百科asked in jasper forums, but no solution up to now. When I searched about this error in web, generally its involved with WebService technologies, but i`m running my app in local db connection without application container. Any ideas?

Thanks in advance.


You may want to make sure your iReport installation is using an appropriate iText jar. If you are using iReport with JasperServer you will want to verify that both are using the same version of iText. The last time I saw this error in this context it turned out the JasperServer install was using an older version of iText than iReport - and it required the older version. Using the same jar for both products resolved the issue.


The version of JasperReports in your application is probably different than the one in your application.


Did you make the file with iReport and trying to open it in the same iReport or another iReport version?

Possible problems:

  • The file has been made in iReport and opened in another version.
  • The file is made with iReport then the XML source is modified outside iReport.

I hope you have an SVN where a previous version of the files exists, if so, try to compare them. Another suggestion, if the file is on a remote folder (ie. server) copy it to local folder and try.

Another guess, are you trying to compile the file with JasperReports? This is a common problem when the file is made with iReport version and the JasperReport is older or newer. Make sure the jasperreports*.jar files in the iReport directory, are the same as the ones you are using to compile in your project.

UPDATE: Take a look here at JavaForums, a missing xsd/dtd or saaj.jar could cause this problem.


check settings under
C:\Users\XXXXX\.ireport\3.7.0\config\Windows2Local\Components
maybe some configuration files is destroyed

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜