12:30, EEST
July 25, 2018
Hello,
I just upgraded the Prosys OPC UA Java SDK libs in a JavaFX application of mine. The application was using SDK version 1.4.4-6832. I upgraded to 3.1.4-514.
After upgrading and making code changes in accordance with the changes in the SDK, the application no longer works on a Windows 7 Pro SP1 machine it was running happily on previously. It works fine on my Windows 10 development machine however.
The problem seems to be in a call to UAClient.setCertificateValidator. Here is the code I have:
UaClient uaClient = new UaClient(serverUrl);
final PkiDirectoryCertificateStore certStore = new PkiDirectoryCertificateStore();
final DefaultCertificateValidator validator = new DefaultCertificateValidator(certStore);
uaClient.setCertificateValidator(validator);
The uaClient.setCertificateValidator(validator) call fails with the following exception:
java.lang.NoSuchMethodError: com.prosysopc.ua.client.UaClient.setCertificateValidator(Lorg/opcfoundation/ua/transport/security/CertificateValidator;)V
Is Win7 not supported by the client SDK anymore in version 3.* ? Again, this works fine for me in Win10 and in Win2012 Server.
Thanks in advance!
Hordur Thordarson
EFLA consulting engineers hf / Lausn hugbunadur ehf
13:39, EEST
April 17, 2013
Hello,
Thank you for the good explanation. Windows 7 is a supported platform. Actually, the Prosys OPC UA Java SDK should work in a similar way on every platform which can run Java SE applications.
Based on the error message, there’s potentially some issue which causes an older version of the SDK to be in use during runtime. At least the same error message would happen if SDK version 1.x or 2.x would be used with the mentioned code. However, these issues should be visible during compile time and I’m not sure exactly how this error happens in this situation.
When your application starts up and produces a log file on the problematic computer, does the log file state the correct SDK version such as
07/25/2018 13:29:44.451 INFO (c) Prosys OPC Ltd. <http://www.prosysopc.com>
Or maybe something different?
Also, one thing to check now in the beginning: please take the SampleConsoleClient application and run it on the problematic Windows machine. You can either use the “sampleconsoleclient.bat” which requires a JDK installation or alternatively export the project from IDE (such as Eclipse). Please report if the SampleConsoleClient works normally on the target machine.
17:51, EEST
July 25, 2018
Thank you for your suggestions, it is indeed the case that the older Prosys lib is getting loaded somehow:
818 [JavaFX Application Thread] INFO com.prosysopc.ua.UaApplication – Prosys OPC UA Java SDK v1.4.4-6832
Turns out that the JavaFX application builder in Eclipse builds into a built-app directory and during the build process all libraries and other dependencies are copied there. This directory is not deleted or cleared by the app builder so the old library was still there even though it was not part of the Eclipse project anymore.
Thank you for the quick response, everything is working good now 🙂
Most Users Ever Online: 1919
Currently Online:
15 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:
rondawolinski7, Marypof5711, roycedelargie91, kourtneyquisenbe, ellis87832073466, zkxwilliemae, gabriellabachus, Deakin, KTP25Zof, Wojciech KubalaModerators: Jouni Aro: 1026, Pyry: 1, Petri: 0, Bjarne Boström: 1032, Jimmy Ni: 26, Matti Siponen: 349, Lusetti: 0
Administrators: admin: 1