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: 1919
Currently Online:
21 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: 737
Moderators: 7
Admins: 1
Forum Stats:
Groups: 3
Forums: 15
Topics: 1524
Posts: 6450
Newest Members:
fannielima, kristiewinkle8, rust, christamcdowall, redaahern07571, nigelbdhmp, travistimmons, AnnelCib, dalenegettinger, howardkennerleyModerators: Jouni Aro: 1026, Pyry: 1, Petri: 0, Bjarne Boström: 1026, Jimmy Ni: 26, Matti Siponen: 346, Lusetti: 0
Administrators: admin: 1