liltyga
asked on
cfexecute problem
hi, can anyone decipher what may be the problem with the error code below? The problem is coming when trying to call a batch file, but the whole objective is to dynamically zip files while retaining their file structures. If this is not the right approach, can you please give an example/suggestion of how best to do it?
-tia
: An exception occurred when invoking an external process.
The cause of this exception was that: java.io.IOException: CreateProcess: 'c:\program files\winzip\wzzip' -rP 'D:\WebSites\IETM_DevSite\ tempZips\c omponent_2 0031201_15 3721.zip' 'D:\WebSites\IETM_DevSite\ data\EA-6B \ICAP III\Controls and Indicat\Aft Advisory Panel\*.*' error=2.
The error occurred in D:\WebSites\IETM_DevSite\d nldCompone nts\getFil e.cfm: line 22
20 : <!--- <cfx_ZipMan action="add" zipfile="#zipFile#" input_files="#lstFiles#"> --->
21 : <cfexecute name="'c:\program files\winzip\wzzip'"
22 : arguments="-rP '#zipFile#' 'D:\WebSites\IETM_DevSite\ data\EA-6B \ICAP III\Controls and Indicat\Aft Advisory Panel\*.*'" timeOut="10">
23 : </cfexecute>
24 : <cfexecute name="D:\WebSites\IETM_Dev Site\dnldC omponents\ execWinZip .bat" ></cfexecute>
-------------------------- ---------- ---------- ---------- ---------- ---------- ----
Please try the following:
Check the ColdFusion documentation to verify that you are using the correct syntax.
Search the Knowledge Base to find a solution to your problem.
Browser Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322)
Remote Address 192.168.74.90
Referrer
Date/Time 01-Dec-03 03:37 PM
Stack Trace (click to expand)
at cfgetFile2ecfm2018900984.r unPage(D:\ WebSites\I ETM_DevSit e\dnldComp onents\get File.cfm:2 2) at cfgetFile2ecfm2018900984.r unPage(D:\ WebSites\I ETM_DevSit e\dnldComp onents\get File.cfm:2 2)
java.io.IOException: CreateProcess: 'c:\program files\winzip\wzzip' -rP 'D:\WebSites\IETM_Dev Site\tempZ ips\compon ent_200312 01_153721. zip' 'D:\WebSites\IETM_Dev Site\data\ EA-6B\ICAP III\Controls and Indicat\Aft Advisory Panel\*.*' error=2
at java.lang.Win32Process.cre ate(Native Method)
at java.lang.Win32Process.<in it>(Win32P rocess.jav a:66)
at java.lang.Runtime.execInte rnal(Nativ e Method)
at java.lang.Runtime.exec(Run time.java: 566)
at java.lang.Runtime.exec(Run time.java: 428)
at java.lang.Runtime.exec(Run time.java: 364)
at java.lang.Runtime.exec(Run time.java: 326)
at coldfusion.tagext.lang.Exe cuteTag.do StartTag(E xecuteTag. java:138)
at cfgetFile2ecfm2018900984.r unPage(D:\ WebSites\I ETM_DevSit e\dnldComp onents\get File.cfm:2 2)
at coldfusion.runtime.CfJspPa ge.invoke( CfJspPage. java:147)
at coldfusion.tagext.lang.Inc ludeTag.do StartTag(I ncludeTag. java:357)
at coldfusion.filter.Cfinclud eFilter.in voke(Cfinc ludeFilter .java:62)
at coldfusion.filter.Applicat ionFilter. invoke(App licationFi lter.java: 107)
at coldfusion.filter.PathFilt er.invoke( PathFilter .java:80)
at coldfusion.filter.Exceptio nFilter.in voke(Excep tionFilter .java:47)
at coldfusion.filter.BrowserD ebugFilter .invoke(Br owserDebug Filter.jav a:52)
at coldfusion.filter.ClientSc opePersist enceFilter .invoke(Cl ientScopeP ersistence Filter.jav a:28)
at coldfusion.filter.BrowserF ilter.invo ke(Browser Filter.jav a:35)
at coldfusion.filter.GlobalsF ilter.invo ke(Globals Filter.jav a:43)
at coldfusion.filter.Datasour ceFilter.i nvoke(Data sourceFilt er.java:22 )
at coldfusion.CfmServlet.serv ice(CfmSer vlet.java: 105)
at jrun.servlet.ServletInvoke r.invoke(S ervletInvo ker.java:9 1)
at jrun.servlet.JRunInvokerCh ain.invoke Next(JRunI nvokerChai n.java:42)
at jrun.servlet.JRunRequestDi spatcher.i nvoke(JRun RequestDis patcher.ja va:252)
at jrun.servlet.ServletEngine Service.di spatch(Ser vletEngine Service.ja va:527)
at jrun.servlet.jrpp.JRunProx yService.i nvokeRunna ble(JRunPr oxyService .java:192)
at jrunx.scheduler.ThreadPool $Downstrea mMetrics.i nvokeRunna ble(Thread Pool.java: 348)
at jrunx.scheduler.ThreadPool $ThreadThr ottle.invo keRunnable (ThreadPoo l.java:451 )
at jrunx.scheduler.ThreadPool $UpstreamM etrics.inv okeRunnabl e(ThreadPo ol.java:29 4)
at jrunx.scheduler.WorkerThre ad.run(Wor kerThread. java:66)
-tia
: An exception occurred when invoking an external process.
The cause of this exception was that: java.io.IOException: CreateProcess: 'c:\program files\winzip\wzzip' -rP 'D:\WebSites\IETM_DevSite\
The error occurred in D:\WebSites\IETM_DevSite\d
20 : <!--- <cfx_ZipMan action="add" zipfile="#zipFile#" input_files="#lstFiles#"> --->
21 : <cfexecute name="'c:\program files\winzip\wzzip'"
22 : arguments="-rP '#zipFile#' 'D:\WebSites\IETM_DevSite\
23 : </cfexecute>
24 : <cfexecute name="D:\WebSites\IETM_Dev
--------------------------
Please try the following:
Check the ColdFusion documentation to verify that you are using the correct syntax.
Search the Knowledge Base to find a solution to your problem.
Browser Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322)
Remote Address 192.168.74.90
Referrer
Date/Time 01-Dec-03 03:37 PM
Stack Trace (click to expand)
at cfgetFile2ecfm2018900984.r
java.io.IOException: CreateProcess: 'c:\program files\winzip\wzzip' -rP 'D:\WebSites\IETM_Dev
at java.lang.Win32Process.cre
at java.lang.Win32Process.<in
at java.lang.Runtime.execInte
at java.lang.Runtime.exec(Run
at java.lang.Runtime.exec(Run
at java.lang.Runtime.exec(Run
at java.lang.Runtime.exec(Run
at coldfusion.tagext.lang.Exe
at cfgetFile2ecfm2018900984.r
at coldfusion.runtime.CfJspPa
at coldfusion.tagext.lang.Inc
at coldfusion.filter.Cfinclud
at coldfusion.filter.Applicat
at coldfusion.filter.PathFilt
at coldfusion.filter.Exceptio
at coldfusion.filter.BrowserD
at coldfusion.filter.ClientSc
at coldfusion.filter.BrowserF
at coldfusion.filter.GlobalsF
at coldfusion.filter.Datasour
at coldfusion.CfmServlet.serv
at jrun.servlet.ServletInvoke
at jrun.servlet.JRunInvokerCh
at jrun.servlet.JRunRequestDi
at jrun.servlet.ServletEngine
at jrun.servlet.jrpp.JRunProx
at jrunx.scheduler.ThreadPool
at jrunx.scheduler.ThreadPool
at jrunx.scheduler.ThreadPool
at jrunx.scheduler.WorkerThre
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks for the post references Anand - since they pointed me in the right direction, I'm accepting your comments as the answer. The solution I found was to use the ZipFileNew UDF, which is free and can be found here: http://www.cflib.org/udf.cfm?id=744&enable=1 (Thanks to Nathan Dintenfass for the code contribution!)
Later,
liltyga
Later,
liltyga
Does your attribute NAME start (and end) width an " and a ' ???? if so remove the ' at the begin and end like this:
<cfexecute name="c:\program files\winzip\wzzip" arguments="-rP '#zipFile#' 'D:\WebSites\IETM_DevSite\
Mause