Avatar

Please consider registering
guest

sp_LogInOut Log In sp_Registration Register

Register | Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

sp_Feed Topic RSS sp_TopicIcon
Reading Nodes on Client side fails with code generated classes
July 26, 2017
10:46, EEST
Avatar
kapsl
Member
Members
Forum Posts: 57
Member Since:
December 20, 2016
sp_UserOfflineSmall Offline

Hi,
I found a very strange behaviour when trying to read nodes with codegeneration on the client side.

In my server a new OPC UA Program Subtype is created with createInstance(…). This works perfect. The type (and it’s subnodes) is created. I can browse it and read the values with UaExpert.

On the client side I use the codegenerated classes. And i can get the Object via:
LinImpl myLin = (LinImpl) fubsClient.getConnection().getClient().getAddressSpace().getNode(nodeID);

This also seems to work, no error, i can also call stuff like myLin.getDisplayName() etc.

But when I try to access a subnode of this type in the ImplBase e.g. this.getCurrentState() I get an error, that the mandatory node is missing (also it is there, I can see and read it in UaExpert). Also this.getComponents() return null. For some reason, it doesn’t find the subnodes.

When I directly go over the BrowsePath and try to get the NodeIds of subnodes there, it works?!

lg manu

July 26, 2017
11:28, EEST
Avatar
Jouni Aro
Moderator
Moderators
Forum Posts: 1026
Member Since:
December 21, 2011
sp_UserOfflineSmall Offline

Something odd, I think. I suppose the HasComponent references are in place correctly – or are they maybe something else?

If they are HasComponent, could you run your client side code with DEBUG-level logging set for AddressSpace?

For example with log4j:

log4j.logger.com.prosysopc.ua.client.AddressSpace=DEBUG

And show what it prints for ‘getNode()’

Thanks.

July 26, 2017
12:59, EEST
Avatar
kapsl
Member
Members
Forum Posts: 57
Member Since:
December 20, 2016
sp_UserOfflineSmall Offline

Hi,
that was a good advice: It seems like I can get the nodeId of the node, but then when trying to get the UaNode it doesn’t find it?!

07/26/2017 11:57:49.829 DEBUG getNode: nodeId=ns=5;s=Lin4 node=null
07/26/2017 11:57:49.830 DEBUG classValues: [DataValue(value=1, statusCode=GOOD (0x00000000) “”, sourceTimestamp=null, sourcePicoseconds=0, serverTimestamp=07/26/17 09:57:49.8300000 GMT, serverPicoseconds=0), DataValue(value=5:Lin4, statusCode=GOOD (0x00000000) “”, sourceTimestamp=null, sourcePicoseconds=0, serverTimestamp=07/26/17 09:57:49.8300000 GMT, serverPicoseconds=0), DataValue(value=() Lin4, statusCode=GOOD (0x00000000) “”, sourceTimestamp=null, sourcePicoseconds=0, serverTimestamp=07/26/17 09:57:49.8300000 GMT, serverPicoseconds=0)]
07/26/2017 11:57:49.830 DEBUG NodeClass: Object
07/26/2017 11:57:49.831 DEBUG browse: c=null
07/26/2017 11:57:49.834 DEBUG getNode() typeDefinition: ns=5;i=1002
07/26/2017 11:57:49.834 DEBUG getNode: nodeId=ns=5;i=1002 node=null
07/26/2017 11:57:49.835 DEBUG classValues: [DataValue(value=8, statusCode=GOOD (0x00000000) “”, sourceTimestamp=null, sourcePicoseconds=0, serverTimestamp=07/26/17 09:57:49.8350000 GMT, serverPicoseconds=0), DataValue(value=5:Lin, statusCode=GOOD (0x00000000) “”, sourceTimestamp=null, sourcePicoseconds=0, serverTimestamp=07/26/17 09:57:49.8350000 GMT, serverPicoseconds=0), DataValue(value=() Lin, statusCode=GOOD (0x00000000) “”, sourceTimestamp=null, sourcePicoseconds=0, serverTimestamp=07/26/17 09:57:49.8350000 GMT, serverPicoseconds=0)]
07/26/2017 11:57:49.835 DEBUG NodeClass: ObjectType
07/26/2017 11:57:49.835 DEBUG typeDefinition not local:null
07/26/2017 11:57:49.835 DEBUG readNode: node=NodeId=ns=5;i=1002, NodeClass=ObjectType, BrowseName=5:Lin, IsAbstract=false
07/26/2017 11:57:49.835 DEBUG readNode: attributes=[1, 2, 3, 4, 5, 6, 7, 8]
07/26/2017 11:57:49.835 DEBUG readAttributes(NodeId=ns=5;i=1002, NodeClass=ObjectType, BrowseName=5:Lin, IsAbstract=false, [1, 2, 3, 4, 5, 6, 7, 8])
07/26/2017 11:57:49.836 DEBUG readAttributes: attribute=NodeId value=DataValue(value=ns=5;i=1002, statusCode=GOOD (0x00000000) “”, sourceTimestamp=null, sourcePicoseconds=0, serverTimestamp=07/26/17 09:57:49.8350000 GMT, serverPicoseconds=0)
07/26/2017 11:57:49.836 DEBUG readAttributes: attribute=NodeClass value=DataValue(value=8, statusCode=GOOD (0x00000000) “”, sourceTimestamp=null, sourcePicoseconds=0, serverTimestamp=07/26/17 09:57:49.8350000 GMT, serverPicoseconds=0)
07/26/2017 11:57:49.836 DEBUG readAttributes: attribute=BrowseName value=DataValue(value=5:Lin, statusCode=GOOD (0x00000000) “”, sourceTimestamp=null, sourcePicoseconds=0, serverTimestamp=07/26/17 09:57:49.8350000 GMT, serverPicoseconds=0)
07/26/2017 11:57:49.836 DEBUG readAttributes: attribute=DisplayName value=DataValue(value=() Lin, statusCode=GOOD (0x00000000) “”, sourceTimestamp=null, sourcePicoseconds=0, serverTimestamp=07/26/17 09:57:49.8350000 GMT, serverPicoseconds=0)
07/26/2017 11:57:49.836 DEBUG readAttributes: attribute=Description value=DataValue(value=null, statusCode=GOOD (0x00000000) “”, sourceTimestamp=null, sourcePicoseconds=0, serverTimestamp=07/26/17 09:57:49.8350000 GMT, serverPicoseconds=0)
07/26/2017 11:57:49.836 DEBUG readAttributes: attribute=WriteMask value=DataValue(value=0, statusCode=GOOD (0x00000000) “”, sourceTimestamp=null, sourcePicoseconds=0, serverTimestamp=07/26/17 09:57:49.8350000 GMT, serverPicoseconds=0)
07/26/2017 11:57:49.836 DEBUG readAttributes: attribute=UserWriteMask value=DataValue(value=0, statusCode=GOOD (0x00000000) “”, sourceTimestamp=null, sourcePicoseconds=0, serverTimestamp=07/26/17 09:57:49.8350000 GMT, serverPicoseconds=0)
07/26/2017 11:57:49.836 DEBUG readAttributes: attribute=IsAbstract value=DataValue(value=false, statusCode=GOOD (0x00000000) “”, sourceTimestamp=null, sourcePicoseconds=0, serverTimestamp=07/26/17 09:57:49.8350000 GMT, serverPicoseconds=0)
07/26/2017 11:57:49.836 DEBUG getNode: node=NodeId=ns=5;i=1002, NodeClass=ObjectType, BrowseName=5:Lin, IsAbstract=false
07/26/2017 11:57:49.836 DEBUG readReferences: node=5:Lin
07/26/2017 11:57:49.837 DEBUG browse: c=null
07/26/2017 11:57:49.837 DEBUG readReferences: references.size()=10
07/26/2017 11:57:49.837 DEBUG readReferences: (node=5:Lin) r=6:InputVariables
07/26/2017 11:57:49.837 DEBUG readReferences: (node=5:Lin) r=6:OutputVariables
07/26/2017 11:57:49.837 DEBUG readReferences: (node=5:Lin) r=6:SemanticAnnotation
07/26/2017 11:57:49.837 DEBUG readReferences: (node=5:Lin) r=5:Create2
07/26/2017 11:57:49.837 DEBUG readReferences: (node=5:Lin) r=5:Lin0
07/26/2017 11:57:49.837 DEBUG readReferences: (node=5:Lin) r=5:Lin1
07/26/2017 11:57:49.837 DEBUG readReferences: (node=5:Lin) r=5:Lin2
07/26/2017 11:57:49.837 DEBUG readReferences: (node=5:Lin) r=5:Lin3
07/26/2017 11:57:49.837 DEBUG readReferences: (node=5:Lin) r=5:Lin4
07/26/2017 11:57:49.837 DEBUG readReferences: (node=5:Lin) r=6:FubProgramStateMachineType
07/26/2017 11:57:49.837 DEBUG readReferences: (node=5:Lin) oldReferences.size()=0
07/26/2017 11:57:49.837 DEBUG readReferences: (node=5:Lin) oldReferences=[]
07/26/2017 11:57:49.837 DEBUG readReferences: (node=5:Lin) refDescription=ReferenceDescription: ReferenceDescription
ReferenceTypeId=i=47
IsForward=true
NodeId=ns=5;i=5001
BrowseName=6:InputVariables
DisplayName=() InputVariables
NodeClass=NodeClass
value=1
name=Object
ordinal=1
TypeDefinition=nsu=http%3A%2F%2Fopcfoundation.org%2FUA%2F;i=58

