Error Message
When using the createReplica operation at REST for certain layers in a hosted feature service, the following error is returned:
“Error in creating runtime geodatabase.”
Cause
The error occurs when one or more layers included in the createReplica request contain invalid or incomplete domain definitions.
Common causes include:
- Domains whose coded values do not match the underlying field data type, such as string codes applied to integer or double fields
- Domains missing required properties, such as a domain name, in the layer definition JSON
For example, this situation can occur when content is published from form‑based workflows where field types and choice lists are misaligned. In these cases, the service may continue to function for editing and querying, but export‑based operations such as createReplica or file geodatabase export fail.
Solution or Workaround
Review the schema of the hosted feature service and validate domain definitions for all layers included in the createReplica request.
- Compare the JSON definition of a layer that successfully creates a replica with one that fails, focusing on:
- Domain definitions
- Domain names
- Domain coded value data types
- Identify domains that are incomplete or incompatible with the associated field type.
- Re-create or correct the affected domain lists so they include valid names and value types that match the field definition.
- Re-run the createReplica operation including all required layers.
How to validate domains via the JSON in REST
Domain configuration issues are not always visible in the REST user interface and may require reviewing the layer definition JSON.
To validate domain definitions using REST:
- Open the feature service layer or table endpoint in REST, for example, /FeatureServer/.
- Click JSON to view the full layer definition.
- Locate the fields array and review each field that uses a domain.
- For fields with a domain, confirm the following:
- The domain object includes a valid name property.
- The domain type and codedValues are appropriate for the field data type.
- Numeric fields should reference domains with numeric codes.
- String fields should reference domains with string codes.
- Compare the JSON of a layer that successfully supports createReplica with one that fails to identify differences in domain definitions.
