How to use geopackage (.gpk) created by Arcmap to use a service ?

709
7
10-23-2018 11:34 PM
VijitWadhwa
New Contributor III

Hi , I created a .gpk file from ArcMap to use it in runtime. But after starting the local server , as soon as I start the LocalGeoprocessingService, I get an exception as follows

!message:socexit:{"error":"Worker process 'contour_host' exited while attempting to service request (attempt 1 of 1): endpoint='admin' headers={} params={asynchronous=, filePath=e:\\dlrl for kolkata 2\\feature to json\\contour.gpk, jobDir=C:\\Users\\Vijit Wadhwa\\AppData\\Local\\Temp\\arcgisruntime_3828\\contour\\jobs, maxRecords=1000, name=contour, outputDir=C:\\Users\\Vijit Wadhwa\\AppData\\Local\\Temp\\arcgisruntime_3828\\contour, type=GPServer, virtualDir=http://127.0.0.1:50000/q3HDdY/outputdir/contour} res='create' post=0 Crash dump path=C:\\Users\\Vijit Wadhwa\\AppData\\Local\\Temp\\ArcGISRuntimeErrorReports\\arcgisruntime_100.3.0.2102_service_20181024_110823.dmp","name":"contour","processId":-1}

Exception thrown: 'Esri.ArcGISRuntime.Http.ArcGISWebException' in mscorlib.dll
at Esri.ArcGISRuntime.LocalServices.LocalService.<StartServiceInternal>d__25.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
at Geoprocessing.MainWindow.<ServerStatusChanged>d__3.MoveNext()

Can anyone please tell me, what I am doing wrong ?? and how should I resolve this issue ?

Thanks in advance

0 Kudos
7 Replies
MichaelBranscomb
Esri Frequent Contributor

Hi,

Try setting the ArcGISRuntimeEnvironment.TempPath Property to a much shorter path e.g. `E:\Temp`.

Cheers

Mike

0 Kudos
VijitWadhwa
New Contributor III

Hi,

I tried setting the  ArcGISRuntimeEnvironment.TempPath Property to a much shorter path , but I recieve same exception again ?

The same code sample works fine in Java. Please help ?

Thanks 

Vijit

0 Kudos
VijitWadhwa
New Contributor III

Hi Michael,

 I am facing this problem from last one month and I am stuck and unable to develop. Please provide some solution as soon as possible.

The same code sample works fine in Java. Please help ?

0 Kudos
MichaelBranscomb
Esri Frequent Contributor

Hi,

What options do you have enabled in your deployment file? (Local Server—ArcGIS Runtime SDK for .NET | ArcGIS for Developers )

Cheers

Mike

0 Kudos
VijitWadhwa
New Contributor III

HI,

I have kept my deployment file as default , without making any changes. This is how it looks.