07/26/2017 11:57:49.837 DEBUG readReferences: (node=5:Lin) refDescription=ReferenceDescription: ReferenceDescription
ReferenceTypeId=i=47
IsForward=true
NodeId=ns=5;i=5002
BrowseName=6:OutputVariables
DisplayName=() OutputVariables
NodeClass=NodeClass
value=1
name=Object
ordinal=1
TypeDefinition=nsu=http%3A%2F%2Fopcfoundation.org%2FUA%2F;i=58

07/26/2017 11:57:49.837 DEBUG readReferences: (node=5:Lin) refDescription=ReferenceDescription: ReferenceDescription
ReferenceTypeId=i=47
IsForward=true
NodeId=ns=5;i=5003
BrowseName=6:SemanticAnnotation
DisplayName=() SemanticAnnotation
NodeClass=NodeClass
value=1
name=Object
ordinal=1
TypeDefinition=nsu=http%3A%2F%2Fopcfoundation.org%2FUA%2F;i=58

07/26/2017 11:57:49.837 DEBUG readReferences: (node=5:Lin) refDescription=ReferenceDescription: ReferenceDescription
ReferenceTypeId=i=47
IsForward=true
NodeId=ns=5;s=Create2
BrowseName=5:Create2
DisplayName=(en) Create2
NodeClass=NodeClass
value=4
name=Method
ordinal=3
TypeDefinition=i=0

07/26/2017 11:57:49.837 DEBUG readReferences: (node=5:Lin) refDescription=ReferenceDescription: ReferenceDescription
ReferenceTypeId=i=40
IsForward=false
NodeId=ns=5;s=Lin0
BrowseName=5:Lin0
DisplayName=() Lin0
NodeClass=NodeClass
value=1
name=Object
ordinal=1
TypeDefinition=ns=5;i=1002

07/26/2017 11:57:49.837 DEBUG readReferences: (node=5:Lin) refDescription=ReferenceDescription: ReferenceDescription
ReferenceTypeId=i=40
IsForward=false
NodeId=ns=5;s=Lin1
BrowseName=5:Lin1
DisplayName=() Lin1
NodeClass=NodeClass
value=1
name=Object
ordinal=1
TypeDefinition=ns=5;i=1002

07/26/2017 11:57:49.838 DEBUG readReferences: (node=5:Lin) refDescription=ReferenceDescription: ReferenceDescription
ReferenceTypeId=i=40
IsForward=false
NodeId=ns=5;s=Lin2
BrowseName=5:Lin2
DisplayName=() Lin2
NodeClass=NodeClass
value=1
name=Object
ordinal=1
TypeDefinition=ns=5;i=1002

07/26/2017 11:57:49.838 DEBUG readReferences: (node=5:Lin) refDescription=ReferenceDescription: ReferenceDescription
ReferenceTypeId=i=40
IsForward=false
NodeId=ns=5;s=Lin3
BrowseName=5:Lin3
DisplayName=() Lin3
NodeClass=NodeClass
value=1
name=Object
ordinal=1
TypeDefinition=ns=5;i=1002

