tFileExcelOutput component giving Permission denied exception

One Star

tFileExcelOutput component giving Permission denied exception

Hi All,
I am working on talend 5.6.2 data services through big data.
I writing a data to excel using tFileExcelOutput component and running the job from unix env using sh file.
I am running the job parallel from two UNIX terminal with two diff users.
Job from second window is getting failed with the below error

Exception in component tFileOutputExcel_2
java.lang.RuntimeException: Permission denied
       at org.apache.poi.xssf.streaming.SXSSFWorkbook.createAndRegisterSXSSFSheet(
       at org.apache.poi.xssf.streaming.SXSSFWorkbook.createSheet(
       at org.talend.ExcelTool.prepareXlsxFile(
       at talendrunbook.configcheck_copy_1_0.ConfigCheck_Copy.tMysqlInput_4Process(
       at talendrunbook.configcheck_copy_1_0.ConfigCheck_Copy.tMysqlInput_3Process(
       at talendrunbook.configcheck_copy_1_0.ConfigCheck_Copy.tMysqlInput_8Process(
       at talendrunbook.configcheck_copy_1_0.ConfigCheck_Copy.tMysqlInput_12Process(
       at talendrunbook.configcheck_copy_1_0.ConfigCheck_Copy.tMysqlInput_13Process(
       at talendrunbook.configcheck_copy_1_0.ConfigCheck_Copy.tMysqlInput_1Process(
       at talendrunbook.configcheck_copy_1_0.ConfigCheck_Copy.tMysqlConnection_1Process(
       at talendrunbook.configcheck_copy_1_0.ConfigCheck_Copy.tHDFSConnection_2Process(
       at talendrunbook.configcheck_copy_1_0.ConfigCheck_Copy.tJava_3Process(
       at talendrunbook.configcheck_copy_1_0.ConfigCheck_Copy$
Caused by: Permission denied
       at Method)
       at org.apache.poi.util.TempFile$DefaultTempFileCreationStrategy.createTempFile(
       at org.apache.poi.util.TempFile.createTempFile(
       at org.apache.poi.xssf.streaming.SheetDataWriter.createTempFile(
       at org.apache.poi.xssf.streaming.SheetDataWriter.<init>(
       at org.apache.poi.xssf.streaming.SheetDataWriter.<init>(
       at org.apache.poi.xssf.streaming.SXSSFWorkbook.createSheetDataWriter(
       at org.apache.poi.xssf.streaming.SXSSFSheet.<init>(
       at org.apache.poi.xssf.streaming.SXSSFWorkbook.createAndRegisterSXSSFSheet(
       ... 12 more

Even a small help is appreciated. Thanks in advance.

Re: tFileExcelOutput component giving Permission denied exception

Does the user have the read and execute permission on application?
If not, have you tried to add read/execution right on the desired ?TalendOpenStudio-*? binary to see if it is working well?
Best regards
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
One Star

Re: tFileExcelOutput component giving Permission denied exception

Thanks for reply.
I am able to debug it. Problem is talend is creating a temporary directory named "poifiles" in systems temp space for creating ".xlsx" file.
If we run the job with two users parallelly, then second user's process is trying to create "poifiles" which is already created and used by first user's process. So the second process has to wait until the first process completes its work and delete that temp directory created by it.
So, Now how can i go forward with this. It seems to be bug which i think so.

Re: tFileExcelOutput component giving Permission denied exception

You can workaround this problem by explicitly setting the, in the Talend component there is no
hard coding about the tmp somewhere.
The problem should be coming from the libraries, it is storing the file that you mention in your system java temp folder
which on linux by default is /tmp.
To avoid the problem in your scenario you need to set the$ROOT_PATH at the job level before exporting
as jobscript, so any person running the job will use the folder where the job is as a java temp directory.
Hope this help you.
Five Stars

Re: tFileExcelOutput component giving Permission denied exception

Hi @adiallo


How to set the$ROOT_PATH at the job level before exporting
as jobscript ?




Talend named a Leader.

Get your copy


Kickstart your first data integration and ETL projects.

Download now

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Put Massive Amounts of Data to Work

Learn how to make your data more available, reduce costs and cut your build time

Watch Now

How OTTO Utilizes Big Data to Deliver Personalized Experiences

Read about OTTO's experiences with Big Data and Personalized Experiences


Talend Integration with Databricks

Take a look at this video about Talend Integration with Databricks

Watch Now