Topic RSS9:12, EEST
February 29, 2024
OfflineHello, team
Have NPE in 4.8.0. Any thougths on that?
======
Here is stacktrace.
java.lang.NullPointerException: nodeId
at com.prosysopc.ua.client.AddressSpace.browse(SourceFile:1862)
at com.prosysopc.ua.client.AddressSpace.browse(SourceFile:367)
at com.prosysopc.ua.client.AddressSpace.readReferences(SourceFile:1404)
at com.prosysopc.ua.client.AddressSpace.getNode(SourceFile:977)
at com.prosysopc.ua.client.AddressSpace.getNode(SourceFile:854)
at
======
The simplified code:
List references = addressSpace().browse(nodeId, BrowseDirection.Forward, NodeId.NULL, true, NodeClass.Variable);
ExpandedNodeId expandedNodeId = references.get(0).getNodeId();
UaNode uaNode = addressSpace().getNode(expandedNodeId);
12:45, EEST
April 3, 2012
OfflineHi,
That version is over 4 years old. Could you please try again with the latest version, 5.8.0?
The .getNode does read the Attributes of the node. In 4.x that also did re-read the NodeId Attribute, with basically assuming it gets the same NodeId back. This was changed during 5.x (around 5.4.0) that the NodeId of an UaNode is final and wont be re-read anymore.
Can you show what client.readAttribute(expandedNodeId, Attributes.NodeId) returns or throws?
The expandedNodeId being the same as what you used for addressSpace().getNode(expandedNodeId). If the result is anything, but the expandedNodeId (in NodeId format that is; depending on things the ExpandedNodeId format could have been with the namespaceuri as well), then that is probably the issue and the server must be fixed. In practice to in this case I would expect a null value with bad status be returned in the DataValue for the theory to be proven. IF this was the case, then 5.8.0 should avoid the issue (but let us know if not), though the server should still be fixed.
5 Guest(s)

Log In
Register