07/26/2017 11:57:49.838 DEBUG readReferences: (node=5:Lin) refDescription=ReferenceDescription: ReferenceDescription
ReferenceTypeId=i=40
IsForward=false
NodeId=ns=5;s=Lin4
BrowseName=5:Lin4
DisplayName=() Lin4
NodeClass=NodeClass
value=1
name=Object
ordinal=1
TypeDefinition=ns=5;i=1002

07/26/2017 11:57:49.838 DEBUG readReferences: (node=5:Lin) refDescription=ReferenceDescription: ReferenceDescription
ReferenceTypeId=i=45
IsForward=false
NodeId=ns=6;i=1005
BrowseName=6:FubProgramStateMachineType
DisplayName=() FubProgramStateMachineType
NodeClass=NodeClass
value=8
name=ObjectType
ordinal=4
TypeDefinition=i=0

07/26/2017 11:57:49.838 DEBUG readReferences: (node=5:Lin) newReferences.size()=10
07/26/2017 11:57:49.838 DEBUG getNode: nodeId=i=47 node=NodeId=i=47, NodeClass=ReferenceType, BrowseName=HasComponent, IsAbstract=false, Symmetric=false, InverseName=() ComponentOf
07/26/2017 11:57:49.838 DEBUG getNode: nodeId=i=47 node=NodeId=i=47, NodeClass=ReferenceType, BrowseName=HasComponent, IsAbstract=false, Symmetric=false, InverseName=() ComponentOf
07/26/2017 11:57:49.838 DEBUG getNode: nodeId=i=47 node=NodeId=i=47, NodeClass=ReferenceType, BrowseName=HasComponent, IsAbstract=false, Symmetric=false, InverseName=() ComponentOf
07/26/2017 11:57:49.838 DEBUG getNode: nodeId=i=47 node=NodeId=i=47, NodeClass=ReferenceType, BrowseName=HasComponent, IsAbstract=false, Symmetric=false, InverseName=() ComponentOf
07/26/2017 11:57:49.838 DEBUG getNode: nodeId=i=40 node=NodeId=i=40, NodeClass=ReferenceType, BrowseName=HasTypeDefinition, IsAbstract=false, Symmetric=false, InverseName=() TypeDefinitionOf
07/26/2017 11:57:49.838 DEBUG getNode: nodeId=i=40 node=NodeId=i=40, NodeClass=ReferenceType, BrowseName=HasTypeDefinition, IsAbstract=false, Symmetric=false, InverseName=() TypeDefinitionOf
07/26/2017 11:57:49.838 DEBUG getNode: nodeId=i=40 node=NodeId=i=40, NodeClass=ReferenceType, BrowseName=HasTypeDefinition, IsAbstract=false, Symmetric=false, InverseName=() TypeDefinitionOf
07/26/2017 11:57:49.838 DEBUG getNode: nodeId=i=40 node=NodeId=i=40, NodeClass=ReferenceType, BrowseName=HasTypeDefinition, IsAbstract=false, Symmetric=false, InverseName=() TypeDefinitionOf
07/26/2017 11:57:49.838 DEBUG getNode: nodeId=i=40 node=NodeId=i=40, NodeClass=ReferenceType, BrowseName=HasTypeDefinition, IsAbstract=false, Symmetric=false, InverseName=() TypeDefinitionOf
07/26/2017 11:57:49.838 DEBUG getNode: nodeId=i=45 node=NodeId=i=45, NodeClass=ReferenceType, BrowseName=HasSubtype, IsAbstract=false, Symmetric=false, InverseName=() HasSupertype
07/26/2017 11:57:49.838 DEBUG readReferences: (node=5:Lin) newReferences=[ ReferenceType=HasComponent SourceId=nsu=http%3A%2F%2Fkuka.com%2Frobot_fubs%2F;i=1002 TargetId=nsu=http%3A%2F%2Fkuka.com%2Frobot_fubs%2F;i=5001, ReferenceType=HasComponent SourceId=nsu=http%3A%2F%2Fkuka.com%2Frobot_fubs%2F;i=1002 TargetId=nsu=http%3A%2F%2Fkuka.com%2Frobot_fubs%2F;i=5002, ReferenceType=HasComponent SourceId=nsu=http%3A%2F%2Fkuka.com%2Frobot_fubs%2F;i=1002 TargetId=nsu=http%3A%2F%2Fkuka.com%2Frobot_fubs%2F;i=5003, ReferenceType=HasComponent SourceId=nsu=http%3A%2F%2Fkuka.com%2Frobot_fubs%2F;i=1002 TargetId=nsu=http%3A%2F%2Fkuka.com%2Frobot_fubs%2F;s=Create2, ReferenceType=HasTypeDefinition SourceId=nsu=http%3A%2F%2Fkuka.com%2Frobot_fubs%2F;s=Lin0 TargetId=nsu=http%3A%2F%2Fkuka.com%2Frobot_fubs%2F;i=1002, ReferenceType=HasTypeDefinition SourceId=nsu=http%3A%2F%2Fkuka.com%2Frobot_fubs%2F;s=Lin1 TargetId=nsu=http%3A%2F%2Fkuka.com%2Frobot_fubs%2F;i=1002, ReferenceType=HasTypeDefinition SourceId=nsu=http%3A%2F%2Fkuka.com%2Frobot_fubs%2F;s=Lin2 TargetId=nsu=http%3A%2F%2Fkuka.com%2Frobot_fubs%2F;i=1002, ReferenceType=HasTypeDefinition SourceId=nsu=http%3A%2F%2Fkuka.com%2Frobot_fubs%2F;s=Lin3 TargetId=nsu=http%3A%2F%2Fkuka.com%2Frobot_fubs%2F;i=1002, ReferenceType=HasTypeDefinition SourceId=nsu=http%3A%2F%2Fkuka.com%2Frobot_fubs%2F;s=Lin4 TargetId=nsu=http%3A%2F%2Fkuka.com%2Frobot_fubs%2F;i=1002, ReferenceType=HasSubtype SourceId=nsu=http%3A%2F%2Fkuka.com%2Ffubs;i=1005 TargetId=nsu=http%3A%2F%2Fkuka.com%2Frobot_fubs%2F;i=1002]
07/26/2017 11:57:49.838 DEBUG readReferences: (node=5:Lin) remaining oldReferences.size()=0
07/26/2017 11:57:49.838 DEBUG readReferences: (node=5:Lin) remaining oldReferences=[]
07/26/2017 11:57:49.838 DEBUG readProperties: node=5:Lin properties=null
07/26/2017 11:57:49.838 DEBUG typeDefinition not local:ns=5;i=1002
07/26/2017 11:57:49.838 DEBUG readNode: node=NodeId=ns=5;s=Lin4, NodeClass=Object, BrowseName=5:Lin4
07/26/2017 11:57:49.838 DEBUG readNode: attributes=[1, 2, 3, 4, 5, 6, 7, 12]
07/26/2017 11:57:49.838 DEBUG readAttributes(NodeId=ns=5;s=Lin4, NodeClass=Object, BrowseName=5:Lin4, [1, 2, 3, 4, 5, 6, 7, 12])
07/26/2017 11:57:49.839 DEBUG readAttributes: attribute=NodeId value=DataValue(value=ns=5;s=Lin4, statusCode=GOOD (0x00000000) “”, sourceTimestamp=null, sourcePicoseconds=0, serverTimestamp=07/26/17 09:57:49.8390000 GMT, serverPicoseconds=0)
07/26/2017 11:57:49.839 DEBUG readAttributes: attribute=NodeClass value=DataValue(value=1, statusCode=GOOD (0x00000000) “”, sourceTimestamp=null, sourcePicoseconds=0, serverTimestamp=07/26/17 09:57:49.8390000 GMT, serverPicoseconds=0)
07/26/2017 11:57:49.839 DEBUG readAttributes: attribute=BrowseName value=DataValue(value=5:Lin4, statusCode=GOOD (0x00000000) “”, sourceTimestamp=null, sourcePicoseconds=0, serverTimestamp=07/26/17 09:57:49.8390000 GMT, serverPicoseconds=0)
07/26/2017 11:57:49.839 DEBUG readAttributes: attribute=DisplayName value=DataValue(value=() Lin4, statusCode=GOOD (0x00000000) “”, sourceTimestamp=null, sourcePicoseconds=0, serverTimestamp=07/26/17 09:57:49.8390000 GMT, serverPicoseconds=0)
07/26/2017 11:57:49.839 DEBUG readAttributes: attribute=Description value=DataValue(value=null, statusCode=GOOD (0x00000000) “”, sourceTimestamp=null, sourcePicoseconds=0, serverTimestamp=07/26/17 09:57:49.8390000 GMT, serverPicoseconds=0)
07/26/2017 11:57:49.839 DEBUG readAttributes: attribute=WriteMask value=DataValue(value=0, statusCode=GOOD (0x00000000) “”, sourceTimestamp=null, sourcePicoseconds=0, serverTimestamp=07/26/17 09:57:49.8390000 GMT, serverPicoseconds=0)
07/26/2017 11:57:49.839 DEBUG readAttributes: attribute=UserWriteMask value=DataValue(value=0, statusCode=GOOD (0x00000000) “”, sourceTimestamp=null, sourcePicoseconds=0, serverTimestamp=07/26/17 09:57:49.8390000 GMT, serverPicoseconds=0)
07/26/2017 11:57:49.840 DEBUG readAttributes: attribute=EventNotifier value=DataValue(value=0, statusCode=GOOD (0x00000000) “”, sourceTimestamp=null, sourcePicoseconds=0, serverTimestamp=07/26/17 09:57:49.8390000 GMT, serverPicoseconds=0)
07/26/2017 11:57:49.840 DEBUG getNode: node=NodeId=ns=5;s=Lin4, NodeClass=Object, BrowseName=5:Lin4
07/26/2017 11:57:49.840 DEBUG readReferences: node=5:Lin4
07/26/2017 11:57:49.841 WARN readReferences, unknown node: ns=5;s=Lin4
com.prosysopc.ua.StatusException: Bad_NodeIdUnknown (0x80340000) “The node id refers to a node that does not exist in the server address space.” StatusCode=Bad_NodeIdUnknown (0x80340000) “The node id refers to a node that does not exist in the server address space.”
at com.prosysopc.ua.client.UaClient.checkOperationResult(Unknown Source)
at com.prosysopc.ua.client.AddressSpace.checkOperationResult(Unknown Source)
at com.prosysopc.ua.client.AddressSpace.browse(Unknown Source)
at com.prosysopc.ua.client.AddressSpace.browse(Unknown Source)
at com.prosysopc.ua.client.AddressSpace.readReferences(Unknown Source)
at com.prosysopc.ua.client.AddressSpace.getNode(Unknown Source)
at application.ViperFunctionBlock.createFubInstance(ViperFunctionBlock.java:131)
at application.ViperFunctionBlock.process(ViperFunctionBlock.java:68)
at functionBlock.Activity.body(Activity.java:467)
at functionBlock.FunctionBlock.body(FunctionBlock.java:564)
at functionBlock.Activity.internalBody(Activity.java:485)
at functionBlock.Activity.internalRun(Activity.java:1068)
at functionBlock.Activity.run(Activity.java:1196)
at functionBlock.Activity.run(Activity.java:1303)
at functionBlock.Activity.syncRun(Activity.java:1298)
at application.ViperFunctionBlock$TestActivity.process(ViperFunctionBlock.java:207)
at functionBlock.Activity.body(Activity.java:467)
at functionBlock.Activity.internalBody(Activity.java:485)
at functionBlock.Activity.internalRun(Activity.java:1068)
at functionBlock.Activity.run(Activity.java:1196)
at functionBlock.Activity.run(Activity.java:1303)
at functionBlock.Activity.syncRun(Activity.java:1298)
at application.ViperFunctionBlock.main(ViperFunctionBlock.java:216)
07/26/2017 11:57:49.843 DEBUG readProperties: node=5:Lin4 properties=null