<?xml version="1.0" encoding="utf-8"?>
<!--ArcGIS Local Server Deployment Configuration-->
<Packages>
<!--This local server has support for ArcGIS Pro mpkx and gpkx packages. It is 64 bit only-->
<Package id="Pro" name="ArcGIS Pro Compatible Server" enabled="false">
<ChildPackages>
<!--Including Microsoft C and C++ libraries in the runtime deployment allows for XCopy style deployments.
Only include these if your setup is not installing the Microsoft redistribution package.-->
<Package id="ProCRuntime" name="Microsoft C and C++ Runtime Libraries" enabled="false" />
<!--Provides the ability to perform geoprocessing tasks via geoprocessing packages.-->
<!--Geoprocessing packages must be created with ArcGIS Runtime support enabled.-->
<Package id="ProGeoProcessing" name="Geoprocessing" enabled="false">
<ChildPackages>
<!--Adds 3D Analyst geoprocessing tools.-->
<Package id="Pro3DAnalyst" name="3D Analyst" enabled="false" />
<!--Provides the ability to use ArcGIS Locators-->
<Package id="ProGeoCoding" name="Geocoding" enabled="false" />
<!--Adds data consolidation, map packaging and create runtime content tools.-->
<Package id="ProMapPackaging" name="Map Packaging" enabled="false" />
<!--Adds the ability to produce results as Map Services.-->
<Package id="ProMapServerResults" name="Map Server Results" enabled="false" />
<!--Adds Network Analyst geoprocessing tools.-->
<Package id="ProNetworkAnalyst" name="Network Analyst" enabled="false" />
<!--Adds Spatial Analyst geoprocessing tools.-->
<Package id="ProSpatialAnalyst" name="Spatial Analyst" enabled="false" />
</ChildPackages>
</Package>
<!--Provides the ability to use Python scripts.-->
<Package id="ProPythonScripting" name="Python Scripting" enabled="false" />
<!--Provides additional vector and raster data format support.-->
<Package id="ProAdditionalDataFormats" name="Additional Data Formats" enabled="false">
<ChildPackages>
<!--Provides additional raster file data format support.-->
<Package id="ProRaster" name="Raster" enabled="false">
<ChildPackages>
<!--Provides support for ECW format Raster.-->
<Package id="ProECWRasters" name="ECW Rasters" enabled="false" />
<!--Provides support for Raster Mosaic Layers.-->
<Package id="ProMosaicRasters" name="Mosaic Rasters" enabled="false" />
</ChildPackages>
</Package>
<!--Provides additional vector file data format support.-->
<Package id="ProVector" name="Vector" enabled="false" />
<!--Adds support for direct connect to DBMS system that Esri supports. This option must be selected in conjunction with at least one of the following DBMS(s): DB2, Informix, Oracle, PostgreSQL, SQL Server, Netezza, HANA, Teradata or Alitbase.-->
<!--SDE direct connect deployed. Specific database drivers also required.-->
<Package id="ProSDE" name="SDE" enabled="false">
<ChildPackages>
<!--Adds support for direct connect to geodatabases stored in Alitbase.-->
<!--Alitbase Drivers must be present on end users machine.-->
<Package id="ProAlitbase" name="Alitbase" enabled="false" />
<!--Adds support for direct connect to geodatabases stored in Dameng.-->
<!--Dameng Drivers must be present on end users machine.-->
<Package id="ProDameng" name="Dameng" enabled="false" />
<!--Adds support for direct connect to geodatabases stored in DB2.-->
<!--DB2 Drivers must be present on end users machine.-->
<Package id="ProDB2" name="DB2" enabled="false" />
<!--Adds support for direct connect to geodatabases stored in Netezza.-->
<!--Netezza Drivers must be present on end users machine.-->
<Package id="ProNetezza" name="Netezza" enabled="false" />
<!-- Adds support for direct connect to geodatabases stored in Oracle.-->
<!--Oracle Drivers must be present on end users machine.-->
<Package id="ProOracle" name="Oracle" enabled="false" />
<!--Adds support for direct connect to geodatabases stored in PostgreSQL.-->
<!--PostgreSQL Drivers must be present on end users machine.-->
<Package id="ProPostgreSQL" name="PostgreSQL" enabled="false" />
<!--Adds support for direct connect to geodatabases stored in SAP HANA.-->
<!--SAP HANA SQL Server Drivers must be present on end users machine.-->
<Package id="ProSAPHANA" name="SAP HANA" enabled="false" />
<!--Adds support for direct connect to geodatabases stored in SQL Server.-->
<!--MS SQL Server Drivers must be present on end users machine.-->
<Package id="ProSQLServer" name="SQL Server" enabled="false" />
<!--Adds support for direct connect to geodatabases stored in SQL Server.-->
<!--MS SQL Server Drivers must be present on end users machine.-->
<Package id="ProSQLite" name="SQLite" enabled="false">
<ChildPackages>
<!--Adds support for SpatiaLite geometry type-->
<Package id="ProSpatialLite" name="SpatiaLite" enabled="false" />
</ChildPackages>
</Package>
<!--Adds support for direct connect to geodatabases stored in Teradata.-->
<!--Teradata Drivers must be present on end users machine.-->
<Package id="ProTeradata" name="Teradata" enabled="false" />
</ChildPackages>
</Package>
</ChildPackages>
</Package>
<!--Adds more projections and geotransformations.-->
<Package id="ProAdditionalProjectionEngineTransformations" name="Additional Projection Engine Transformations" enabled="false" />
<!--Enables debugging options within the runtime.-->
<!--Debugging options should only be used for testing purposes, and not deployed in final solutions.-->
<Package id="ProDebug" name="Debug" enabled="false">
<ChildPackages>
<!--Adds support for runtime logging.-->
<Package id="ProLogging" name="Logging" enabled="false" />
</ChildPackages>
</Package>
</ChildPackages>
</Package>
<!--This local server has support for ArcMap mpk and gpk packages.-->
<Package id="ArcMap" name="ArcMap Compatible Server" enabled="true">
<ChildPackages>
<!--Including Microsoft C and C++ libraries in the runtime deployment allows for XCopy style deployments.
Only include these if your setup is not installing the Microsoft redistribution package.-->
<Package id="ArcMapCRuntime" name="Microsoft C and C++ Runtime Libraries" enabled="false" />
<!--Provides the ability to perform geoprocessing tasks via geoprocessing packages.-->
<!--Geoprocessing packages must be created with ArcGIS Runtime support enabled.-->
<Package id="ArcMapGeoprocessing" name="Geoprocessing" enabled="true">
<ChildPackages>
<!--Adds 3D Analyst geoprocessing tools.-->
<Package id="ArcMap3DAnalyst" name="3D Analyst" enabled="false" />
<!--Provides the ability to use ArcGIS Locators-->
<Package id="ArcMapGeocoding" name="Geocoding" enabled="false" />
<!--Adds data consolidation, map packaging and create runtime content tools.-->
<Package id="ArcMapMapPackaging" name="Map Packaging" enabled="true" />
<!--Adds the ability to produce results as Map Services.-->
<Package id="ArcMapMapServerResults" name="Map Server Results" enabled="false" />
<!--Adds Network Analyst geoprocessing tools.-->
<Package id="ArcMapNetworkAnalyst" name="Network Analyst" enabled="false" />
<!--Adds Spatial Analyst geoprocessing tools.-->
<Package id="ArcMapSpatialAnalyst" name="Spatial Analyst" enabled="false" />
</ChildPackages>
</Package>
<!--Provides the ability to use Python scripts.-->
<Package id="ArcMapPythonScripting" name="Python Scripting" enabled="true" />
<!--Provides additional vector and raster data format support.-->
<Package id="ArcMapAdditionalDataFormats" name="Additional Data Formats" enabled="false">
<ChildPackages>
<!--Provides additional raster file data format support.-->
<Package id="ArcMapRaster" name="Raster" enabled="false">
<ChildPackages>
<!--Provides support for ECW format Raster.-->
<Package id="ArcMapECWRasters" name="ECW Rasters" enabled="false" />
<!--Provides support for Raster Mosaic Layers.-->
<Package id="ArcMapMosaicRasters" name="Mosaic Rasters" enabled="false" />
</ChildPackages>
</Package>
<!--Provides additional vector file data format support.-->
<Package id="ArcMapVector" name="Vector" enabled="false" />
<!--Adds support for direct connect to DBMS system that Esri supports. This option must be selected in conjunction with at least one of the following DBMS(s): DB2, Informix, Oracle, PostgreSQL, SQL Server, Netezza, HANA, Teradata or Alitbase.-->
<!--SDE direct connect deployed. Specific database drivers also required.-->
<Package id="ArcMapSDE" name="SDE" enabled="false">
<ChildPackages>
<!--Adds support for direct connect to geodatabases stored in Alitbase.-->
<!--Alitbase Drivers must be present on end users machine.-->
<Package id="ArcMapAlitbase" name="Alitbase" enabled="false" />
<!--Adds support for direct connect to geodatabases stored in Dameng.-->
<!--Dameng Drivers must be present on end users machine.-->
<Package id="ArcMapDameng" name="Dameng" enabled="false" />
<!--Adds support for direct connect to geodatabases stored in DB2.-->
<!--DB2 Drivers must be present on end users machine.-->
<Package id="ArcMapDB2" name="DB2" enabled="false" />
<!--Adds support for direct connect to geodatabases stored in Informix.-->
<!--Informix Drivers must be present on end users machine.-->
<Package id="ArcMapInformix" name="Informix" enabled="false" />
<!--Adds support for direct connect to geodatabases stored in Netezza.-->
<!--Netezza Drivers must be present on end users machine.-->
<Package id="ArcMapNetezza" name="Netezza" enabled="false" />
<!-- Adds support for direct connect to geodatabases stored in Oracle.-->
<!--Oracle Drivers must be present on end users machine.-->
<Package id="ArcMapOracle" name="Oracle" enabled="false" />
<!--Adds support for direct connect to geodatabases stored in PostgreSQL.-->
<!--PostgreSQL Drivers must be present on end users machine.-->
<Package id="ArcMapPostgreSQL" name="PostgreSQL" enabled="false" />
<!--Adds support for direct connect to geodatabases stored in SAP HANA.-->
<!--SAP HANA SQL Server Drivers must be present on end users machine.-->
<Package id="ArcMapSAPHANA" name="SAP HANA" enabled="false" />
<!--Adds support for direct connect to geodatabases stored in SQL Server.-->
<!--MS SQL Server Drivers must be present on end users machine.-->
<Package id="ArcMapSQLServer" name="SQL Server" enabled="false" />
<!--Adds support for direct connect to geodatabases stored in SQL Server.-->
<!--MS SQL Server Drivers must be present on end users machine.-->
<Package id="ArcMapSQLite" name="SQLite" enabled="false">
<ChildPackages>
<!--Adds support for SpatiaLite geometry type-->
<Package id="ArcMapSpatiaLite" name="SpatiaLite" enabled="false" />
</ChildPackages>
</Package>
<!--Adds support for direct connect to geodatabases stored in Teradata.-->
<!--Teradata Drivers must be present on end users machine.-->
<Package id="ArcMapTeradata" name="Teradata" enabled="false" />
</ChildPackages>
</Package>
</ChildPackages>
</Package>
<!--Adds more projections and geotransformations.-->
<Package id="ArcMapAdditionalProjectionEngineTransformations" name="Additional Projection Engine Transformations" enabled="false" />
<!--Enables debugging options within the runtime.-->
<!--Debugging options should only be used for testing purposes, and not deployed in final solutions.-->
<Package id="ArcMapDebug" name="Debug" enabled="false">
<ChildPackages>
<!--Adds support for runtime logging.-->
<Package id="ArcMapLogging" name="Logging" enabled="false" />
</ChildPackages>
</Package>
</ChildPackages>
</Package>
</Packages>

