Duplicate Field in Service Definition

5737
16
05-17-2013 09:07 AM
DavidMajor
New Contributor II
I've added a field to a feature class in my SDE database, then republished the map service using it. The application I use to view the map service now crashes. Its called Cityview. It complains when it crashes that the new field is already in the service. So when I browse to the service, I noticed that the new field I added is displayed twice in the contents of the field definition. I suspect this is the problem but I can't fix it.

I've tried deleting the field, then adding another different field and same thing. Any help would be appreciated.

- David

Using ArcGIS Server 10.1 with SQL SDE and Windows Server 2008 R2

Here is the layer definition:

Layer: Parcels (ID: 17)

Name: Parcels

Display Field: PID

Type:  Feature Layer

Geometry Type: esriGeometryPolygon

Description: 

Definition Expression: 

Copyright Text: 

Default Visibility: true 

MaxRecordCount:  1000

Supported Query Formats:  JSON, AMF

Min Scale:  0

Max Scale:  0

Supports Advanced Queries:  true

Supports Statistics:  true

Has Labels:  false

Can Modify Layer:  false

Can Scale Symbols:  false

Extent: XMin: -1.3333465240339989E7
YMin: 6517317.380403321
XMax: -1.2955377341100832E7
YMax: 6838924.548245557
Spatial Reference: 102100  (3857)


Drawing Info:  Renderer:  Simple Renderer:
Symbol:  Style:  esriSFSSolid
Color:  [0, 0, 0, 0]
Outline:  Style:  esriSLSSolid
Color:  [157, 149, 142, 255]
Width:  1 Label: 
Description:  Transparency:  0
Labeling Info: 
HasZ: false

HasM: false 

Has Attachments:  false

HTML Popup Type:  esriServerHTMLPopupTypeAsHTMLText

Type ID Field:  null

Fields:  ??? OBJECTID  ( type: esriFieldTypeOID , alias: OBJECTID ) 
??? ROLL  ( type: esriFieldTypeDouble , alias: ROLL ) 
??? IDPARCEL  ( type: esriFieldTypeString , alias: IDPARCEL , length: 8 ) 
??? IDOTHER  ( type: esriFieldTypeInteger , alias: IDOTHER , Coded Values:  [100: Islands in Water] , [200: Water Series] , [300: Forestry Road] , ...44 more... ) 
??? ROLLX  ( type: esriFieldTypeString , alias: ROLLX , length: 13 ) 
??? PID  ( type: esriFieldTypeString , alias: PID , length: 11 ) 
??? TOTALHOUSE  ( type: esriFieldTypeInteger , alias: TOTALHOUSE ) 
??? LEGAL_PLAN  ( type: esriFieldTypeString , alias: LEGAL_PLAN , length: 8 ) 
??? BLOCK  ( type: esriFieldTypeString , alias: BLOCK , length: 5 ) 
??? LOT  ( type: esriFieldTypeString , alias: LOT , length: 5 ) 
??? SECTION  ( type: esriFieldTypeString , alias: SECTION , length: 4 ) 
??? TOWNSHIP  ( type: esriFieldTypeString , alias: TOWNSHIP , length: 4 ) 
??? RANGE  ( type: esriFieldTypeString , alias: RANGE , length: 2 ) 
??? MERIDIAN  ( type: esriFieldTypeString , alias: MERIDIAN , length: 1 ) 
??? DISTLOT  ( type: esriFieldTypeString , alias: DISTLOT , length: 5 ) 
??? LGL_SUBD  ( type: esriFieldTypeString , alias: LGL_SUBD , length: 2 ) 
??? STREET  ( type: esriFieldTypeString , alias: STREET , length: 25 ) 
??? LGL_DESC  ( type: esriFieldTypeString , alias: LGL_DESC , length: 100 ) 
??? SIZE_HA  ( type: esriFieldTypeDouble , alias: SIZE_HA ) 
??? OWNER_TYPE  ( type: esriFieldTypeString , alias: OWNER_TYPE , length: 1 , Coded Values:  ,

, , ...17 more... ) 