July 26, 2017
13:35, EEST
Avatar
Jouni Aro
Moderator
Moderators
Forum Posts: 1026
Member Since:
December 21, 2011
sp_UserOfflineSmall Offline

Looks like there is something quite wrong here:

SourceId=nsu=http%3A%2F%2Fkuka.com%2Frobot_fubs%2F;i=1002 TargetId=nsu=http%3A%2F%2Fkuka.com%2Frobot_fubs%2F;s=Create2, ReferenceType=HasTypeDefinition 
SourceId=nsu=http%3A%2F%2Fkuka.com%2Frobot_fubs%2F;s=Lin0 TargetId=nsu=http%3A%2F%2Fkuka.com%2Frobot_fubs%2F;i=1002, ReferenceType=HasTypeDefinition 
SourceId=nsu=http%3A%2F%2Fkuka.com%2Frobot_fubs%2F;s=Lin1 TargetId=nsu=http%3A%2F%2Fkuka.com%2Frobot_fubs%2F;i=1002, ReferenceType=HasTypeDefinition 
SourceId=nsu=http%3A%2F%2Fkuka.com%2Frobot_fubs%2F;s=Lin2 TargetId=nsu=http%3A%2F%2Fkuka.com%2Frobot_fubs%2F;i=1002, ReferenceType=HasTypeDefinition 
SourceId=nsu=http%3A%2F%2Fkuka.com%2Frobot_fubs%2F;s=Lin3 TargetId=nsu=http%3A%2F%2Fkuka.com%2Frobot_fubs%2F;i=1002, ReferenceType=HasTypeDefinition 
SourceId=nsu=http%3A%2F%2Fkuka.com%2Frobot_fubs%2F;s=Lin4 TargetId=nsu=http%3A%2F%2Fkuka.com%2Frobot_fubs%2F;i=1002, ReferenceType=HasSubtype 

