A map or feature service creation from a MXD fails when Layer ID values of -1 exist in the map document. Layer IDs of -1 are generated when an annotation feature class with subclasses is created in the MXD.
Duplicate of BUG-000086697: This was caused by layer IDs not properly assigned to annotation which was resolved.
解决办法
The following workarounds exist, but causes interruption in the user's workflow and can be time consuming with a large MXD:
1. Remove the annotation feature class from the map, then add the annotation feature class back. The Layer ID is recalculated
2. Save the MXD, close and reopen the MXD.
3. Manually enter a new Layer ID value - this is not practical, especially in an MXD with many layers. A duplicate Layer ID can easily be entered, which still causes the service creation to fail.