Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Got Exception when run a report
Jliu
Hi there,
I got an exception like when I render a page which contains a birt report through JSP tag <birt:viewer reportDesign="myreport.rptdesign"/>. Exception is like this:
Caused by: org.eclipse.birt.report.engine.api.EngineException: Can not open the report archive.
at org.eclipse.birt.report.engine.api.impl.RunTask.openReportDocument(RunTask.java:179)
at org.eclipse.birt.report.engine.api.impl.RunTask.doRun(RunTask.java:219)
at org.eclipse.birt.report.engine.api.impl.RunTask.run(RunTask.java:85)
at org.eclipse.birt.report.service.ReportEngineService.runReport(ReportEngineService.java:1307)
... 142 more
Caused by: java.io.IOException: The filename, directory name, or volume label syntax is incorrect
at java.io.WinNTFileSystem.canonicalize0(Native Method)
at java.io.Win32FileSystem.canonicalize(Win32FileSystem.java:395)
at java.io.File.getCanonicalPath(File.java:531)
at org.eclipse.birt.core.archive.compound.ArchiveFile.(ArchiveFile.java:65)
at org.eclipse.birt.core.archive.compound.ArchiveFile.(ArchiveFile.java:53)
at org.eclipse.birt.core.archive.compound.ArchiveWriter.(ArchiveWriter.java:34)
at org.eclipse.birt.core.archive.FileArchiveWriter.(FileArchiveWriter.java:27)
at org.eclipse.birt.report.engine.api.impl.RunTask.openArchive(RunTask.java:147)
at org.eclipse.birt.report.engine.api.impl.RunTask.openReportDocument(RunTask.java:158)
... 145 more
The weird thing is if deploy my WAR file separately on JBoss, the page renders OK. But If I deploy my WAR under a enterprise.ear, it gives me this error.
In my application.xml, I have this:
<module>
<web>
<web-uri>birt.war</web-uri>
<context-root>/_enterprise/birt</context-root>
</web>
</module>
I wonder if I should adjust reportDesign="myreport.rptdesign" to reportDesign="/_enterprise/birt/myreport.rptdesign" ? I actually tried that, but still not working. I wonder why the error msg says "Can not open the report archive", is there an archive folder located somewhere?
thanks,
Jane
Find more posts tagged with
Comments
JasonW
Jane,
My guess is this is a permission error. When the viewer is deployed there is a setting to write the report documents to a specific folder.
<!--
Temporary document files directory. Defaults to ${birt home}/documents
-->
<context-param>
<param-name>BIRT_VIEWER_DOCUMENT_FOLDER</param-name>
<param-value></param-value>
</context-param>
If you are using a frameset mapping in the viewer tag a rptdocument gets created in the above directory. My assumption is the document is not getting created. To test this add the pattern attribute to the viewer tag and set it to run instead of framest. This will not create the report document which is needed for pagination etc, but will test to see if it may be a permission issue.
http://www.eclipse.org/birt/phoenix/deploy/viewerUsageMain.php#tags
Jason
Jliu
Hi Jason,
Thanks so much! It does solve the problem with "cannot open file", and I get a step further. In fact, my page just need to show the chart generated from the report and I do not want pagination. So it might be OK for me to just run with pattern="run". But I got another exception right away, see below.
Do you know what image file it's talking about?
thanks!
Jane
2011-03-09 10:13:44,933 ERROR [STDERR] AxisFault
faultCode: {
http://schemas.xmlsoap.org/soap/envelope/}Server.userException
faultSubcode:
faultString: org.eclipse.birt.report.service.api.ReportServiceException: Missing image file.
faultActor:
faultNode:
faultDetail:
{
http://xml.apache.org/axis/}stackTrace:org.eclipse.birt.report.service.api.ReportServiceException
: Missing image file.
at org.eclipse.birt.report.service.ReportEngineService.throwDummyException(ReportEngineService.java:1096)
at org.eclipse.birt.report.service.ReportEngineService.renderImage(ReportEngineService.java:530)
at org.eclipse.birt.report.service.BirtViewerReportService.getImage(BirtViewerReportService.java:589)
at org.eclipse.birt.report.service.actionhandler.AbstractRenderImageActionHandler.__execute(AbstractRenderImageActionHandler.java:44)
at org.eclipse.birt.report.service.actionhandler.AbstractBaseActionHandler.execute(AbstractBaseActionHandler.java:90)
at org.eclipse.birt.report.presentation.aggregation.layout.EngineFragment.doService(EngineFragment.java:251)
at org.eclipse.birt.report.presentation.aggregation.AbstractBaseFragment.service(AbstractBaseFragment.java:76)
at org.eclipse.birt.report.servlet.BirtEngineServlet.__doGet(BirtEngineServlet.java:120)
at org.eclipse.birt.report.servlet.BaseReportEngineServlet.doGet(BaseReportEngineServlet.java:185)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
at org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:327)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.eclipse.birt.report.servlet.BaseReportEngineServlet.service(BaseReportEngineServlet.java:116)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.eclipse.birt.report.filter.ViewerFilter.doFilter(ViewerFilter.java:68)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at com.intuit.wcg.servlet.filter.DomainLayerFilter.doFilter(DomainLayerFilter.java:139)
JasonW
If you view the source of the generated html it should show the directory it is expecting the image to be in. This is also a setting in the web.xml which I assume is not being created because of a permission issue much like the report document. You can hard code the image location in the web.xml to test this.
Jason
Jliu
so I saw this in HTML:
<img style="width: 654.75pt; height: 264.75pt; display: block;" alt="" src="/_intuit/index/preview?__sessionId=20110309_170620_771&__imageid=custom1cdd02d12e9d4311c72.png" id="__bookmark_1">
Is this image auto-generated when BIRT runs? I checked my web.xml and it has this :
<context-param>
<param-name>BIRT_VIEWER_IMAGE_DIR</param-name>
<param-value></param-value>
</context-param>
<!--
Flag whether the report resources can only be accessed under the
working folder. Defaults to true
-->
<context-param>
<param-name>WORKING_FOLDER_ACCESS_ONLY</param-name>
<param-value>true</param-value>
</context-param>
So it should configured correctly. right? How can I solve the permission issue?
Thanks!
Jane
JasonW
Jane,
The image is auto generated by the report engine. If you do not set a directory in the web.xml it generates it in the \report\images\ directory of the exploded war file. Can you search your system for this directory and verify that the process running the app server has write permission to this directory?
Jason