So the node has 5 HasTypeDefinition references and one HasSubtype reference. Only 1 HasTypeDefinition is allowed and HasSubtype should only be present in Type nodes.

July 26, 2017
14:31, EEST
Avatar
kapsl
Member
Members
Forum Posts: 57
Member Since:
December 20, 2016
sp_UserOfflineSmall Offline

This maybe came here, because I added an isntance of the type a few times. This is the output, if only one instance was added:

07/26/2017 13:25:35.358 DEBUG getNode: nodeId=ns=5;s=Lin0 node=null
07/26/2017 13:25:35.360 DEBUG classValues: [DataValue(value=1, statusCode=GOOD (0x00000000) “”, sourceTimestamp=null, sourcePicoseconds=0, serverTimestamp=07/26/17 11:25:35.3590000 GMT, serverPicoseconds=0), DataValue(value=5:Lin0, statusCode=GOOD (0x00000000) “”, sourceTimestamp=null, sourcePicoseconds=0, serverTimestamp=07/26/17 11:25:35.3590000 GMT, serverPicoseconds=0), DataValue(value=() Lin0, statusCode=GOOD (0x00000000) “”, sourceTimestamp=null, sourcePicoseconds=0, serverTimestamp=07/26/17 11:25:35.3590000 GMT, serverPicoseconds=0)]
07/26/2017 13:25:35.360 DEBUG NodeClass: Object
07/26/2017 13:25:35.361 DEBUG browse: c=null
07/26/2017 13:25:35.364 DEBUG getNode() typeDefinition: ns=5;i=1002
07/26/2017 13:25:35.364 DEBUG getNode: nodeId=ns=5;i=1002 node=null
07/26/2017 13:25:35.366 DEBUG classValues: [DataValue(value=8, statusCode=GOOD (0x00000000) “”, sourceTimestamp=null, sourcePicoseconds=0, serverTimestamp=07/26/17 11:25:35.3650000 GMT, serverPicoseconds=0), DataValue(value=5:Lin, statusCode=GOOD (0x00000000) “”, sourceTimestamp=null, sourcePicoseconds=0, serverTimestamp=07/26/17 11:25:35.3650000 GMT, serverPicoseconds=0), DataValue(value=() Lin, statusCode=GOOD (0x00000000) “”, sourceTimestamp=null, sourcePicoseconds=0, serverTimestamp=07/26/17 11:25:35.3650000 GMT, serverPicoseconds=0)]
07/26/2017 13:25:35.366 DEBUG NodeClass: ObjectType
07/26/2017 13:25:35.366 DEBUG typeDefinition not local:null
07/26/2017 13:25:35.366 DEBUG readNode: node=NodeId=ns=5;i=1002, NodeClass=ObjectType, BrowseName=5:Lin, IsAbstract=false
07/26/2017 13:25:35.366 DEBUG readNode: attributes=[1, 2, 3, 4, 5, 6, 7, 8]
07/26/2017 13:25:35.366 DEBUG readAttributes(NodeId=ns=5;i=1002, NodeClass=ObjectType, BrowseName=5:Lin, IsAbstract=false, [1, 2, 3, 4, 5, 6, 7, 8])
07/26/2017 13:25:35.367 DEBUG readAttributes: attribute=NodeId value=DataValue(value=ns=5;i=1002, statusCode=GOOD (0x00000000) “”, sourceTimestamp=null, sourcePicoseconds=0, serverTimestamp=07/26/17 11:25:35.3660000 GMT, serverPicoseconds=0)
07/26/2017 13:25:35.367 DEBUG readAttributes: attribute=NodeClass value=DataValue(value=8, statusCode=GOOD (0x00000000) “”, sourceTimestamp=null, sourcePicoseconds=0, serverTimestamp=07/26/17 11:25:35.3660000 GMT, serverPicoseconds=0)
07/26/2017 13:25:35.367 DEBUG readAttributes: attribute=BrowseName value=DataValue(value=5:Lin, statusCode=GOOD (0x00000000) “”, sourceTimestamp=null, sourcePicoseconds=0, serverTimestamp=07/26/17 11:25:35.3660000 GMT, serverPicoseconds=0)
07/26/2017 13:25:35.367 DEBUG readAttributes: attribute=DisplayName value=DataValue(value=() Lin, statusCode=GOOD (0x00000000) “”, sourceTimestamp=null, sourcePicoseconds=0, serverTimestamp=07/26/17 11:25:35.3660000 GMT, serverPicoseconds=0)
07/26/2017 13:25:35.367 DEBUG readAttributes: attribute=Description value=DataValue(value=null, statusCode=GOOD (0x00000000) “”, sourceTimestamp=null, sourcePicoseconds=0, serverTimestamp=07/26/17 11:25:35.3660000 GMT, serverPicoseconds=0)
07/26/2017 13:25:35.367 DEBUG readAttributes: attribute=WriteMask value=DataValue(value=0, statusCode=GOOD (0x00000000) “”, sourceTimestamp=null, sourcePicoseconds=0, serverTimestamp=07/26/17 11:25:35.3660000 GMT, serverPicoseconds=0)
07/26/2017 13:25:35.367 DEBUG readAttributes: attribute=UserWriteMask value=DataValue(value=0, statusCode=GOOD (0x00000000) “”, sourceTimestamp=null, sourcePicoseconds=0, serverTimestamp=07/26/17 11:25:35.3660000 GMT, serverPicoseconds=0)
07/26/2017 13:25:35.367 DEBUG readAttributes: attribute=IsAbstract value=DataValue(value=false, statusCode=GOOD (0x00000000) “”, sourceTimestamp=null, sourcePicoseconds=0, serverTimestamp=07/26/17 11:25:35.3660000 GMT, serverPicoseconds=0)
07/26/2017 13:25:35.367 DEBUG getNode: node=NodeId=ns=5;i=1002, NodeClass=ObjectType, BrowseName=5:Lin, IsAbstract=false
07/26/2017 13:25:35.367 DEBUG readReferences: node=5:Lin
07/26/2017 13:25:35.368 DEBUG browse: c=null
07/26/2017 13:25:35.368 DEBUG readReferences: references.size()=6
07/26/2017 13:25:35.368 DEBUG readReferences: (node=5:Lin) r=6:InputVariables
07/26/2017 13:25:35.368 DEBUG readReferences: (node=5:Lin) r=6:OutputVariables
07/26/2017 13:25:35.368 DEBUG readReferences: (node=5:Lin) r=6:SemanticAnnotation
07/26/2017 13:25:35.368 DEBUG readReferences: (node=5:Lin) r=5:Create2
07/26/2017 13:25:35.368 DEBUG readReferences: (node=5:Lin) r=5:Lin0
07/26/2017 13:25:35.368 DEBUG readReferences: (node=5:Lin) r=6:FubProgramStateMachineType
07/26/2017 13:25:35.368 DEBUG readReferences: (node=5:Lin) oldReferences.size()=0
07/26/2017 13:25:35.368 DEBUG readReferences: (node=5:Lin) oldReferences=[]
07/26/2017 13:25:35.368 DEBUG readReferences: (node=5:Lin) refDescription=ReferenceDescription: ReferenceDescription
ReferenceTypeId=i=47
IsForward=true
NodeId=ns=5;i=5001
BrowseName=6:InputVariables
DisplayName=() InputVariables
NodeClass=NodeClass
value=1
name=Object
ordinal=1
TypeDefinition=nsu=http%3A%2F%2Fopcfoundation.org%2FUA%2F;i=58