??? ELECT  ( type: esriFieldTypeString , alias: ELECT , length: 1 , Coded Values:  , , , ...3 more... ) 
??? GIS_TILE  ( type: esriFieldTypeString , alias: GIS_TILE , length: 2 , Coded Values:  [bb: blaeberry] , [dn: donald] , [kh: kicking_horse_river] , ...68 more... ) 
??? MAPSHEET  ( type: esriFieldTypeString , alias: MAPSHEET , length: 4 ) 
??? EDITDATE  ( type: esriFieldTypeDate , alias: EDITDATE , length: 36 ) 
??? EDITREASON  ( type: esriFieldTypeString , alias: EDITREASON , length: 3 , Coded Values:  [New: New feature] , [Chg: Change feature] , [Mis: Missing feature added] , ...1 more... ) 
??? Common_Name  ( type: esriFieldTypeString , alias: Common_Name , length: 30 ) 
??? EditPerson  ( type: esriFieldTypeString , alias: EditPerson , length: 5 , Coded Values:  [Don: Don Richmond] , [Olive: Olive Dodd] , [David: David Major] , ...2 more... ) 
??? Data_Source  ( type: esriFieldTypeString , alias: Data_Source , length: 10 , Coded Values:  [GPS: GPS] , [Ortho: Orthophoto] , [Estimate: Digitized Estimate] , ...9 more... ) 
??? Count_Polygons  ( type: esriFieldTypeInteger , alias: Count_Polygons ) 
??? Block_Plan  ( type: esriFieldTypeString , alias: Block_Plan , length: 50 ) 
??? Comment  ( type: esriFieldTypeString , alias: Comment , length: 150 ) 
??? CSRD_File  ( type: esriFieldTypeString , alias: CSRD_File , length: 25 ) 
??? Parcel_Doc  ( type: esriFieldTypeString , alias: Parcel_Doc , length: 15 ) 
??? Crown  ( type: esriFieldTypeString , alias: Crown , length: 3 , Coded Values:  ,
??? Shape  ( type: esriFieldTypeGeometry , alias: Shape ) 
??? testfield  ( type: esriFieldTypeInteger , alias: testfield ) 
??? Shape.STLength()  ( type: esriFieldTypeDouble , alias: Shape.STLength() ) 
??? testfield  ( type: esriFieldTypeInteger , alias: testfield ) 

Supported Operations:   Query   Generate Renderer   Return Updates
Tags (2)
0 Kudos
16 Replies
JakubOrálek
New Contributor II
I have the same problem. In the feature class the field is only once, as well in Item's XML definition and as well in ArcMap Layer. But through REST API it is displayed twice.

Any solution please?

Kuba
0 Kudos
DavidMajor
New Contributor II
If I create a copy of the feature class, delete the fc in SDE, import it back in to SDE from the copy, then re-publish the service, it does not create a duplicate of the new field. It has not worked every time though, and sometimes it duplicates one of the new fields but not another. But it is always a field that I have included after originally creating the fc. More of a workaround/dart throwing than a solution but you could try that.

David
0 Kudos
TanuHoque
Esri Regular Contributor
David, Kuba:
I'd suggest to contact Esri Tech Support to have them take a look at your issue.

few things:
1. I have noticed that "Shape.STArea()" field is missing even though it is a polygon fc
2. are you publishing by copying the data (it does not seem to; just wanted to double-check)
3. did you stop the map service before adding the new field? or, do you happen to have schema-locking disabled?
4. did you ever try deleting the exiting map service first >> then add new field >> and publish as a new map service?

thanks.
Tanu
0 Kudos
DavidMajor
New Contributor II
I had a ticket with ESRI and its been resolved. The problem was arcgis account. I manage my services using database authentication, then publish services using MXDs with OS authentication. We found that when I published the data using database authentication the duplicate field problem was gone. The permissions aren't an issue when using database authentication.

Why it results in this kind of crazy error is beyond me. You would think it would stop you from publishing it rather than publish it with some configuration that shouldn't be possible.

We deleted the existing arcgis account, also deleted some old ArcGISSOC accounts related to server 10.0, then ran the server account wizard to recreate the arcgis account. We re-added the arcgis account to the instance logins and database users in SQL then made sure it had db_datareader role.

David
0 Kudos
MasaoMatsuoka
Occasional Contributor

This is an old thread, but this is the only one with the exact problem I had.

In my case I was able to resolve this by resetting the field order in ArcMap, then publishing it again. You can reset the field order in the layer properties window, under the fields tab, click "Options", then "Reset Field Order".

Hopefully it helps somebody.

Masao Matsuoka
arunchanumalla
New Contributor II

It helped me tremendously .

Many Thanks

A

0 Kudos
MikeAlverson
New Contributor

Thanks for sharing. Resetting the field order fixed the duplicate fields that were created when publishing services.

0 Kudos
KyleGjeruldsen
New Contributor II

I'd like to hug you right now!

0 Kudos
SanneMikkelsen
Occasional Contributor

At first I did not look at this, because the thread started in 2013, so I thought it was too old. But as my options ran out I found this! 

THANK YOU SO MUCH! 

0 Kudos