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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Jj5
Contributor III
Contributor III

Talend Job over network - CMD doesnt support UNC paths

I'm trying to run a remote job on a server. When I run the job inside TOS, it runs perfectly. However when I execute the job remotely, I get the following error: 
'\\fs1\universe\Talend\Lenders\OSC\OSC8129001\OSC8129001'
CMD.EXE was started with the above path as the current directory.
UNC paths are not supported.  Defaulting to Windows directory.
C:\Windows>\\
'\\' is not recognized as an internal or external command,
operable program or batch file.
C:\Windows>cd \\fs1\universe\Talend\Lenders\OSC\OSC8129001\OSC8129001\
'\\fs1\universe\Talend\Lenders\OSC\OSC8129001\OSC8129001\'
CMD does not support UNC paths as current directories.
C:\Windows>java -Xms256M -Xmx1024M -cp ../lib/commons-lang-2.4.jar;../lib/dom4j-
1.6.1.jar;../lib/jakarta-oro-2.0.8.jar;../lib/talendcsv.jar;../lib/talend_file_e
nhanced_20070724.jar;../lib/systemRoutines.jar;../lib/userRoutines.jar;.;osc8129
001_0_1.jar; creditcentral.osc8129001_0_1.OSC8129001 --context=Default
Error: Could not find or load main class creditcentral.osc8129001_0_1.OSC8129001

I have a tFileList that has the following filepath: 
(String)System.getProperty("user.dir")
Any recommendations/suggestions?
Labels (3)
9 Replies
Anonymous
Not applicable

Hi,
Please have a look at  jira issue https://jira.talendforge.org/browse/TDI-892
Best regards
Sabrina
Jj5
Contributor III
Contributor III
Author

Hi,
Please have a look at  jira issue https://jira.talendforge.org/browse/TDI-892
Best regards
Sabrina

Thanks for the link xdshi. I found that link earlier when I was researching the problem but it didn't work for me. I'm attaching a screenshot that shows the unc path I used and it still didn't work. 
0683p000009MEdO.png
Anonymous
Not applicable

You can try to use the / (without double it) instead of \ because the JVM translate it automatically into the appropriated char. This way you avoid the hassle with the \ as escape char.
Jj5
Contributor III
Contributor III
Author

You can try to use the / (without double it) instead of \ because the JVM translate it automatically into the appropriated char. This way you avoid the hassle with the \ as escape char.

That's interesting, I didn't know that. Unfortunately, I still have the same error message. 

'\\fs1\universe\Talend\Lenders\OSC\OSC8129001\OSC8129001'
CMD.EXE was started with the above path as the current directory.
UNC paths are not supported.  Defaulting to Windows directory.
C:\Windows>\\
'\\' is not recognized as an internal or external command,
operable program or batch file.
C:\Windows>cd \\fs1\universe\Talend\Lenders\OSC\OSC8129001\OSC8129001 \
'\\fs1\universe\Talend\Lenders\OSC\OSC8129001\OSC8129001\'
CMD does not support UNC paths as current directories.
C:\Windows>java -Xms256M -Xmx1024M -cp ../lib/commons-lang-2.4.jar;../lib/dom4j-
1.6.1.jar;../lib/jakarta-oro-2.0.8.jar;../lib/talendcsv.jar;../lib/talend_file_e
nhanced_20070724.jar;../lib/systemRoutines.jar;../lib/userRoutines.jar;.;osc8129
001_0_1.jar; creditcentral.osc8129001_0_1.OSC8129001_  --context=Default
Error: Could not find or load main class creditcentral.osc8129001_0_1
.OSC8129001
Jj5
Contributor III
Contributor III
Author

It seems that the error lies in the job_run.bat file that Talend generates for building jobs.
In the batch file the first two lines are:
%~d0
cd %~dp0
The error occurs when CMD tries to cd to the UNC path. When I edited the batch file to instead say  "pushd %~dp0" instead of "cd %~dp0" it worked. Is there a more elegant solution or even an option in Talend that will let the jobs run on network drives, or will I have to edit every batch file I create from now on?
Jj5
Contributor III
Contributor III
Author

Is there any workarounds to get past manually editing every job_run.bat file manually and changing "cd" to "pushd"?
Jj5
Contributor III
Contributor III
Author

Any thoughts?
Anonymous
Not applicable

Hi,
as file script is generated by Talend, I don't think so (there is a workaround).
Ask as a feature to bugtracker that Talend generate such a file that avoid that 'UNC constraint'.
unfortunatly I'm not able to give you more information.
ps: write a little script that modify syntax ....
regards
laurent
Jj5
Contributor III
Contributor III
Author

Hi,
as file script is generated by Talend, I don't think so (there is a workaround).
Ask as a feature to bugtracker that Talend generate such a file that avoid that 'UNC constraint'.
unfortunatly I'm not able to give you more information.
ps: write a little script that modify syntax ....
regards
laurent

Thanks for the reply kzone. I took your advice and created a ticket so I'll wait it out and see what happens next.