07/26/2017 13:25:35.369 DEBUG readReferences: (node=5:Lin) refDescription=ReferenceDescription: ReferenceDescription
ReferenceTypeId=i=47
IsForward=true
NodeId=ns=5;i=5002
BrowseName=6:OutputVariables
DisplayName=() OutputVariables
NodeClass=NodeClass
value=1
name=Object
ordinal=1
TypeDefinition=nsu=http%3A%2F%2Fopcfoundation.org%2FUA%2F;i=58

07/26/2017 13:25:35.369 DEBUG readReferences: (node=5:Lin) refDescription=ReferenceDescription: ReferenceDescription
ReferenceTypeId=i=47
IsForward=true
NodeId=ns=5;i=5003
BrowseName=6:SemanticAnnotation
DisplayName=() SemanticAnnotation
NodeClass=NodeClass
value=1
name=Object
ordinal=1
TypeDefinition=nsu=http%3A%2F%2Fopcfoundation.org%2FUA%2F;i=58

07/26/2017 13:25:35.369 DEBUG readReferences: (node=5:Lin) refDescription=ReferenceDescription: ReferenceDescription
ReferenceTypeId=i=47
IsForward=true
NodeId=ns=5;s=Create2
BrowseName=5:Create2
DisplayName=(en) Create2
NodeClass=NodeClass
value=4
name=Method
ordinal=3
TypeDefinition=i=0

07/26/2017 13:25:35.369 DEBUG readReferences: (node=5:Lin) refDescription=ReferenceDescription: ReferenceDescription
ReferenceTypeId=i=40
IsForward=false
NodeId=ns=5;s=Lin0
BrowseName=5:Lin0
DisplayName=() Lin0
NodeClass=NodeClass
value=1
name=Object
ordinal=1
TypeDefinition=ns=5;i=1002

07/26/2017 13:25:35.369 DEBUG readReferences: (node=5:Lin) refDescription=ReferenceDescription: ReferenceDescription
ReferenceTypeId=i=45
IsForward=false
NodeId=ns=6;i=1005
BrowseName=6:FubProgramStateMachineType
DisplayName=() FubProgramStateMachineType
NodeClass=NodeClass
value=8
name=ObjectType
ordinal=4
TypeDefinition=i=0

