POST
|
I have created a database view in Oracle and I would like to use the view with ArcGIS SDK for .NET via ArcGIS Server. I've successfully published the view on the ArcGIS Server using the ESRI's trick to first to publish a service with a geometry and then modify the service and manually add the view to it. I can query the data on the ArcGIS Server (web browser) with select *, but if I try to use ObjectID as a filter I get an error "Unable to perform query operation." (which isn't very descriptive). Now I know this error is caused by the fact that the view isn't registered with the SDE, and so the ArcGIS server doesn't know what the "objectid" column is (even though the view has a column named objectId). I've read the ESRI documentation about registering a view to SDE (ArcGIS Server for the Java Platform 9.3 Help), but the documentation I've found only covers the most basic scenario: select * from table or a simple join. As far as I know, the registration should be done with sdetable.exe with parameters that tell which tables are present in the view and which columns to select from them. My view however contains many subqueries and aggregated values (like SELECT CASE ... AS columnName), which simply cannot be used on the command line because it requires the table name to be specified (the -c parameter). The documentation I've found is quite old, se maybe things have improved over time. So my question is: is there any way to release an ArcGIS Server service from a very complex Oracle database view and register it to SDE?
... View more
02-12-2015
05:33 AM
|
0
|
0
|
3937
|
POST
|
Thanks for the quick reply. It would be great if you could share an example solution that would contain some example unit tests. What testing framework are you using by the way? We're using Moq. Also about mocking server response: currently it's quite impossible to unit test our data access layer, because for example FeatureTable's constructor is internal. So I'm hoping you'd come up with some improvements on that later. And you're absollutely correct about the interface hell, it wasn't very convenient
... View more
02-11-2015
11:31 PM
|
0
|
9
|
1143
|
POST
|
As far as I know, the current ArcGIS Runtime SDK for .NET cannot be unit tested because we simply cannot create new instances from the classes and thus cannot mock any return values from queries. The older ArcObjects library was easier to mock, because every class also had an interface assigned to it. Currently this is a bit of a problem because we cannot create unit tests for ANY functionality that uses any of the ESRI's classes (or they become integration tests). Is ESRI going to upgrade the SDK so that unit testing might be possible in the near future?
... View more
02-11-2015
05:24 AM
|
0
|
12
|
6506
|
POST
|
Thanks for the tip. I've created an idea ticket to the portal. It's available here: https://c.na9.visual.force.com/apex/ideaView?id=087E0000000CwIcIAK (may require an esri account to view it).
... View more
02-11-2015
04:05 AM
|
1
|
0
|
431
|
POST
|
I have created a new ArcGIS service and it has one geometry feature and one table. Now I'm trying to query the data using the same code that all the other services use. I get "The field already exists." error on ServiceFeatureTable.OpenAsync(uri). I'm suspecting that this is caused by the fact that the service's table is in fact an Oracle View and it has an ObjectID field of type integer. Is there a way to convert the integer to the required type esriFieldTypeOID or do something else to fix the error?
... View more
02-11-2015
03:50 AM
|
0
|
0
|
3888
|
IDEA
|
I've been programming with ESRI's frameworks and SDKs for some time now and they seem quite powerful to me. However, there are time when I wish I didn't have this job and that's when I get one of ESRI's wonderful error messsages. Every API should have a detailed documentation about what it does and what exception it may throw and how to recover from them. Currently even the newest SDK (for .NET in my case) doesn't even have API documentation included and most of the time any exception thrown is just an "error." This must be fixed, because we developers are spending countless hours trying to figure out just what went wrong when the only information we have is "Error occured". For example, a recent message I had: "Abort due to constraint violation". How do I figure out what constraint was violated? The framework surely knows this, so why it can't include it in the exception's message? Or perhaps "Additional information:Item not found in the database. (Table, domain, relationship class, etc.) :", care to tell what item not found was and not list all the possible choices for the developer to test? I'm suggesting that ESRI creates some error codes and every time an exception is thrown, you can look up the error code list and see what's going on and what measures to take to fix it. Or simply include the whole error message for the developer to see. The more vague the messages are, the more forum posts and support tickets you have to address. In my opinion, no error message can be too detailed, so please feel free to include as much information as you can in them. Thanks.
... View more
02-06-2015
05:05 AM
|
10
|
0
|
826
|
POST
|
Hello all. I've been programming with ESRI's frameworks and SDKs for some time now and they seem quite powerful to me. However, there are time when I wish I didn't have this job and that's when I get one of ESRI's wonderful error messsages. Every API should have a detailed documentation about what it does and what exception it may throw and how to recover from them. Currently even the newest SDK (for .NET in my case) doesn't even have API documentation included and most of the time any exception thrown is just an "error." This must be fixed, because we developers are spending countless hours trying to figure out just what went wrong when the only information we have is "Error occured". For example, a recent message I had: "Abort due to constraint violation". It cannot be that hard to include what constraint was violated? The framework surely knows this, so why it can't include it in the exception's message? Or perhaps "Additional information: Item not found in the database. (Table, domain, relationship class, etc.) :", care to tell what item not found was and not list all the possible choices for the developer to test? I'm suggesting that ESRI creates some error codes and every time an exception is thrown, you can look up the error code list and see what's going on and what measures to take to fix it. In my opinion, no error message can be too detailed, so please feel free to include as much information as you can in them. Thanks.
... View more
02-05-2015
03:13 AM
|
1
|
3
|
5261
|
POST
|
I'm trying to query related records from an offline geodatabase (created by the Sync capability). Most of the relationshipqueries work out fine, but there's one that always throws an "External component exception". How should I proceed with this error? External component has thrown an exception.
at RuntimeCoreNet.CoreFieldDefinitionNativeMethods.CoreFieldDefinition_Create(IntPtr& ppNativeCoreFieldDefinition, String name, CoreFieldType type, Boolean isNullable, Int32 width)
at RuntimeCoreNet.CoreFieldDefinition..ctor(String name, CoreFieldType type, Boolean isNullable, Int32 width)
at Esri.ArcGISRuntime.Data.FieldInfo.ToCoreFieldDefinition()
at Esri.ArcGISRuntime.Data.TableSchema..ctor(String name, IEnumerable`1 fields, String objectIDField, String creatorField, String creationTimeField, String editorField, String editorTimeField, Boolean hasAttachments, Boolean ignoreEditorFields)
at Esri.ArcGISRuntime.Data.TableSchema..ctor(String name, IEnumerable`1 fields, String objectIDField, Boolean hasAttachments)
at Esri.ArcGISRuntime.Data.ArcGISFeatureTable.QueryRelatedAsync(IEnumerable`1 featureIDs, Int64 relationshipID) There's the stack trace after calling this QueryRelatedAsync: Relationship relation = featureTable.ServiceInfo.Relationships.FirstOrDefault(c => c.RelatedTableID == relatedFeatureTable.ServiceInfo.ID);
var gdbFeatures = await featureTable.QueryRelatedAsync(objectId, relation.ID); I've checked that the relation.ID matches the one on the ArcGIS Server and the server returns the (online) data correctly. The featureTable in this case is the "child table" and the relatedFeatureTable is the "parent" table. Parent table contains a geometry and the child table does not. The QueryRelatedAsync works if the query is executed the other way (i.e. from parent to child). I've already tried switching the featureTables and relationIds but it doesn't make a difference. Also it's worth noticing that the query works the other way around, from the parent to child (uses the same method). The data is present in the SQLite database. Any advice what should I try next?
... View more
02-04-2015
05:53 AM
|
0
|
2
|
4732
|
POST
|
Yeah, such a small thing but yet I didn't see it. It's always good to have someone else to look your code as it's easier for an outsider to spot errors Thanks!
... View more
02-03-2015
11:16 PM
|
0
|
0
|
308
|
POST
|
I have created an offline replica from our enterprise geodatabase. The replica contains several tables and it's created successfully. However, when I try to query related data between two tables, I get zero results even though the tables have rows that should be returned. I have the code here that gets the relationshipID and does the query: Here are the relationship details. One question is, how does the offline database know what relationshipID is the correct one (in this case, 23)? I haven't been able to find it in the GDB_-tables (GDB_RelationshipItems?). As you can see, the table correcly shows that there are TWO rows to be returned with this relationshipQuery. Also the globalIds are the same, the parent's ObjectId matches and the SQLite Browser shows the data correctly: The parent table is here: And the related table here (parent's globalids match): So the questions is, why doesn't the QueryRelatedAsync return any data even when the data is in the database correctly? What else can I try to test if, for example, some relationships aren't synched correctly to the replica? Edit: I need to add that the geometry layers from the gdb are shown on the map correctly, but the plain tables just don't return any data.
... View more
02-03-2015
01:06 AM
|
0
|
2
|
3941
|
POST
|
The structure is the same, but the data varies (test/prod environment).
... View more
01-15-2015
03:58 AM
|
0
|
0
|
598
|
POST
|
We're having this issue again. Now the sync capabilities are enabled but the sync still fails. Is there any way to know what's wrong? The server returns a few status messages (InProgress), but then fails. The code works with an Oracle XE server, but I don't see any differences in the table structure or service definition. Also: I haven't changed any data on the offline database. I just wanted to test if the sync works at all. Service's sync capabilities are: Supports Registering Existing Data: true Supports Sync Direction Control: true Supports PerLayer Sync: true Supports PerReplica Sync: false Supports RollbackOnFailure : false Supports Async: true I also checked the ArcGIS Server Manger logs and found this entry: Failed in acquiring Archive Difference Cursor for Dataset: SCHEMA.TableName for Replica: SCHEMA.Ags_Fs_1421226240935 [GUID: A9BFF549-4F11-4707-A5C2-A6CE82826D2E]. Time taken: 0.032000 seconds. Underlying DBMS error [SCHEMA.TableName] I've checked that we have the correct SDE version and archiving is enabled. Do you know anything else that we can do, antti kajanus?
... View more
01-14-2015
04:38 AM
|
0
|
4
|
598
|
POST
|
So even when the table is an offline table, I must use the ServiceInfo...? It's a bit confusing since we don't have any services in offline mode.
... View more
12-19-2014
04:52 AM
|
0
|
0
|
410
|
POST
|
Thanks for the reply, but this doesn't really answer the question. I looked at the sample and it uses the layers to get the relationship id. Also it uses ArcGISDynamicMapServiceLayer which I also don't have as I'm offline. I only have a .geodatabase and I need to query data from tables. I know I can get the tables from the gdb with lambda expressions easily, but again: how do I get the relationshipId required in the QueryRelatedAsync method?
... View more
12-16-2014
11:16 PM
|
0
|
2
|
410
|
Title | Kudos | Posted |
---|---|---|
1 | 04-24-2015 12:27 AM | |
1 | 04-27-2012 09:18 AM | |
1 | 02-05-2015 03:13 AM | |
1 | 07-06-2016 04:57 AM | |
10 | 02-06-2015 05:05 AM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|