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
FileTypeImpl Open - Method was not found
October 21, 2022
12:05, EEST
Avatar
leitmap
Member
Members
Forum Posts: 4
Member Since:
October 21, 2022
sp_UserOfflineSmall Offline

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

October 24, 2022
13:13, EEST
Avatar
Bjarne Boström
Moderator
Moderators
Forum Posts: 983
Member Since:
April 3, 2012
sp_UserOfflineSmall Offline

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.

October 24, 2022
15:37, EEST
Avatar
leitmap
Member
Members
Forum Posts: 4
Member Since:
October 21, 2022
sp_UserOfflineSmall Offline

Hello,

thanks for the fast reply.

Yes, the HasComponent Reference is correct and it is the latest version of the testserver. I also tried a second server with the same result. With fileType.open I also get the Exception.

Thank you and best regards
Martin

October 24, 2022
18:31, EEST
Avatar
Bjarne Boström
Moderator
Moderators
Forum Posts: 983
Member Since:
April 3, 2012
sp_UserOfflineSmall Offline

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.

October 25, 2022
9:50, EEST
Avatar
leitmap
Member
Members
Forum Posts: 4
Member Since:
October 21, 2022
sp_UserOfflineSmall Offline

I started the tests with the latests version (4.9.0-43) again and had the same results.

October 25, 2022
10:10, EEST
Avatar
Bjarne Boström
Moderator
Moderators
Forum Posts: 983
Member Since:
April 3, 2012
sp_UserOfflineSmall Offline

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.

October 31, 2022
12:35, EET
Avatar
leitmap
Member
Members
Forum Posts: 4
Member Since:
October 21, 2022
sp_UserOfflineSmall Offline

Yes, I used the constructor. Sorry, was not clear to me, to cast FileTypeImpl.
Thank you, now it is working.

Best regards
Martin

Forum Timezone: Europe/Helsinki

Most Users Ever Online: 518

Currently Online:
9 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

hbrackel: 135

pramanj: 86

Francesco Zambon: 81

rocket science: 77

Ibrahim: 76

Sabari: 62

kapsl: 57

gjevremovic: 49

Xavier: 43

fred: 41

Member Stats:

Guest Posters: 0

Members: 697

Moderators: 16

Admins: 1

Forum Stats:

Groups: 3

Forums: 15

Topics: 1470

Posts: 6268

Newest Members:

luzescobedo63, liliana81q, MinniePries, 42or, kaisa, sonbranson085, Pedromon, dalevine155279, Tailor, BetseyJep

Moderators: Jouni Aro: 1012, Otso Palonen: 32, Tuomas Hiltunen: 5, Pyry: 1, Petri: 0, Bjarne Boström: 983, Heikki Tahvanainen: 402, Jukka Asikainen: 1, moldzh08: 0, Jimmy Ni: 26, Teppo Uimonen: 21, Markus Johansson: 42, Niklas Nurminen: 0, Matti Siponen: 323, Lusetti: 0, Ari-Pekka Soikkeli: 5

Administrators: admin: 1