19:00, EET
December 1, 2016
Hello,
I am getting an unknown error in our client built on top of the Prosys Java stack. We are attempting to add nodes to a subscription, so we do the following:
for(SubscriptionNode node : nodesToAdd) {
AbstractMonitoredItemFactory factory =
node.isAlarmEvent() ? new MonitoredEventItemFactory() : new MonitoredDataItemFactory();
// unserialize our node id
NodeId nodeId = NodeUtilities.unserializeNodeId(node.getNodeId(), subscription.getClient(), “Subscriptions”);
// create the new monitored item
MonitoredItem monitoredItem = factory.createMonitoredItem(
nodeId, node.getAttribute(), node.getDeadbandType(),
node.getDeadbandValue(), node.getPublishingInterval()
);
if(subscription.getNotificationListeners().length == 0) {
subscription.addNotificationListener(
new EmpriseSubscriptionListener(serverId, serverDescription, serverIp));
}
// add it to the subscription
try {
MonitoredItemCreateResult result = subscription.addItem(monitoredItem);
node.setMonitoredItemId(result.getMonitoredItemId());
node.setNodeStatus(“Complete”);
node.setLastOperation(“Subscribed”);
} catch (ServiceException | StatusException e) {
log.error(“Subscriptions : {}@{} : Unable to add node- {} to subscription {}”,
serverDescription, serverIp, nodeId, subscription, e);
node.setNodeStatus(“Error”);
}
}
}
However, upon reaching “MonitoredItemCreateResult result = subscription.addItem(monitoredItem);”, we get the error:
java.lang.ClassCastException: org.opcfoundation.ua.core.DataChangeFilter cannot be cast to org.opcfoundation.ua.core.MonitoringFilterResult
I realize this has to do with the OPC UA stack, but this error is generated in com.prosysopc.ua.client.Subscription.createMonitoredItems. Does anyone know what might cause this? We are using KepServerEx 6 and UAGateway for in-house simulations. We recently upgraded to KepServerEx 6 from 5, so that could be a source of the problem, but if someone sees something that can be done programatically, locally, that would be a huge help.
11:03, EET
December 21, 2011
We’ve just got the same report from another customer using KepServerEx. And it seems it has a bug that it is returning the DataChangeFilter back in the response message instead of a MonitoringFilterResult as defined by the OPC UA Specification. I suggest that you contact Kepware about this issue in their server.
Most Users Ever Online: 518
Currently Online:
18 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: 682
Moderators: 16
Admins: 1
Forum Stats:
Groups: 3
Forums: 15
Topics: 1467
Posts: 6261
Newest Members:
digitechroshni, LouieWreve, Kickbiche, karrimacvitie5, graciela2073, sagarchau, elviralangwell4, Donnavek, Eddiefauth, DonaldPoomaModerators: Jouni Aro: 1010, 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