[StatusException] Cannot lookup index without a namespace ta

Questions regarding the use of the .NET SDK 2.0 for Server or Client development or integration into customer products ...

Moderator: uasdknet

Post Reply
marklendering
Full Member
Full Member
Posts: 6
Joined: 03 Nov 2015, 13:43

[StatusException] Cannot lookup index without a namespace ta

Post by marklendering »

Hello,

Im having some issues when parsing ExtensionObjects. The exception message is not very clear what the problem is, and debugging the code doesnt show anything weird either.


The exceptions occurs in the following block of code on the "GenericEncodeableObject genericEncodeableObject = mgr.ParseValue(v);" line.

Code: Select all

                    GenericStructureDataType d;
                    DataValue dv = parseStructuredObjectTypes(session, nodeId, out d);
                    DataTypeManager mgr;
                    getDataTypeManager(session, out mgr);
                    if (dv.Value != null)
                    {
                        List<KeyValue> keyValueList = new List<KeyValue>();
                        List<GenericEncodeableObject> genericObjectList = new List<GenericEncodeableObject>();
                        ExtensionObject[] extObjArray = dv.WrappedValue.ToExtensionObjectArray();
                        foreach (ExtensionObject v in extObjArray)
                        {
                            GenericEncodeableObject genericEncodeableObject = mgr.ParseValue(v);
                            genericObjectList.Add(genericEncodeableObject);
                            if (!genericEncodeableObject[0].ToString().Equals(""))
                            {
                                KeyValue kv = new KeyValue();
                                kv.key = genericEncodeableObject[0].ToString();
                                kv.index = genericEncodeableObject[1].ToInt32();
                                kv.value = genericEncodeableObject[2].ToString();
                                kv.typeId = genericEncodeableObject[3].ToInt32();
                                keyValueList.Add(kv);
                            }
                        }
                        varObj.selectableVariableData.keyValues = keyValueList.ToArray();
                        varObj.selectableVariableData.genericObjects = genericObjectList.ToArray();
                        count = keyValueList.Count;
                        errorCode = error.OK;
                    }
the exception is as follows:

Code: Select all

"[StatusException] Cannot lookup index without a namespace table.\r\n   
at UnifiedAutomation.UaBase.AsyncResultBase.ThrowOnError()\r\n   
at UnifiedAutomation.UaBase.AsyncResultBase.WaitForComplete()\r\n   
at UnifiedAutomation.UaBase.AsyncResultBase.WaitForComplete(IAsyncResult ar)\r\n   
at UnifiedAutomation.UaClient.DataTypeManager.EndGetDescriptionFromEncoding(IAsyncResult result)\r\n   
at UnifiedAutomation.UaClient.DataTypeManager.OnParseValueGetDescriptionComplete(IAsyncResult result)\r\n\r\n

[StatusException] Cannot lookup index without a namespace table.\r\n   
at UnifiedAutomation.UaBase.ExpandedNodeId.ToNodeId(ExpandedNodeId nodeId, NamespaceTable namespaceUris)\r\n   
at UnifiedAutomation.UaClient.DataTypeManager.BeginGetDescriptionFromEncoding(ExpandedNodeId encodingId, Boolean doNotUseCache, AsyncCallback callback, Object callbackData)"

Do you have any idea what the problem might be here?

Post Reply