Skip to Main Content

Application Development Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

getting java.io.IOException: error=2, No such file or directory while trying to execute cp command i

user11994845Jun 17 2015 — edited Jun 17 2015

Hi,

I have created one UCM scheduled custom component to copy source folder to a destination folder using process builder which uses UNIX cp command.

 

ProcessBuilder pb=new ProcessBuilder("/bin/cp -r /Stellent/Source /Stellent/Destination");

Process process = pb.start();

 

process.waitFor();

But i am getting the below error when the scheduled component gets called. The above command works fine when i tried in putty.

java.io.IOException: error=2, No such file or directory

at java.lang.ProcessBuilder.start(ProcessBuilder.java:459)

at com.ucm.InvokeShellScript.excuteProcessBuilder(Unknown Source)

at com.ucm.InvokeShellScript.doFilter(Unknown Source)

at intradoc.shared.PluginFilters.filter(PluginFilters.java:94)

at intradoc.server.ScheduledSystemEvents.checkHandleEvent(ScheduledSystemEvents.java:622)

at intradoc.server.ScheduledSystemEvents.processWork(ScheduledSystemEvents.java:589)

at intradoc.server.ScheduledSystemEvents.run(ScheduledSystemEvents.java:487)

at java.lang.Thread.run(Thread.java:619)

Caused by: java.io.IOException: java.io.IOException: error=2, No such file or directory

at java.lang.UNIXProcess.<init>(UNIXProcess.java:148)

at java.lang.ProcessImpl.start(ProcessImpl.java:65)

at java.lang.ProcessBuilder.start(ProcessBuilder.java:452)

... 7 more

Please help me out in solving this error.

Thanks in advance.

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 15 2015
Added on Jun 17 2015
1 comment
2,040 views