07/26/2017 13:25:35.369 DEBUG readReferences: (node=5:Lin) newReferences.size()=6
07/26/2017 13:25:35.369 DEBUG getNode: nodeId=i=47 node=NodeId=i=47, NodeClass=ReferenceType, BrowseName=HasComponent, IsAbstract=false, Symmetric=false, InverseName=() ComponentOf
07/26/2017 13:25:35.369 DEBUG getNode: nodeId=i=47 node=NodeId=i=47, NodeClass=ReferenceType, BrowseName=HasComponent, IsAbstract=false, Symmetric=false, InverseName=() ComponentOf
07/26/2017 13:25:35.369 DEBUG getNode: nodeId=i=47 node=NodeId=i=47, NodeClass=ReferenceType, BrowseName=HasComponent, IsAbstract=false, Symmetric=false, InverseName=() ComponentOf
07/26/2017 13:25:35.369 DEBUG getNode: nodeId=i=47 node=NodeId=i=47, NodeClass=ReferenceType, BrowseName=HasComponent, IsAbstract=false, Symmetric=false, InverseName=() ComponentOf
07/26/2017 13:25:35.369 DEBUG getNode: nodeId=i=40 node=NodeId=i=40, NodeClass=ReferenceType, BrowseName=HasTypeDefinition, IsAbstract=false, Symmetric=false, InverseName=() TypeDefinitionOf
07/26/2017 13:25:35.369 DEBUG getNode: nodeId=i=45 node=NodeId=i=45, NodeClass=ReferenceType, BrowseName=HasSubtype, IsAbstract=false, Symmetric=false, InverseName=() HasSupertype
07/26/2017 13:25:35.369 DEBUG readReferences: (node=5:Lin) newReferences=[ ReferenceType=HasComponent SourceId=nsu=http%3A%2F%2Fkuka.com%2Frobot_fubs%2F;i=1002 TargetId=nsu=http%3A%2F%2Fkuka.com%2Frobot_fubs%2F;i=5001, ReferenceType=HasComponent SourceId=nsu=http%3A%2F%2Fkuka.com%2Frobot_fubs%2F;i=1002 TargetId=nsu=http%3A%2F%2Fkuka.com%2Frobot_fubs%2F;i=5002, ReferenceType=HasComponent SourceId=nsu=http%3A%2F%2Fkuka.com%2Frobot_fubs%2F;i=1002 TargetId=nsu=http%3A%2F%2Fkuka.com%2Frobot_fubs%2F;i=5003, ReferenceType=HasComponent SourceId=nsu=http%3A%2F%2Fkuka.com%2Frobot_fubs%2F;i=1002 TargetId=nsu=http%3A%2F%2Fkuka.com%2Frobot_fubs%2F;s=Create2, ReferenceType=HasTypeDefinition SourceId=nsu=http%3A%2F%2Fkuka.com%2Frobot_fubs%2F;s=Lin0 TargetId=nsu=http%3A%2F%2Fkuka.com%2Frobot_fubs%2F;i=1002, ReferenceType=HasSubtype SourceId=nsu=http%3A%2F%2Fkuka.com%2Ffubs;i=1005 TargetId=nsu=http%3A%2F%2Fkuka.com%2Frobot_fubs%2F;i=1002]
07/26/2017 13:25:35.369 DEBUG readReferences: (node=5:Lin) remaining oldReferences.size()=0
07/26/2017 13:25:35.369 DEBUG readReferences: (node=5:Lin) remaining oldReferences=[]
07/26/2017 13:25:35.369 DEBUG readProperties: node=5:Lin properties=null
07/26/2017 13:25:35.369 DEBUG typeDefinition not local:ns=5;i=1002
07/26/2017 13:25:35.369 DEBUG readNode: node=NodeId=ns=5;s=Lin0, NodeClass=Object, BrowseName=5:Lin0
07/26/2017 13:25:35.369 DEBUG readNode: attributes=[1, 2, 3, 4, 5, 6, 7, 12]
07/26/2017 13:25:35.369 DEBUG readAttributes(NodeId=ns=5;s=Lin0, NodeClass=Object, BrowseName=5:Lin0, [1, 2, 3, 4, 5, 6, 7, 12])
07/26/2017 13:25:35.372 DEBUG readAttributes: attribute=NodeId value=DataValue(value=ns=5;s=Lin0, statusCode=GOOD (0x00000000) “”, sourceTimestamp=null, sourcePicoseconds=0, serverTimestamp=07/26/17 11:25:35.3710000 GMT, serverPicoseconds=0)
07/26/2017 13:25:35.372 DEBUG readAttributes: attribute=NodeClass value=DataValue(value=1, statusCode=GOOD (0x00000000) “”, sourceTimestamp=null, sourcePicoseconds=0, serverTimestamp=07/26/17 11:25:35.3710000 GMT, serverPicoseconds=0)
07/26/2017 13:25:35.372 DEBUG readAttributes: attribute=BrowseName value=DataValue(value=5:Lin0, statusCode=GOOD (0x00000000) “”, sourceTimestamp=null, sourcePicoseconds=0, serverTimestamp=07/26/17 11:25:35.3710000 GMT, serverPicoseconds=0)
07/26/2017 13:25:35.372 DEBUG readAttributes: attribute=DisplayName value=DataValue(value=() Lin0, statusCode=GOOD (0x00000000) “”, sourceTimestamp=null, sourcePicoseconds=0, serverTimestamp=07/26/17 11:25:35.3710000 GMT, serverPicoseconds=0)
07/26/2017 13:25:35.372 DEBUG readAttributes: attribute=Description value=DataValue(value=null, statusCode=GOOD (0x00000000) “”, sourceTimestamp=null, sourcePicoseconds=0, serverTimestamp=07/26/17 11:25:35.3710000 GMT, serverPicoseconds=0)
07/26/2017 13:25:35.372 DEBUG readAttributes: attribute=WriteMask value=DataValue(value=0, statusCode=GOOD (0x00000000) “”, sourceTimestamp=null, sourcePicoseconds=0, serverTimestamp=07/26/17 11:25:35.3710000 GMT, serverPicoseconds=0)
07/26/2017 13:25:35.372 DEBUG readAttributes: attribute=UserWriteMask value=DataValue(value=0, statusCode=GOOD (0x00000000) “”, sourceTimestamp=null, sourcePicoseconds=0, serverTimestamp=07/26/17 11:25:35.3710000 GMT, serverPicoseconds=0)
07/26/2017 13:25:35.372 DEBUG readAttributes: attribute=EventNotifier value=DataValue(value=0, statusCode=GOOD (0x00000000) “”, sourceTimestamp=null, sourcePicoseconds=0, serverTimestamp=07/26/17 11:25:35.3710000 GMT, serverPicoseconds=0)
07/26/2017 13:25:35.372 DEBUG getNode: node=NodeId=ns=5;s=Lin0, NodeClass=Object, BrowseName=5:Lin0
07/26/2017 13:25:35.372 DEBUG readReferences: node=5:Lin0
07/26/2017 13:25:35.375 WARN readReferences, unknown node: ns=5;s=Lin0
com.prosysopc.ua.StatusException: Bad_NodeIdUnknown (0x80340000) “The node id refers to a node that does not exist in the server address space.” StatusCode=Bad_NodeIdUnknown (0x80340000) “The node id refers to a node that does not exist in the server address space.”
at com.prosysopc.ua.client.UaClient.checkOperationResult(Unknown Source)
at com.prosysopc.ua.client.AddressSpace.checkOperationResult(Unknown Source)
at com.prosysopc.ua.client.AddressSpace.browse(Unknown Source)
at com.prosysopc.ua.client.AddressSpace.browse(Unknown Source)
at com.prosysopc.ua.client.AddressSpace.readReferences(Unknown Source)
at com.prosysopc.ua.client.AddressSpace.getNode(Unknown Source)
at application.ViperFunctionBlock.createFubInstance(ViperFunctionBlock.java:131)
at application.ViperFunctionBlock.process(ViperFunctionBlock.java:68)
at functionBlock.Activity.body(Activity.java:467)
at functionBlock.FunctionBlock.body(FunctionBlock.java:564)
at functionBlock.Activity.internalBody(Activity.java:485)
at functionBlock.Activity.internalRun(Activity.java:1068)
at functionBlock.Activity.run(Activity.java:1196)
at functionBlock.Activity.run(Activity.java:1303)
at functionBlock.Activity.syncRun(Activity.java:1298)
at application.ViperFunctionBlock$TestActivity.process(ViperFunctionBlock.java:207)
at functionBlock.Activity.body(Activity.java:467)
at functionBlock.Activity.internalBody(Activity.java:485)
at functionBlock.Activity.internalRun(Activity.java:1068)
at functionBlock.Activity.run(Activity.java:1196)
at functionBlock.Activity.run(Activity.java:1303)
at functionBlock.Activity.syncRun(Activity.java:1298)
at application.ViperFunctionBlock.main(ViperFunctionBlock.java:216)
07/26/2017 13:25:35.377 DEBUG readProperties: node=5:Lin0 properties=null

