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

Job Not executing in Linux?

Hi all,
I created job and Job flow is below.
tFileInputExcel-->> tMap-->>tPostgresqlOutput
Excel File location is D:\File\Rerun.xls and Postgresql DB is located in different host(Ex 10.10.20.20)
Job is running in local machine.
I exported job in Linux and unzip the job.I tried to run shell script, I'm getting error.
Exception in component tFileInputExcel_1
java.lang.IllegalStateException: Zip File is closed
        at org.apache.poi.openxml4j.util.ZipFileZipEntrySource.getEntries(ZipFil                                                                              eZipEntrySource.java:45)
        at org.apache.poi.openxml4j.opc.ZipPackage.getPartsImpl(ZipPackage.java:                                                                              182)
        at org.apache.poi.openxml4j.opc.OPCPackage.getParts(OPCPackage.java:665)
        at org.apache.poi.openxml4j.opc.OPCPackage.open(OPCPackage.java:226)
        at org.apache.poi.openxml4j.opc.OPCPackage.open(OPCPackage.java:186)
        at org.apache.poi.POIXMLDocument.openPackage(POIXMLDocument.java:67)
        at org.apache.poi.xssf.usermodel.XSSFWorkbook.<init>(XSSFWorkbook.java:2                                                                              63)
        at reruns.test_rerun_alert_2014_0_1.Test_Rerun_Alert_2014.tFileInputExce                                                                              l_1Process(Test_Rerun_Alert_2014.java:2871)
        at reruns.test_rerun_alert_2014_0_1.Test_Rerun_Alert_2014.runJobInTOS(Te                                                                              st_Rerun_Alert_2014.java:5076)
        at reruns.test_rerun_alert_2014_0_1.Test_Rerun_Alert_2014.main(Test_Reru  
 Please give your inputs.
Thanks,
Kumar
Labels (4)
11 Replies
Anonymous
Not applicable
Author

Hi Kumar,
I hope you have changed the path of the input file to unix path...
Thanks
vaibhav
Anonymous
Not applicable
Author

Hi vaibhav.
Here Excel file and Postgresql are in different  hosts(locations).
How to change the input file path to unix path?
Thanks,
kumar
Anonymous
Not applicable
Author

Hi Kumar,
If you have used the variable, then default.properties file gets generated and is available inside exported folder...
If you have hard coded input file path, then it can't be converted after export. You will have to change the path and then export..
If the file is in different machine? whether it is accessible to the host machine? can you ping to that location? is it a network drive?
Vaibhav
Anonymous
Not applicable
Author

Hi Vaibhav,
I hard coded Excel file path in   tFileInputExcel component.
Excel File location is 10.10.10.30(  D:\File\Rerun.xls)  and Postgresql DB location in Linux (10.10.20.20)
I exported job in Linux and tried to run the job.

Thanks,
kumar
Anonymous
Not applicable
Author

Usually remote machines folders are not shared... can you see the file by some means from the host machine? 
you can access the database because database ports are enabled through firewall... 
The way you are working is not possible...
You have to ask client to provide network drive or cloud location or ftp location from where you can download the file... And once you have right location which could be seen from your host machine, then change the path properties in your talend job and export it again.
Thanks
Vaibhav
Anonymous
Not applicable
Author

Hi Vaibhav,
I moved Excel file from D drive to Network drive.
Now path is for Excel is "//10.10.10.30/space/Rerun.xls".Exported job into Linux.
Still i'm getting the same error.
Thanks,
Kumar
Anonymous
Not applicable
Author

tfileinput component can't access network drive..., first you will have to get that file to local machine using some network utility and then use it... See how can you get that file into your machine using some scp or similar utility with the help of tsystem component.
vaibhav
Anonymous
Not applicable
Author

Hi,
We are executing Talend job through Java application same as given above sample.
JCIM_ELink_Reporting_Tab6 eLink_Reporting_Tab6 = new JCIM_ELink_Reporting_Tab6();
String[] args1 = new String[] { "--context_param input1=D:/New/Myfolder/cert.xlsx", 
"--context_param output=D:/
New /Myfolder/out6.xls"};
eLink_Reporting_Tab6.runJob(args1);

 
But we are getting an exception as 
Exception in component tFileInputExcel_1
java.lang.IllegalStateException: Zip File is closed
at org.apache.poi.openxml4j.util.ZipFileZipEntrySource.getEntries(ZipFileZipEntrySource.java:45)
at org.apache.poi.openxml4j.opc.ZipPackage.getPartsImpl(ZipPackage.java:186)
at org.apache.poi.openxml4j.opc.OPCPackage.getParts(OPCPackage.java:673)
at org.apache.poi.openxml4j.opc.OPCPackage.open(OPCPackage.java:226)
at org.apache.poi.openxml4j.opc.OPCPackage.open(OPCPackage.java:186)
at org.apache.poi.POIXMLDocument.openPackage(POIXMLDocument.java:74)
at org.apache.poi.xssf.usermodel.XSSFWorkbook.<init>(XSSFWorkbook.java:296)

Can you please explain where i am going wrong?
 
Anonymous
Not applicable
Author

Hi,
We are executing Talend job through Java application same as given above sample.
JCIM_ELink_Reporting_Tab6 eLink_Reporting_Tab6 = new JCIM_ELink_Reporting_Tab6();
String[] args1 = new String[] { "--context_param input1=D:/New/Myfolder/cert.xlsx", 
"--context_param output=D:/
New/Myfolder/out6.xls"};
eLink_Reporting_Tab6.runJob(args1);

What's your Excel? Excel 2003(.xls) or Excel 2007(.xlsx)? We see that there are two types of excel for your input and output.
Best regards
Sabrina