Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

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: java.io.IOException: Permission denied
       at org.apache.poi.xssf.streaming.SXSSFWorkbook.createAndRegisterSXSSFSheet(SXSSFWorkbook.java:628)
       at org.apache.poi.xssf.streaming.SXSSFWorkbook.createSheet(SXSSFWorkbook.java:645)
       at org.talend.ExcelTool.prepareXlsxFile(ExcelTool.java:131)
       at talendrunbook.configcheck_copy_1_0.ConfigCheck_Copy.tMysqlInput_4Process(ConfigCheck_Copy.java:4478)
       at talendrunbook.configcheck_copy_1_0.ConfigCheck_Copy.tMysqlInput_3Process(ConfigCheck_Copy.java:11962)
       at talendrunbook.configcheck_copy_1_0.ConfigCheck_Copy.tMysqlInput_8Process(ConfigCheck_Copy.java:11350)
       at talendrunbook.configcheck_copy_1_0.ConfigCheck_Copy.tMysqlInput_12Process(ConfigCheck_Copy.java:10652)
       at talendrunbook.configcheck_copy_1_0.ConfigCheck_Copy.tMysqlInput_13Process(ConfigCheck_Copy.java:10244)
       at talendrunbook.configcheck_copy_1_0.ConfigCheck_Copy.tMysqlInput_1Process(ConfigCheck_Copy.java:9873)
       at talendrunbook.configcheck_copy_1_0.ConfigCheck_Copy.tMysqlConnection_1Process(ConfigCheck_Copy.java:9322)
       at talendrunbook.configcheck_copy_1_0.ConfigCheck_Copy.tHDFSConnection_2Process(ConfigCheck_Copy.java:18039)
       at talendrunbook.configcheck_copy_1_0.ConfigCheck_Copy.tJava_3Process(ConfigCheck_Copy.java:18300)
       at talendrunbook.configcheck_copy_1_0.ConfigCheck_Copy$6.run(ConfigCheck_Copy.java:18922)
Caused by: java.io.IOException: Permission denied
       at java.io.UnixFileSystem.createFileExclusively(Native Method)
       at java.io.File.createNewFile(File.java:1006)
       at java.io.File.createTempFile(File.java:1989)
       at org.apache.poi.util.TempFile$DefaultTempFileCreationStrategy.createTempFile(TempFile.java:105)
       at org.apache.poi.util.TempFile.createTempFile(TempFile.java:60)
       at org.apache.poi.xssf.streaming.SheetDataWriter.createTempFile(SheetDataWriter.java:80)
       at org.apache.poi.xssf.streaming.SheetDataWriter.<init>(SheetDataWriter.java:63)
       at org.apache.poi.xssf.streaming.SheetDataWriter.<init>(SheetDataWriter.java:68)
       at org.apache.poi.xssf.streaming.SXSSFWorkbook.createSheetDataWriter(SXSSFWorkbook.java:292)
       at org.apache.poi.xssf.streaming.SXSSFSheet.<init>(SXSSFSheet.java:69)
       at org.apache.poi.xssf.streaming.SXSSFWorkbook.createAndRegisterSXSSFSheet(SXSSFWorkbook.java:624)
       ... 12 more

Even a small help is appreciated. Thanks in advance.
Labels (3)
8 Replies
Anonymous
Not applicable
Author

Hi,
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
Sabrina
Anonymous
Not applicable
Author

Hi,
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.
Thanks.
Anonymous
Not applicable
Author

Hello,
You can workaround this problem by explicitly setting the -Djava.io.tempdir, 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 -Djava.io.tempdir=$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.
Thanks,
Anonymous
Not applicable
Author

Hi 

 

How to set the -Djava.io.tempdir=$ROOT_PATH at the job level before exporting
as jobscript ?

 

Thank's

raffaeledileo
Contributor
Contributor

I think you should set that workaround inside the .sh as  shown below

0683p000009M8JD.jpg

 

y1h2n
Contributor
Contributor

Hi,

Did you solve this problem ?

I'm facing the same issue with TOS 6.4.1.

I tried to set tempdir as @Raffaele Di Leo​ suggest but it seems that this parameter has no effect.

By the way, the proper command seems to be -Djava.io.tmpdir (instead of tempdir)

y1h2n
Contributor
Contributor

Sorry, my mistake.

It works, the "poisfiles" directory is now in the right directory with the right permission.

Thanks !

lidyajaah
Contributor
Contributor

Thank you! It's help me too.