23:24, EEST
March 16, 2017
Hi.
we have some Problem when connecting to a Rockwell OpcUa Server using the Client SDK 3.1.2
Security Mode is BASIC128RSA15_SIGN_ENCRYPT
The Server accepts Anonymous conecction so we do not have a UserIdentity set.
The last logging we see from the SDK is ‘UaClient|DEBUG|connect’ – after this logging, the NPE occurs.
2019-06-12 07:57:15,742|OpcUaService |INFO |Using ServerURI opc.tcp://somehostname:4990/FactoryTalkLinxGateway1
2019-06-12 07:57:15,921|UaApplication |INFO |Prosys OPC UA Java SDK v3.1.2-488
2019-06-12 07:57:16,122|UaApplication |DEBUG|java.home=C:\Program Files (x86)\Java\jre1.8.0_161
2019-06-12 07:57:16,581|OpcUaService |INFO |Using SecurityMode BASIC128RSA15_SIGN_ENCRYPT
2019-06-12 07:57:16,828|UaClient |DEBUG|connect
java.lang.NullPointerException
at com.prosysopc.ua.client.UaClient.z(SourceFile:5228)
at com.prosysopc.ua.client.UaClient.connect(SourceFile:769)
Can you tell what the UaClient does in connect(SourceFile:769) and z(SourceFile:5228)
Is it possibly a problem with the Application certificate?
In other cases (where everything works), the log continues with the CrytoUtil after UaClient.connect
2019-06-12 21:13:51,025|UaClient |DEBUG|connect
2019-06-12 21:13:55,347|CryptoUtil |DEBUG|CryptoUtil init
Thanks for your help!
10:04, EEST
April 3, 2012
10:38, EEST
March 16, 2017
Thanks for your reply.
In the short way it’s not possible to update to 4.0.2.
One of our customers reported the problem when he uses our application to make a connection to this server. It is not easy to test it directly at the customer because of several IT security restrictions.
I’ve tested it with same security settings (but using a different application certificate and private key) against the Prosys Simulation Server and in this case, the connection works without problems. So in general there seems to be not a problem in our code.
Do you have the possibility to find out what exactly can cause the NPE at com.prosysopc.ua.client.UaClient.z(SourceFile:5228) ?
12:35, EEST
April 3, 2012
That would seem to happen if the ApplicationIdentity of the UaClient is set to null (the method in question initializes the lower layer client object which is used to send requests to the server with the getKeys() from the ApplicationIdentity). That is somewhat weird as it is non-null by default nor it should never be set to null, but if you have for some reason called UaClient.setApplicationIdentity(null) it would give that error.
If that didn’t resolve the case, could you try logging with the TRACE log level for both the SDK (com.prosysopc.ua) and the Stack layer (org.opcfoundation.ua). Note that the log can be quite large so it is best to redirect it to a file and send that to us via email (uajava-support@prosysopc.com), if possible.
Most Users Ever Online: 1919
Currently Online:
31 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: 729
Moderators: 7
Admins: 1
Forum Stats:
Groups: 3
Forums: 15
Topics: 1529
Posts: 6471
Newest Members:
Marypof5711, roycedelargie91, kourtneyquisenbe, ellis87832073466, zkxwilliemae, gabriellabachus, Deakin, KTP25Zof, Wojciech Kubala, efrennowell431Moderators: Jouni Aro: 1026, Pyry: 1, Petri: 0, Bjarne Boström: 1032, Jimmy Ni: 26, Matti Siponen: 349, Lusetti: 0
Administrators: admin: 1