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
onDataChange at Kepware OPC UA Server issue
October 19, 2021
11:56, EEST
Avatar
Oleksandr
Member
Members
Forum Posts: 31
Member Since:
February 14, 2020
sp_UserOfflineSmall Offline

Hello,
can you give an indication of what could be the cause of the error?
The error also occurs after the network failure in the case of a date change event when the value changes from “null” to any. The other changes did not fail.
Thank you in advance.

14-10-2021 14:33:42.718 [ERROR] com.prosysopc.ua.dient.Monitoredltem:417 – Exception while calling onDataChange with listener=com.itac.plcconnectorV2.opcua.dient.DataItemListener@112c93de j ava.lang.NullPointerException
at com.itac.plcconnectorV2.opcua.dient.OpcUaClient.nodeChanged(OpcUaClient.java:557)
at com.itac.plcconnectorV2.opcua.dient.DataltemListener.onDataChange(DataltemListener.java:26)
at com.prosysopc.ua.dient.MonitoredDataltem.fireDataChange(SourceFile:415)
at com.prosysopc.ua.dient.MonitoredDataltem.setValue(SourceFile:443)
at com.prosysopc.ua.dient.Subscription.a(SourceFile:1361)
at com.prosysopc.ua.dient.Subscription.handleNotificationDatas(SourceFile:1925) at com.prosysopc.ua.dient.UaClientSa.aF(SourceFile:362) at com.prosysopc.ua.dient.UaClientSa.run(SourceFile:248) at java.lang.Thread.run(Thread.java:748)
14-10-2021 14:33:49.718 [ERROR] com.prosysopc.ua.dient.Monitoredltem:417 – Exception while calling onDataChange with listener=com.itac.plcconnectorV2.opcua.dient.DataItemListener@34c03c59 j ava.lang.NullPointerException
at com.itac.plcconnectorV2.opcua.dient.OpcUaClient.nodeChanged(OpcUaClient.java:557)
at com.itac.plcconnectorV2.opcua.dient.DataltemListener.onDataChange(DataltemListener.java:26)
at com.prosysopc.ua.dient.MonitoredDataltem.fireDataChange(SourceFile:415)
at com.prosysopc.ua.dient.MonitoredDataltem.setValue(SourceFile:443)
at com.prosysopc.ua.dient.Subscription.a(SourceFile:1361)
at com.prosysopc.ua.dient.Subscription.handleNotificationDatas(SourceFile:1925) at com.prosysopc.ua.dient.UaClientSa.aF(SourceFile:362) at com.prosysopc.ua.dient.UaClientSa.run(SourceFile:248) at java.lang.Thread.run(Thread.java:748)

October 19, 2021
12:44, EEST
Avatar
Jouni Aro
Moderator
Moderators
Forum Posts: 1009
Member Since:
December 21, 2011
sp_UserOfflineSmall Offline

Please, check your own event handler at

com.itac.plcconnectorV2.opcua.dient.OpcUaClient.nodeChanged(OpcUaClient.java:557)

Maybe it is not expecting any null values.

October 20, 2021
18:50, EEST
Avatar
Oleksandr
Member
Members
Forum Posts: 31
Member Since:
February 14, 2020
sp_UserOfflineSmall Offline

Thank you for your quick reply.
Our code is unfortunately quite outdated and no longer predictable.
That only happens with OPC UA Server KepwareEX 6.0 after reconect and not at the first connect.
And what is done in the line com.prosysopc.ua.dient.Monitoredltem: 417?

October 21, 2021
10:29, EEST
Avatar
Jouni Aro
Moderator
Moderators
Forum Posts: 1009
Member Since:
December 21, 2011
sp_UserOfflineSmall Offline

This is the method that is calling your listener. It’s actually in MonitoredDataItem:

protected void fireDataChange(DataValue prevValue, DataValue newValue) {
if (dataChangeListener != null) {
try {
dataChangeListener.onDataChange(this, prevValue, newValue);
} catch (Exception e) {
logger.error("Exception while calling onDataChange with listener=" + dataChangeListener, e);
}
}
}
Forum Timezone: Europe/Helsinki

Most Users Ever Online: 518

Currently Online:
14 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

hbrackel: 135

pramanj: 86

Francesco Zambon: 81

ibrahim: 75

rocket science: 75

Sabari: 62

kapsl: 57

gjevremovic: 49

Xavier: 43

TimK: 41

Member Stats:

Guest Posters: 0

Members: 707

Moderators: 16

Admins: 1

Forum Stats:

Groups: 3

Forums: 15

Topics: 1466

Posts: 6253

Newest Members:

christi10l, ahamad1, Flores Frederick, ellenmoss, harriettscherer, shanonhumphreys, KupimotoblokfuB, tamhollander5, paulinafcf, bridgette18l

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

Administrators: admin: 1