Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getNode() throws status=Bad_NodeClassInvalid (not seems ok in other clients) #760

Closed
faljse opened this issue Feb 11, 2021 · 5 comments
Closed

Comments

@faljse
Copy link

faljse commented Feb 11, 2021

We are developing a simple client to test/benchmark our opcua server.
I'm somewhat lost in this opc-ua stuff, so this might not be a bug at all (sorry).

Calling getNode() on most of the nodes in our namespaces throws an exception:
"status=Bad_NodeClassInvalid, description=The node class is not valid."

Integer nodeClassValue = (Integer) baseAttributeValues.get(1).getValue().getValue();

getValue() returns null.

Ist this an issue with our namespace, the way i query the node, or something else?

The nodes seem to work fine in uaexpert (but they do have some invalid arguments)
client lib is milo 5.3

@kevinherron
Copy link
Contributor

Hmm, well it sounds like your server is not returning a valid value for NodeClass, which isn't an optional attribute.

What does UaExpert show in the attributes pane for this Node?

@faljse
Copy link
Author

faljse commented Feb 15, 2021

The error ("UaException: status=Bad_NodeClassInvalid, message=The node class is not valid.")
is thrown if the nodeid isnt found in the namespace.
UaNode node = as.getNode(NodeId.parse("ns=4;s=asdf"));

Is this the expected behavior? I would prefer a more specific error message.

@kevinherron
Copy link
Contributor

I agree a better error message should be returned if possible. I have prepared an easy fix for this.

@kevinherron
Copy link
Contributor

Pending PR: #769

Was this the cause of your original issue or do you still need assistance?

@faljse
Copy link
Author

faljse commented Feb 15, 2021

Yes, that caused my original issue; Thx!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants