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: 1032
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: 1919

Currently Online:
26 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: 728

Moderators: 7

Admins: 1

Forum Stats:

Groups: 3

Forums: 15

Topics: 1529

Posts: 6471

Newest Members:

ellis87832073466, zkxwilliemae, gabriellabachus, Deakin, KTP25Zof, Wojciech Kubala, efrennowell431, wilfredostuart, caitlynfajardo, jeromechubb7

Moderators: Jouni Aro: 1026, Pyry: 1, Petri: 0, Bjarne Boström: 1032, Jimmy Ni: 26, Matti Siponen: 349, Lusetti: 0

Administrators: admin: 1