Topic RSS19:00, EET
December 1, 2016
OfflineHello,
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
OfflineWe’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.
1 Guest(s)

Log In
Register