16:48, EET
December 20, 2016
Hello together,
we have a prosys java opc client and it is connected to a open62541 server. I added a subscription to a value. It retrieves this value once and then i get following error. (WIth another prosys server it works in this way?!):
ERROR Failed to handle a complete publish message
java.lang.NullPointerException
at java.util.Objects.requireNonNull(Objects.java:203)
at java.util.Arrays$ArrayList.(Arrays.java:3813)
at java.util.Arrays.asList(Arrays.java:3800)
at com.prosysopc.ua.client.Subscription$a.(Unknown Source)
at com.prosysopc.ua.client.Subscription.onPublishResponse(Unknown Source)
at com.prosysopc.ua.client.UaClient.a(Unknown Source)
at com.prosysopc.ua.client.UaClient$a.onCompleted(Unknown Source)
at org.opcfoundation.ua.transport.impl.AsyncResultImpl$2.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Subscription goes like this:
Subscription subscription = new Subscription();
subscription.setPublishingInterval(1000);
subscription.setLifetimeCount(6400);
subscription.setMaxKeepAliveCount(10);
subscription.setPriority(0);
subscription.setPublishingEnabled(true);
MonitoredDataItem dataItem = new MonitoredDataItem(nodeID, Attributes.Value, MonitoringMode.Reporting,
subscription.getPublishingInterval());
dataItem.setDataChangeListener(gyroListener);
dataItem.setQueueSize(1);
dataItem.setSamplingInterval(1000);
subscription.addItem(dataItem);
// Add it to the client
connection.getClient().addSubscription(subscription);
The strange thing is, on UaExpert the subscription seems to work?!
Thanks,
lg
17:58, EET
April 17, 2013
Hello,
Based on this information, it seems that there’s something wrong with the available sequence numbers list that is received from the server.
We have had also previously similar kinds of issue reports originating from the open62541 toolkit (but not the exact same). Basically in these situations we would prefer to have the server side application fixed and work according to the OPC UA specification. The Prosys OPC UA Java SDK is compliance tested by OPC Foundation which guarantees a basic level of interoperability.
However, it’s probably possible to make the client side SDK handle this situation more robustly. And of course, it may also be possible that there’s a bug in the Java SDK. Could you log the same situation with logging level set to debug and send the resulting log file to uajava-support prosysopc.com mailing list?
In this situation the UaExpert seems to handle the available sequence numbers list more robustly, which explains why it works in the situation.
10:22, EET
December 20, 2016
Hi and thanks for your answer!
The debug output around the error is following:
01/18/2017 09:18:12.180 DEBUG handleNotificationDatas: isConnected=true
01/18/2017 09:18:12.181 TRACE checkServerStatus: statusCheckInterval=1000
01/18/2017 09:18:12.181 TRACE getSession: sessionChannel=org.opcfoundation.ua.application.SessionChannel@5a955565
01/18/2017 09:18:12.181 TRACE checkServerStatus: hasStatus=true commError=false isConnected=true timeToCheck=false timeToReconnect
01/18/2017 09:18:12.181 TRACE getSession: sessionChannel=org.opcfoundation.ua.application.SessionChannel@5a955565
01/18/2017 09:18:12.181 TRACE sleep
01/18/2017 09:18:12.281 TRACE queuePublishRequests: #subscriptions=1
01/18/2017 09:18:12.281 TRACE queuePublishRequests: n=2
01/18/2017 09:18:12.281 TRACE getSession: sessionChannel=org.opcfoundation.ua.application.SessionChannel@5a955565
01/18/2017 09:18:12.282 TRACE isActive: status=ServerStatusDataType: ServerStatusDataType
StartTime=01/17/17 03:04:06.1713940 GMT
CurrentTime=01/17/17 03:07:13.5303080 GMT
State=ServerState
name=Running
ordinal=0
BuildInfo=BuildInfo
ProductUri=http://open62541.org
ManufacturerName=open62541
ProductName=open62541 OPC UA Server
SoftwareVersion=0.2.0-rc2
BuildNumber=Jan 11 2017 11:16:30
BuildDate=01/01/01 00:00:00.0000000 GMT
SecondsTillShutdown=0
ShutdownReason=null
01/18/2017 09:18:12.282 DEBUG handleNotificationDatas: isConnected=true
01/18/2017 09:18:12.282 TRACE checkServerStatus: statusCheckInterval=1000
01/18/2017 09:18:12.282 TRACE getSession: sessionChannel=org.opcfoundation.ua.application.SessionChannel@5a955565
01/18/2017 09:18:12.282 TRACE checkServerStatus: hasStatus=true commError=false isConnected=true timeToCheck=false timeToReconnect
01/18/2017 09:18:12.282 TRACE getSession: sessionChannel=org.opcfoundation.ua.application.SessionChannel@5a955565
01/18/2017 09:18:12.282 TRACE sleep
01/18/2017 09:18:12.321 DEBUG tokens(1)=[SecurityToken(Id=5, secureChannelId=5, creationTime=18.01.2017 09:18:01, lifetime=600000)]
01/18/2017 09:18:12.321 DEBUG token=SecurityToken(Id=5, secureChannelId=5, creationTime=18.01.2017 09:18:01, lifetime=600000)
01/18/2017 09:18:12.322 DEBUG onCompleted: ServiceResult=GOOD (0x00000000) “” Results=null
01/18/2017 09:18:12.322 DEBUG handlePublishResponse: response=2
01/18/2017 09:18:12.323 TRACE handlePublishResponse: response=PublishResponse
ResponseHeader=ResponseHeader
Timestamp=01/17/17 03:07:13.8759040 GMT
RequestHandle=12
ServiceResult=GOOD (0x00000000) “”
ServiceDiagnostics=Diagnostic Info:
StringTable=null
AdditionalHeader=null
SubscriptionId=1
AvailableSequenceNumbers=null
MoreNotifications=false
NotificationMessage=NotificationMessage
SequenceNumber=2
PublishTime=01/17/17 03:07:13.8759040 GMT
NotificationData=null
Results=null
DiagnosticInfos=null
01/18/2017 09:18:12.323 TRACE getSession: sessionChannel=org.opcfoundation.ua.application.SessionChannel@5a955565
01/18/2017 09:18:12.323 DEBUG onPublishResponse: entering, SubscriptionID=1 SequenceNumber=2
01/18/2017 09:18:12.323 DEBUG addAvailableSequenceNumbers: lastSequenceNumber=1 seqNumbers=null
01/18/2017 09:18:12.323 ERROR Failed to handle a complete publish message
java.lang.NullPointerException
at java.util.Objects.requireNonNull(Objects.java:203)
at java.util.Arrays$ArrayList.(Arrays.java:3813)
at java.util.Arrays.asList(Arrays.java:3800)
at com.prosysopc.ua.client.Subscription$a.(Unknown Source)
at com.prosysopc.ua.client.Subscription.onPublishResponse(Unknown Source)
at com.prosysopc.ua.client.UaClient.a(Unknown Source)
at com.prosysopc.ua.client.UaClient$a.onCompleted(Unknown Source)
at org.opcfoundation.ua.transport.impl.AsyncResultImpl$2.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
01/18/2017 09:18:12.382 TRACE queuePublishRequests: #subscriptions=1
01/18/2017 09:18:12.382 TRACE queuePublishRequests: n=2
01/18/2017 09:18:12.382 TRACE getSession: sessionChannel=org.opcfoundation.ua.application.SessionChannel@5a955565
01/18/2017 09:18:12.382 TRACE isActive: status=ServerStatusDataType: ServerStatusDataType
StartTime=01/17/17 03:04:06.1713940 GMT
CurrentTime=01/17/17 03:07:13.5303080 GMT
State=ServerState
name=Running
ordinal=0
BuildInfo=BuildInfo
ProductUri=http://open62541.org
ManufacturerName=open62541
ProductName=open62541 OPC UA Server
SoftwareVersion=0.2.0-rc2
BuildNumber=Jan 11 2017 11:16:30
BuildDate=01/01/01 00:00:00.0000000 GMT
SecondsTillShutdown=0
ShutdownReason=null
01/18/2017 09:18:12.382 DEBUG handleNotificationDatas: isConnected=true
01/18/2017 09:18:12.382 DEBUG handleNotificationDatas: entry=2=[Lorg.opcfoundation.ua.builtintypes.ExtensionObject;@6ae01895
01/18/2017 09:18:12.382 DEBUG handleNotificationDatas: need Republish? lastSeqNumber=1 VS. sequenceNumber=2
01/18/2017 09:18:12.382 DEBUG handleNotificationDatas: this is Alive Notification
01/18/2017 09:18:12.382 DEBUG handleNotificationDatas: leaving, lastSequenceNumber=1 lastAlive=Wed Jan 18 09:18:12 CET 2017
01/18/2017 09:18:12.382 TRACE checkServerStatus: statusCheckInterval=1000
01/18/2017 09:18:12.382 TRACE getSession: sessionChannel=org.opcfoundation.ua.application.SessionChannel@5a955565
01/18/2017 09:18:12.382 TRACE checkServerStatus: hasStatus=true commError=false isConnected=true timeToCheck=false timeToReconnect
01/18/2017 09:18:12.382 TRACE getSession: sessionChannel=org.opcfoundation.ua.application.SessionChannel@5a955565
01/18/2017 09:18:12.382 TRACE sleep
01/18/2017 09:18:12.482 TRACE queuePublishRequests: #subscriptions=1
01/18/2017 09:18:12.482 TRACE queuePublishRequests: n=2
01/18/2017 09:18:12.482 TRACE getSession: sessionChannel=org.opcfoundation.ua.application.SessionChannel@5a955565
01/18/2017 09:18:12.482 TRACE isActive: status=ServerStatusDataType: ServerStatusDataType
StartTime=01/17/17 03:04:06.1713940 GMT
CurrentTime=01/17/17 03:07:13.5303080 GMT
State=ServerState
name=Running
ordinal=0
BuildInfo=BuildInfo
ProductUri=http://open62541.org
ManufacturerName=open62541
ProductName=open62541 OPC UA Server
SoftwareVersion=0.2.0-rc2
BuildNumber=Jan 11 2017 11:16:30
BuildDate=01/01/01 00:00:00.0000000 GMT
SecondsTillShutdown=0
ShutdownReason=null
14:40, EET
April 17, 2013
Hello,
I already answered to you by email but I’ll attach the same answer here to the forum so that others having the same issue can see the answer.
I was too quick to judge the Open62541 server, sorry about that. The issue is actually a bug in the Java SDK. I forgot to take into account the possibility that you would be using an older version of the SDK.
This is a bug that affects version 2.2.2 of the Java SDK (not earlier, not after, just that exact version). So, this was fixed by updating to a newer version.
Most Users Ever Online: 1919
Currently Online:
66 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