12:05, EEST
October 21, 2022
Hello,
i’m using prosys-opc-ua-client-4.2.0-955 and want to access files on a UA CPP Testserver. Therefore i creteated a FileType and used fileType.open(FileTypeOpenMode.Read) to get the fileHandle.
I get the following exception java.lang.IllegalArgumentException: The method node ‘Open’ was not found in object …
When I’ try it with a simple MethodCall I can open the file in read mode an get back the filehandle.
Thank you in advance and best regards
Martin
13:13, EEST
April 3, 2012
Hi,
That would happen if there is no “Open” Method node attached to the FileType node via HasComponent Reference. Can you check does it exist?
Do you have the latest version of that test server? If not can you update?
P.S.
In the technical sense, that search of the method node is specific to our SDK, as the instance could have overridden the Method node during instantiation, but in some cases you might be able to do the call “manually” if you just gave it the correct Method NodeId, however the reference should still exist there, as it has the Mandatory ModellingRule.
15:37, EEST
October 21, 2022
18:31, EEST
April 3, 2012
It is a bit hard to say then, because that exception “The method node ‘Open’ was not found in object ” specifically happens if we couldn’t find a HasComponent target with the BrowseName (“Open” here) from the node..
I do note that the SDK version you have is very old, the latest is 4.9.0, thus if possible could you check with the latest version? Any fix, if needed, would be done on top of the latest version.
9:50, EEST
October 21, 2022
10:10, EEST
April 3, 2012
Hmm…
Can you show how you did get the node (or maybe the whole interaction with the filetype node)? Basically this should be uaclient.getAddressSpace().getNode(NODE_ID_HERE) with a cast to FileTypeImpl or getNode(NodeId, Class) with the FileTypeImpl.class, then calling open on that.
Since you said “Therefore i creteated a FileType”, just to doublecheck:
There is a theoretical chance that you used the constructor of FileTypeImpl, if you did: do not do that, they are only intended to be called by the SDK internally (and that one should probably be protected, though historically some of the types had public constructors, but our codegenerator nowadays makes them protected, but this type contains some manual additions and probably was not changed). Effectively if you did this, then the node misses all of it’s references and thus it will fail.
If it wasn’t that, I would need to see screenshots of the server showing the references list of the FileType instance with e.g. https://www.prosysopc.com/products/opc-ua-browser/. You can also use that to test reading a file (r-click menu shows an entry on FileType nodes). Send them to uajava-support@prosysopc.com.
Most Users Ever Online: 1919
Currently Online:
20 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: 735
Moderators: 7
Admins: 1
Forum Stats:
Groups: 3
Forums: 15
Topics: 1523
Posts: 6449
Newest Members:
rust, christamcdowall, redaahern07571, nigelbdhmp, travistimmons, AnnelCib, dalenegettinger, howardkennerley, Thomassnism, biancacraft16Moderators: Jouni Aro: 1026, Pyry: 1, Petri: 0, Bjarne Boström: 1026, Jimmy Ni: 26, Matti Siponen: 346, Lusetti: 0
Administrators: admin: 1