<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Geoprocessing service failed to delete existing output in Geoprocessing Questions</title>
    <link>https://community.esri.com/t5/geoprocessing-questions/geoprocessing-service-failed-to-delete-existing/m-p/602263#M20012</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Original User: obelgrubel&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Dear experts,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I created a really simple geoprocessing (just buffering some points) and publish it as Geoproc Service. I make a web app which has this geoproc.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;When I run the geoproc service within web app, i get an error :&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN style="font-family:Courier New;"&gt;&lt;BR /&gt;Executing (Model2): Model2 "303 Meters" Start Time: Wed Jan 11 16:57:38 2012 Executing (Buffer): Buffer xxxx.gisadmin.test_buff_pt C:\student\test_buff_pt_Buffer.shp "303 Meters" FULL ROUND NONE # Start Time: Wed Jan 11 16:57:38 2012 ERROR 000258: Output C:\student\test_buff_pt_Buffer.shp already exists Failed to execute (Buffer). Failed at Wed Jan 11 16:57:38 2012 (Elapsed Time: 0.00 seconds) Failed to execute (Model2). Failed at Wed Jan 11 16:57:38 2012 (Elapsed Time: 0.00 seconds) &lt;BR /&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The problem is the geoproc service &lt;/SPAN&gt;&lt;STRONG&gt;failed to delete the existing output&lt;/STRONG&gt;&lt;SPAN&gt; file (C:\student\test_buff_pt_Buffer.shp). After I delete the output file manually and run the geoproc service again, it works.. I have also redirect the output to a geodatabase and it failed too with the same error message.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;Why does the geoproc service failed to delete the existing output file ???&lt;/STRONG&gt;&lt;SPAN&gt; The location of the output is the same as the location of the published mxd.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The geoprocessing model is fine when run in ArcMap without having to delete the existing outputs manually.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here I attach the model and the geoproc settings.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Please kindly help. Thanks&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 11 Jan 2012 09:03:28 GMT</pubDate>
    <dc:creator>Anonymous User</dc:creator>
    <dc:date>2012-01-11T09:03:28Z</dc:date>
    <item>
      <title>Geoprocessing service failed to delete existing output</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/geoprocessing-service-failed-to-delete-existing/m-p/602263#M20012</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Original User: obelgrubel&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Dear experts,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I created a really simple geoprocessing (just buffering some points) and publish it as Geoproc Service. I make a web app which has this geoproc.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;When I run the geoproc service within web app, i get an error :&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN style="font-family:Courier New;"&gt;&lt;BR /&gt;Executing (Model2): Model2 "303 Meters" Start Time: Wed Jan 11 16:57:38 2012 Executing (Buffer): Buffer xxxx.gisadmin.test_buff_pt C:\student\test_buff_pt_Buffer.shp "303 Meters" FULL ROUND NONE # Start Time: Wed Jan 11 16:57:38 2012 ERROR 000258: Output C:\student\test_buff_pt_Buffer.shp already exists Failed to execute (Buffer). Failed at Wed Jan 11 16:57:38 2012 (Elapsed Time: 0.00 seconds) Failed to execute (Model2). Failed at Wed Jan 11 16:57:38 2012 (Elapsed Time: 0.00 seconds) &lt;BR /&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The problem is the geoproc service &lt;/SPAN&gt;&lt;STRONG&gt;failed to delete the existing output&lt;/STRONG&gt;&lt;SPAN&gt; file (C:\student\test_buff_pt_Buffer.shp). After I delete the output file manually and run the geoproc service again, it works.. I have also redirect the output to a geodatabase and it failed too with the same error message.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;Why does the geoproc service failed to delete the existing output file ???&lt;/STRONG&gt;&lt;SPAN&gt; The location of the output is the same as the location of the published mxd.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The geoprocessing model is fine when run in ArcMap without having to delete the existing outputs manually.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here I attach the model and the geoproc settings.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Please kindly help. Thanks&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Jan 2012 09:03:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/geoprocessing-service-failed-to-delete-existing/m-p/602263#M20012</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2012-01-11T09:03:28Z</dc:date>
    </item>
    <item>
      <title>Re: Geoprocessing service failed to delete existing output</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/geoprocessing-service-failed-to-delete-existing/m-p/602264#M20013</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Original User: khibma&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Its failing because Server is trying to overwrite the output which exists, but it cant (you know this).&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The issue here is you should be writing your output to a unique location, not your working directory where you authored your model. Server has ways to write to a unique location (arcgisjobs directory)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'd read this help topic: &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/Creating_models_for_geoprocessing_services/002v00000005000000/"&gt;http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/Creating_models_for_geoprocessing_services/002v00000005000000/&lt;/A&gt;&lt;BR /&gt;&lt;SPAN&gt;In particular, you want to look at this section: Intermediate and output data&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You'll see here that Server can handle the output and put it in a location where no output exists (thus no chance for collision), by using the %scratchworkspace% inline variable.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;In short, simply changing your output path from the c:\student\test___buffer.shp you have to something like %scratchworkspace%\buffer.shp, republishing or restarting the service, should make it work.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Jan 2012 16:41:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/geoprocessing-service-failed-to-delete-existing/m-p/602264#M20013</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2012-01-11T16:41:13Z</dc:date>
    </item>
    <item>
      <title>Re: Geoprocessing service failed to delete existing output</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/geoprocessing-service-failed-to-delete-existing/m-p/602265#M20014</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;thanks Kevin,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;you are right, i have to have '%scratchworkspace%' for my output. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Also, i like to add that &lt;/SPAN&gt;&lt;STRONG&gt;to display the output of geoprocessing for web application&lt;/STRONG&gt;&lt;SPAN&gt;, i need to &lt;/SPAN&gt;&lt;STRONG&gt;add "P" (Model Parameter) in the output&lt;/STRONG&gt;&lt;SPAN&gt;. It isnt said that I have to add "P" in &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/Creating_models_for_geoprocessing_services/002v00000005000000/"&gt;http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/Creating_models_for_geoprocessing_services/002v00000005000000/&lt;/A&gt;&lt;SPAN&gt;. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Is this correct ? It doesnt work without the "P" in the output.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;thanks alot&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Its failing because Server is trying to overwrite the output which exists, but it cant (you know this).&lt;BR /&gt;The issue here is you should be writing your output to a unique location, not your working directory where you authored your model. Server has ways to write to a unique location (arcgisjobs directory)&lt;BR /&gt;&lt;BR /&gt;I'd read this help topic: &lt;A href="http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/Creating_models_for_geoprocessing_services/002v00000005000000/"&gt;http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/Creating_models_for_geoprocessing_services/002v00000005000000/&lt;/A&gt;&lt;BR /&gt;In particular, you want to look at this section: Intermediate and output data&lt;BR /&gt;&lt;BR /&gt;You'll see here that Server can handle the output and put it in a location where no output exists (thus no chance for collision), by using the %scratchworkspace% inline variable.&lt;BR /&gt;In short, simply changing your output path from the c:\student\test___buffer.shp you have to something like %scratchworkspace%\buffer.shp, republishing or restarting the service, should make it work.&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Jan 2012 07:46:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/geoprocessing-service-failed-to-delete-existing/m-p/602265#M20014</guid>
      <dc:creator>obelgrubelobelgrubel</dc:creator>
      <dc:date>2012-01-12T07:46:54Z</dc:date>
    </item>
    <item>
      <title>Re: Geoprocessing service failed to delete existing output</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/geoprocessing-service-failed-to-delete-existing/m-p/602266#M20015</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Original User: khibma&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Right, anything you want a user to be able to change for input and any output you want returned to the user must be a model parameter (have the P beside it in Modelbuilder).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;As a resource, I'd use this help link, its a checklist. It touches on all the main points you need and has links to more detailed help topics:&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/Checklist_for_authoring_and_publishing_geoprocessing_services/002v0000000w000000/"&gt;http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/Checklist_for_authoring_and_publishing_geoprocessing_services/002v0000000w000000/&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Jan 2012 14:20:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/geoprocessing-service-failed-to-delete-existing/m-p/602266#M20015</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2012-01-12T14:20:37Z</dc:date>
    </item>
  </channel>
</rss>

