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
ERROR From ObjectUtils / _printfieldsDeep
March 21, 2022
10:24, EET
Avatar
Hendrik Ulbrich
Member
Members
Forum Posts: 14
Member Since:
June 27, 2018
sp_UserOfflineSmall Offline

Hello all,

we have implemented an OPC server that dynamically publishes and processes methods. For this we also use our own DynamicStructures which are generated at runtime (from a config). Actually everything works fine. When writing the output arguments (Variant[] outputs) in the MethodManagerListener I always get the following error message:

ERROR From ObjectUtils / _printfieldsDeep

However, the call and the response to the PLC work successfully. Background:

The program saves the StructureSpecification Object of the method for the OutputArguments. I then use the following call (simplified) to write the outputs:

DynamicStructure value = new DynamicStructure(this.dynamicOut.getStructure());
value.set(“number”, 5);
value.set(“text”, “string”);
outputs[0] = new Variant(value);

Is this not how it is supposed to be?

March 21, 2022
13:38, EET
Avatar
Bjarne Boström
Moderator
Moderators
Forum Posts: 983
Member Since:
April 3, 2012
sp_UserOfflineSmall Offline

Hi,

Thanks for the note.

Unless you specifically want to TRACE log com.prosysopc.ua.stack.transport.tcp.nio.OpcTcpServerConnection, you can ignore it as a cosmetic bug. This also should only happen if that class is on TRACE level (unless you have called the ObjectUtils.printFieldsDeep yourself). You most likely wont want to have it on TRACE by default, as it would output very much log.

Technical reason is that apparently the original developers of the “Java Stack” have decided to use system out as the error handling there … we should fix that in some future version …

Anyway, in the past I believe Structure toString implementations used that method, but nowadays everything bases on AbstractStructure and it’s toString uses the StructureSpecification etc. thus basically the ObjectUtils.printFieldsDeep is not needed anymore.

Also, that method would have had problems with custom Structures, as it would lack the access to the EncoderContext, … I wont be debugging this further as I do not see need (correct if there is), but maybe something like that happened (most likely it was an array and it tried to use MultiDimensionArrayUtils.toString(Object object), which also lacks the context, though nowadays there is toString(Object object, EncoderContext ctx) overload).

Forum Timezone: Europe/Helsinki

Most Users Ever Online: 518

Currently Online: ibrahim
26 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

hbrackel: 135

pramanj: 86

Francesco Zambon: 81

rocket science: 77

ibrahim: 75

Sabari: 62

kapsl: 57

gjevremovic: 49

Xavier: 43

fred: 41

Member Stats:

Guest Posters: 0

Members: 680

Moderators: 16

Admins: 1

Forum Stats:

Groups: 3

Forums: 15

Topics: 1467

Posts: 6259

Newest Members:

sagarchau, elviralangwell4, Donnavek, Eddiefauth, DonaldPooma, fidelduke938316, Jan-Pfizer, DavidROunc, fen.pang@woodside.com, aytule

Moderators: Jouni Aro: 1009, 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: 321, Lusetti: 0, Ari-Pekka Soikkeli: 5

Administrators: admin: 1