July 26, 2017
15:13, EEST
Avatar
Jouni Aro
Moderator
Moderators
Forum Posts: 1026
Member Since:
December 21, 2011
sp_UserOfflineSmall Offline

Oh yes, sorry I misinterpreted. That output was from reading the Type Node (Lin), and those were references from the instances to this type.

But yes, looks like the server would not find any references for the instance (Lin0) and just gives the Bad_NodeIdUnknown for some reason. How do you create the instance and add it to the NodeManager in the server? Have you modified the handling of ‘Browse’ in your server: do you manipulate the NodeManager or use a NodeManagerListener?

July 27, 2017
9:53, EEST
Avatar
kapsl
Member
Members
Forum Posts: 57
Member Since:
December 20, 2016
sp_UserOfflineSmall Offline

Good morning Jouni,
ok, so in the server first the codegenerated models are loaded with registerModel() and
getAddressSpace().loadModel(getClass().getClassLoader().getResource(“….xml”).toURI());

Then the instance is created by
LinNode myprog = createInstance(LinNode.class, name, programId);
myprog.setProgramName(name);
myprog.setState(ProgramState.Ready);

On the serverside, also accessing the subnodes works:
myprog.setCurrentPosition(new Double[] { 1.0, 2.0 });

The handling of Browse is not modified and I didn’t create any NodeManagerListener, but several NodeManagers for the different namespaces. In UaExpert, everyhting works well, when browsing the instance.

lg Manu

July 27, 2017
11:49, EEST
Avatar
Jouni Aro
Moderator
Moderators
Forum Posts: 1026
Member Since:
December 21, 2011
sp_UserOfflineSmall Offline

This is quite strange. Would you be able to share the project (by email to uajava-support at prosysopc.com), so I could try it out and see if I understand what is going on?

July 27, 2017
15:44, EEST
Avatar
kapsl
Member
Members
Forum Posts: 57
Member Since:
December 20, 2016
sp_UserOfflineSmall Offline

I’m clarifying with my boss, if or how we can share the project. Mean while I found out, that when I execute the same code on the server everyhting works fine:

browsePath = new OPCUABrowsePath();
browsePath.append(null, “Objects”);
browsePath.append(“http://ns.com/fubs/”, “InstanceName”);

indexedBrowsePath = browsePath.generateIndexedBrowsePath(getServer());
nodeID = null;

try {
nodeID = server.translateBrowsePathToNodeID(indexedBrowsePath);
} catch (Exception e) {
log.error(“Path for create method could not be found”, e);
}

UaNode test = null;
try {
test = server
.getAddressSpace().getNode(nodeID);
} catch (StatusException e1) {
e1.printStackTrace();
}

When I run this on the client I get this

com.prosysopc.ua.StatusException: Bad_NodeIdUnknown (0x80340000) “The node id refers to a node that does not exist in the server address space.” StatusCode=Bad_NodeIdUnknown (0x80340000) “The node id refers to a node that does not exist in the server address space.”

error message is thrown from line
test = server.getAddressSpace().getNode(nodeID);

But the nodeID is correct, if I give a e.g. wrong Namespace, i get a different exception.

The strange thing is, that on the server getNode() throws a StatusException. On the client it throws a Service and AddressSpaceException. But a StatusException is written on the console, i guess by the logger.

July 27, 2017
16:25, EEST
Avatar
Jouni Aro
Moderator
Moderators
Forum Posts: 1026
Member Since:
December 21, 2011
sp_UserOfflineSmall Offline

OK, maybe the plain XML model would be enough to see if the problem can be reproduced here.

Forum Timezone: Europe/Helsinki

Most Users Ever Online: 1919

Currently Online:
16 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

Heikki Tahvanainen: 402

hbrackel: 144

rocket science: 88

pramanj: 86

Francesco Zambon: 83

Ibrahim: 78

Sabari: 62

kapsl: 57

gjevremovic: 49

Xavier: 43

Member Stats:

Guest Posters: 0

Members: 730

Moderators: 7

Admins: 1

Forum Stats:

Groups: 3

Forums: 15

Topics: 1529

Posts: 6471

Newest Members:

toneylapham544, rondawolinski7, Marypof5711, roycedelargie91, kourtneyquisenbe, ellis87832073466, zkxwilliemae, gabriellabachus, Deakin, KTP25Zof

Moderators: Jouni Aro: 1026, Pyry: 1, Petri: 0, Bjarne Boström: 1032, Jimmy Ni: 26, Matti Siponen: 349, Lusetti: 0

Administrators: admin: 1