Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » IOException File name too long, when try birt.war on WSO2 server on linux(got IOException File name too long, when generating temporary document.)
IOException File name too long, when try birt.war on WSO2 server on linux [message #1729856] Tue, 19 April 2016 15:01 Go to next message
Clovis Wichoski is currently offline Clovis WichoskiFriend
Messages: 11
Registered: January 2016
Junior Member
Hi,

I just downloaded BIRT runtime 4.5.0 and uploaded birt.war to a WSO2 Application Server (its uses tomcat) running on Ubuntu 14.04.4 LTS 64bit, when I clicked to see the test.rptdesign I receive a dialog Exception with the message:

org.eclipse.birt.report.service.api.ReportServiceException: Can not open the report archive.

here is the full stack trace:

org.eclipse.birt.report.service.api.ReportServiceException: Can not open the report archive.
   at org.eclipse.birt.report.service.ReportEngineService.throwDummyException(ReportEngineService.java:1115)
   at org.eclipse.birt.report.service.ReportEngineService.runReport(ReportEngineService.java:1334)
   at org.eclipse.birt.report.service.BirtViewerReportService.runReport(BirtViewerReportService.java:159)
   at org.eclipse.birt.report.service.actionhandler.BirtRunReportActionHandler.__execute(BirtRunReportActionHandler.java:81)
   at org.eclipse.birt.report.service.actionhandler.BirtGetPageActionHandler.__checkDocumentExists(BirtGetPageActionHandler.java:58)
   at org.eclipse.birt.report.service.actionhandler.AbstractGetPageActionHandler.prepareParameters(AbstractGetPageActionHandler.java:118)
   at org.eclipse.birt.report.service.actionhandler.AbstractGetPageActionHandler.__execute(AbstractGetPageActionHandler.java:103)
   at org.eclipse.birt.report.service.actionhandler.AbstractBaseActionHandler.execute(AbstractBaseActionHandler.java:90)
   at org.eclipse.birt.report.soapengine.processor.AbstractBaseDocumentProcessor.__executeAction(AbstractBaseDocumentProcessor.java:47)
   at org.eclipse.birt.report.soapengine.processor.AbstractBaseComponentProcessor.executeAction(AbstractBaseComponentProcessor.java:143)
   at org.eclipse.birt.report.soapengine.processor.BirtDocumentProcessor.handleGetPage(BirtDocumentProcessor.java:87)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   at java.lang.reflect.Method.invoke(Method.java:497)
   at org.eclipse.birt.report.soapengine.processor.AbstractBaseComponentProcessor.process(AbstractBaseComponentProcessor.java:112)
   at org.eclipse.birt.report.soapengine.endpoint.BirtSoapBindingImpl.getUpdatedObjects(BirtSoapBindingImpl.java:66)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   at java.lang.reflect.Method.invoke(Method.java:497)
   at org.apache.axis.providers.java.RPCProvider.invokeMethod(RPCProvider.java:397)
   at org.apache.axis.providers.java.RPCProvider.processMessage(RPCProvider.java:186)
   at org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:323)
   at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
   at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
   at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
   at org.apache.axis.handlers.soap.SOAPService.invoke(SOAPService.java:454)
   at org.apache.axis.server.AxisServer.invoke(AxisServer.java:281)
   at org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:699)
   at org.eclipse.birt.report.servlet.BirtSoapMessageDispatcherServlet.doPost(BirtSoapMessageDispatcherServlet.java:265)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:646)
   at org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:327)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
   at org.eclipse.birt.report.servlet.BirtSoapMessageDispatcherServlet.service(BirtSoapMessageDispatcherServlet.java:122)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
   at org.eclipse.birt.report.filter.ViewerFilter.doFilter(ViewerFilter.java:68)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
   at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
   at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
   at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
   at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:504)
   at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
   at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
   at org.wso2.carbon.statistics.webapp.RequestIntercepterValve.invoke(RequestIntercepterValve.java:47)
   at org.wso2.carbon.bam.webapp.stat.publisher.WebAppStatisticPublisherValve.invoke(WebAppStatisticPublisherValve.java:104)
   at org.wso2.carbon.tomcat.ext.valves.CompositeValve.continueInvocation(CompositeValve.java:99)
   at org.wso2.carbon.tomcat.ext.valves.CarbonTomcatValve$1.invoke(CarbonTomcatValve.java:47)
   at org.wso2.carbon.webapp.mgt.TenantLazyLoaderValve.invoke(TenantLazyLoaderValve.java:57)
   at org.wso2.carbon.tomcat.ext.valves.TomcatValveContainer.invokeValves(TomcatValveContainer.java:47)
   at org.wso2.carbon.tomcat.ext.valves.CompositeValve.invoke(CompositeValve.java:62)
   at org.wso2.carbon.tomcat.ext.valves.CarbonStuckThreadDetectionValve.invoke(CarbonStuckThreadDetectionValve.java:159)
   at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)
   at org.wso2.carbon.tomcat.ext.valves.CarbonContextCreatorValve.invoke(CarbonContextCreatorValve.java:57)
   at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
   at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:421)
   at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1074)
   at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:611)
   at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1739)
   at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1698)
   at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
   at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
   at java.lang.Thread.run(Thread.java:745)
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:189)
   at org.eclipse.birt.report.engine.api.impl.RunTask.doRun(RunTask.java:231)
   at org.eclipse.birt.report.engine.api.impl.RunTask.run(RunTask.java:89)
   at org.eclipse.birt.report.service.ReportEngineService.runReport(ReportEngineService.java:1325)
