I tried to add a new field to an existing feature class using arcobject and java, this is the code:IFeatureClass FcTes=sdeConnexion.connectionSDE().openFeatureClass("name of feature class"); IField testField=new Field(); IFieldEdit testField2=(IFieldEdit2)testField; testField2.setName("symbol1"); testField2.setAliasName("symbol1"); FeatureClass FC=new FeatureClass(FcTes); ISchemaLock schemaLock = (ISchemaLock)FC; try{ schemaLock.changeSchemaLock(esriSchemaLock.esriExclusiveSchemaLock);
FcTes.addField(testField2); }catch(Exception e){ e.printStackTrace(); } finally{ schemaLock.changeSchemaLock(esriSchemaLock.esriSharedSchemaLock); }when I executed it, this exception fired: AutomationException: 0x80040220 - The application is not licensed to create or modify schema for this type of data in 'Esri GeoDatabase' at com.esri.arcgis.interop.NativeObjRef.nativeVtblInvokeNative(Native Method) at com.esri.arcgis.interop.NativeObjRef.a(Unknown Source) at com.esri.arcgis.interop.NativeObjRef.a(Unknown Source) at com.esri.arcgis.interop.Dispatch.vtblInvoke(Unknown Source) at com.esri.arcgis.geodatabase.IClassProxy.addField(Unknown Source) at travaux.ConnectGeoDB2.main(ConnectGeoDB2.java:58)
please can any one help me to understand what wrong I had made???
أكثر...
FcTes.addField(testField2); }catch(Exception e){ e.printStackTrace(); } finally{ schemaLock.changeSchemaLock(esriSchemaLock.esriSharedSchemaLock); }when I executed it, this exception fired: AutomationException: 0x80040220 - The application is not licensed to create or modify schema for this type of data in 'Esri GeoDatabase' at com.esri.arcgis.interop.NativeObjRef.nativeVtblInvokeNative(Native Method) at com.esri.arcgis.interop.NativeObjRef.a(Unknown Source) at com.esri.arcgis.interop.NativeObjRef.a(Unknown Source) at com.esri.arcgis.interop.Dispatch.vtblInvoke(Unknown Source) at com.esri.arcgis.geodatabase.IClassProxy.addField(Unknown Source) at travaux.ConnectGeoDB2.main(ConnectGeoDB2.java:58)
please can any one help me to understand what wrong I had made???
أكثر...