0 Kudos
VijitWadhwa
New Contributor III

Hi,

Mike I am simply trying to run one of the given samples 

Local Server Services—ArcGIS Runtime SDK for .NET Samples | ArcGIS for Developers without making any changes in deployment file,

The Map Service and Feature Service start successfully , the problem comes only in geopackage (for starting geoprocessing service). This geoprocessing service is starts successfully when I run this sample in java, but in .NET , I am facing this issue from a long time and I am unable to resolve. I also tried making changes in deployment file , by changing the geoprocessing tags to true . But , the problem still persists. This is how the error appears 

Please Help me resolving this , I am stuck in my development process because of this issue.

Thanks

0 Kudos
MichaelBranscomb
Esri Frequent Contributor

Hi,

If you're running the Contour tool, you will need to enable 3D Analyst or Spatial Analyst in your deployment configuration:

e.g.

```
<Package id="ArcMap3DAnalyst" name="3D Analyst" enabled="true" />

```

or

```

<Package id="ArcMapSpatialAnalyst" name="Spatial Analyst" enabled="true" />
```

Also, depending on what data types are used in the geoprocessing package you may need to enable some additional dataformats

e.g. I have enabled raster data support and vectoe data support below.

```

<Package id="ArcMapAdditionalDataFormats" name="Additional Data Formats" enabled="true">
<ChildPackages>
<!--Provides additional raster file data format support.-->
<Package id="ArcMapRaster" name="Raster" enabled="true">
<ChildPackages>
<!--Provides support for ECW format Raster.-->
<Package id="ArcMapECWRasters" name="ECW Rasters" enabled="false" />
<!--Provides support for Raster Mosaic Layers.-->
<Package id="ArcMapMosaicRasters" name="Mosaic Rasters" enabled="false" />
</ChildPackages>
</Package>
<!--Provides additional vector file data format support.-->
<Package id="ArcMapVector" name="Vector" enabled="true" />

```

Cheers

Mike

0 Kudos