... 66 more
Caused by: java.io.IOException: File name too long
   at java.io.UnixFileSystem.canonicalize0(Native Method)
   at java.io.UnixFileSystem.canonicalize(UnixFileSystem.java:172)
   at java.io.File.getCanonicalPath(File.java:618)
   at org.eclipse.birt.core.archive.compound.ArchiveFile.(ArchiveFile.java:73)
   at org.eclipse.birt.core.archive.compound.ArchiveFile.(ArchiveFile.java:61)
   at org.eclipse.birt.core.archive.compound.ArchiveWriter.(ArchiveWriter.java:32)
   at org.eclipse.birt.core.archive.FileArchiveWriter.(FileArchiveWriter.java:27)
   at org.eclipse.birt.report.engine.api.impl.RunTask.openArchive(RunTask.java:151)
   at org.eclipse.birt.report.engine.api.impl.RunTask.openReportDocument(RunTask.java:162)
... 69 more


After analysing the Stack, I can see that the problem is with the name o temporaty document files, on creating, here is a cut from log FINEST activated:

FINE: 
    ReportEngine.openReportDocument: 
        systemId=/opt/wso2/producao/repository/deployment/server/webapps/birt/test.rptdesign, 
        file=
          /opt/wso2/producao/repository/deployment/server/webapps/birt/documents/
              BIRTDOCFDBDE24014567FF09F82C8C5FED3B61797D3A6615544AD775FE5BF15E23D7A5D0E7053B844B48198D1AC9FD15B2D60E7762757601E37EAE37F9CC35A2A9CF239E0DC90105B6F7BA27B8CBC718F412D1AF3BEB27B69DCCC919CC17E440BFAA92143BF367CC8F5E5067571CF9FF8BBABD8432E646E030FF7051123C5B6DAE3E6FD/
              20160419_102521_150/
              test.rptdocument, 
          options={
              semanticCheck=false, 
              resourceFolder=/opt/wso2/producao/repository/deployment/server/webapps/birt
          }

*idented for easy of reading

as we can see the long name of folder that starts with de name BIRTDOC* maybe the problem, there is a way to workaround this?

I tried for example to set
BIRT_VIEWER_DOCUMENT_FOLDER to /tmp/birt/documents, but still got these exceptions.

Thanks
Re: IOException File name too long, when try birt.war on WSO2 server on linux [message #1731263 is a reply to message #1729856] Tue, 03 May 2016 22:35 Go to previous messageGo to next message
Luis García is currently offline Luis GarcíaFriend
Messages: 1
Registered: May 2016
Junior Member
I have the same problem Sad
Do you have any solution for this?
Re: IOException File name too long, when try birt.war on WSO2 server on linux [message #1735454 is a reply to message #1729856] Sun, 19 June 2016 23:01 Go to previous messageGo to next message
Clovis Wichoski is currently offline Clovis WichoskiFriend
Messages: 11
Registered: January 2016
Junior Member
After some research in BIRT source code I found the problem in ViewingCache class, the developer used the ID of session as the folder name, but in WSO2 Application Server the session ID is very large, attached is a patch that I changed the sources from:

folder = ( prefix + sessionId ) + File.separator;


to:

folder = ( prefix + File.separator + sessionId.hashCode() ) + File.separator;


I think using hashCode here is better than full session id, and we get an unique and more reduced dynamic name for folders.

I will fork BIRT code and ask a pull request.


Re: IOException File name too long, when try birt.war on WSO2 server on linux [message #1766994 is a reply to message #1735454] Thu, 29 June 2017 11:30 Go to previous message
Isuru Ranaweera is currently offline Isuru RanaweeraFriend
Messages: 1
Registered: June 2017
Junior Member
How did you edit and repackage the jar? I downloaded the sources but could not find the dependencies. cloned the birt source the latest, it doesn't successfully build either.
Previous Topic:javascript insert html radio button
Next Topic:How can i export my json file to pdf file using birt
Goto Forum:
  


Current Time: Fri Apr 26 07:17:39 GMT 2024

Powered by FUDForum. Page generated in 0.03471 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top