14:18, EET
February 2, 2017
Hi everybody,
I am trying to integrate subscriptions in our application. However, I am getting this NullpointerException with the latest Java SDK 2.3.2-781
Exception in thread “PublishRequestQueue-35cd9b7e-eadc-43f5-9299-e6ea06277fc4-0157011E” java.lang.NullPointerException
at com.prosysopc.ua.server.Session.getDiagnosticsManager(Unknown Source)
at com.prosysopc.ua.server.Session.a(Unknown Source)
at com.prosysopc.ua.server.ServiceHandler.fireRequestResponse(Unknown Source)
at com.prosysopc.ua.server.ServiceHandler.validateResponse(Unknown Source)
at com.prosysopc.ua.server.SubscriptionServiceHandler$b.run(Unknown Source)
at java.lang.Thread.run(Thread.java:662)
Is this bug already known (and hopefully fixed as well ) because the exception occurs quite frequently. I tried different OPC UA servers (Prosys, Siemens PLC and B&R PLC) and I can reproduce it with all of them.
Could you please have a look at it?
Thanks in advance and knd regards,
Clemens
15:32, EET
April 3, 2012
11:20, EET
February 2, 2017
Hi,
I am using the Prosys-OPC-UA-Java-SDK-Client-Server-Binary-2.3.2-781.jar and the Opc.Ua.Stack-1.02.337.18.jar.
After connecting to a server, I create a Subscription object
subscription = new Subscription();
subscription.setPublishingEnabled(true);
subscription.setPublishingInterval(publishingInterval, TimeUnit.MILLISECONDS);
subscription.addNotificationListener(listener);
and add MonitoredDataItems by
MonitoredDataItem dataItem = new MonitoredDataItem(item.getNodeId());
subscription.addItem(dataItem);
Finally, I add the subscription to the client. Before closing the connection to the server, I remove all subscriptions and I think this causes the exception.
19:07, EET
April 17, 2013
Hi Clemens,
Thank you for the information. Indeed, there’s a possible NPE in Session.getDiagnosticsManager() method in the latest release version. As Bjarne already mentioned, this is a server side exception.
Fortunately, this condition can only happen when the client is already disconnecting, so the error situation isn’t really catastrophic. But anyway, this is something that is important to fix.
We have already fixed this to our development version, but the fix is not officially released yet. I’ll send you a download link to the fixed version by email.
Most Users Ever Online: 1919
Currently Online:
20 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: 730
Moderators: 7
Admins: 1
Forum Stats:
Groups: 3
Forums: 15
Topics: 1529
Posts: 6471
Newest Members:
toneylapham544, rondawolinski7, Marypof5711, roycedelargie91, kourtneyquisenbe, ellis87832073466, zkxwilliemae, gabriellabachus, Deakin, KTP25ZofModerators: Jouni Aro: 1026, Pyry: 1, Petri: 0, Bjarne Boström: 1032, Jimmy Ni: 26, Matti Siponen: 349, Lusetti: 0
Administrators: admin: 1