Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello Community,
I have several jobs running in Talend Runtime (invoked by route/cTimer or service). In most cases everything work perfect, but sometimes I have exception:
Exception in component tWebService_2 java.lang.SecurityException: Unable to create temporary directory,C:\Users\*******\AppData\Local\Temp\wsdl149493219078118022 at org.talend.webservice.helper.ServiceDiscoveryHelper.createTempWsdlDir(ServiceDiscoveryHelper.java:101) at org.talend.webservice.helper.ServiceDiscoveryHelper.<init>(ServiceDiscoveryHelper.java:89) at org.talend.webservice.helper.ServiceDiscoveryHelper.<init>(ServiceDiscoveryHelper.java:77) at local_project.sendcustomer_0_1.SendCustomer.tHashInput_2Process(SendCustomer.java:8915) at local_project.sendcustomer_0_1.SendCustomer.tHashInput_1Process(SendCustomer.java:6978) at local_project.sendcustomer_0_1.SendCustomer.tMSSqlInput_1Process(SendCustomer.java:3554)
I guess it is related to parallel jobs execution. There is similar topic https://community.talend.com/t5/Design-and-Development/Unable-to-create-temporary-directory/td-p/102..., but no solution.
I also noticed that tWebService is not deleting temporary files, there are a lot of wsdlxxxxxxxxxxxxxxx folders in Temp.
It happens even if I specify temp folder in advanced properties.
Talend Open Studio 6.3.1
Windows Server 2012
JDK 1.8
Runtime is running as windows service
Any advice how to deal with this issues (both exception and not removed temp files)?
Thank you in advance!
I managed to solve both issues, so just to share solution if someone find it useful.
Yes, exception was caused by parallel execution. I wasn't able to avoid parallel execution, but I was able to specify UNIQUE temp folder for each tWebService component as:
"/tmp/" + pid+ "/" + currentComponent
Second issue with too many temp folders was caused by standard behavior of java temp files. Folders was deleted once I stop runtime. I don't plan to restart my runtime at all, so in PreJob I create temp folder "/tmp/" + pid and delete it in PostJob.
Hope someone will find this useful.
Hi,
The exception is random?
Are you excecuting in parallel multi instances of twebservice? This issue is probably caused by calling a webservice in parallel.
Have you tried to disable the parallel call and use just one thread to see if it works?
Best regards
Sabrina
I managed to solve both issues, so just to share solution if someone find it useful.
Yes, exception was caused by parallel execution. I wasn't able to avoid parallel execution, but I was able to specify UNIQUE temp folder for each tWebService component as:
"/tmp/" + pid+ "/" + currentComponent
Second issue with too many temp folders was caused by standard behavior of java temp files. Folders was deleted once I stop runtime. I don't plan to restart my runtime at all, so in PreJob I create temp folder "/tmp/" + pid and delete it in PostJob.
Hope someone will find this useful.