Java.io.IOException when exporting to Excel

Java.io.IOException when exporting to Excel

  

I've built an export to Excel, very simple, and in my developnnet environment it works fine. I installed the application in our production environment, and the following error message appears when usingthe exact same export.


Anyone an idea where to look for my problem? I would have expected the same behavior, a pop-up asking me to open the export in Excel or save it to disk. Thnx!


Hi Charles,


Check the logs in Service Center for more information about the error.

Just knowing that it's a java.io.IOException is too generic for us to be able to help.


Regards,
João Rosado

João Rosado wrote:

Hi Charles,


Check the logs in Service Center for more information about the error.

Just knowing that it's a java.io.IOException is too generic for us to be able to help.


Regards,
João Rosado

Thnx João.

I've looked into the logs, and it's quite abacadabra to me :-)

Attached the error log in detail ... hopefully you can point me in the right direction.

Because our (similar) development environment is working fine, I guess it could be an infrastructural issue.

Have a nice weekend and kind regards,

Charles


Hi Charles,


A quick look at it and googling some key parts of the error ("createAndRegisterSXSSFSheet" and "No such file or directory") leads to some results about not having permissions to write in the /tmp folder or when the temporary files that it created were deleted already.


Can it be that your production system has different permissions rules for that folder?


Regards,
João Rosado

I'll have somebody have a look into your sugegstions Joao ... thnx for so far!


Solution

It was due to a missing directory /tmp/poifiles. Why this directory was missing on our production server was missing beats me, but after manually creating it with the correct ownership and privileges (wls_outsystems:wls_outsystems - 750) the excel export worked again (including another issue with showing uploaded images).
I found a bug fix (#1523762) that mentions the disappearance of the /tmp/poifiles directory after exporting to excel, so probably this was the reason for this directory to be removed.

What I am still wondering though is, when this directory was created in the first place: at installation time or should this directory be created when the managed server is started (WebLogic is able to write to /tmp).

Best regards,

Marcel Lambrechts

Solution

Thnx for solving our problem Marcel, and thnx Joao off course for the help!

Probably todo with some known "bug" in the Apache POI component that is used for exporting to Excel (see link http://stackoverflow.com/questions/29285076/java-apache-poi-sxssfworkbook-unable-to-create-sheets). This could mean (I have not tested this) that if you have 2 applications running that both use the Excel exporting functionality and you shutdown one of them (delete an espace?), this would remove the /tmp/poifiles directory.
Perhaps this has happened on our environment that would explain the disappearance of this directory.