Avatar

Please consider registering
guest

sp_LogInOut Log In sp_Registration Register

Register | Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

sp_Feed Topic RSS sp_TopicIcon
SDK 3.1.4 not working on Windows 7 Pro SP1
July 25, 2018
12:30, EEST
Avatar
hordurth
Member
Members
Forum Posts: 3
Member Since:
July 25, 2018
sp_UserOfflineSmall Offline

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

July 25, 2018
13:39, EEST
Avatar
Heikki Tahvanainen
Moderator
Members

Moderators
Forum Posts: 402
Member Since:
April 17, 2013
sp_UserOfflineSmall Offline

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.450 INFO Prosys OPC UA Java SDK v3.1.4-514
07/25/2018 13:29:44.451 INFO (c) Prosys OPC Ltd. <http://www.prosysopc.com&gt;

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.

July 25, 2018
17:51, EEST
Avatar
hordurth
Member
Members
Forum Posts: 3
Member Since:
July 25, 2018
sp_UserOfflineSmall Offline

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 🙂

July 25, 2018
18:00, EEST
Avatar
Heikki Tahvanainen
Moderator
Members

Moderators
Forum Posts: 402
Member Since:
April 17, 2013
sp_UserOfflineSmall Offline

Great, good to hear that the issue was solved. And better yet, there was a logical explanation 🙂

Forum Timezone: Europe/Helsinki

Most Users Ever Online: 518

Currently Online:
16 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

hbrackel: 135

pramanj: 86

Francesco Zambon: 81

rocket science: 77

Ibrahim: 76

Sabari: 62

kapsl: 57

gjevremovic: 49

Xavier: 43

fred: 41

Member Stats:

Guest Posters: 0

Members: 681

Moderators: 16

Admins: 1

Forum Stats:

Groups: 3

Forums: 15

Topics: 1467

Posts: 6261

Newest Members:

graciela2073, sagarchau, elviralangwell4, Donnavek, Eddiefauth, DonaldPooma, fidelduke938316, Jan-Pfizer, DavidROunc, fen.pang@woodside.com

Moderators: Jouni Aro: 1010, Otso Palonen: 32, Tuomas Hiltunen: 5, Pyry: 1, Petri: 0, Bjarne Boström: 983, Heikki Tahvanainen: 402, Jukka Asikainen: 1, moldzh08: 0, Jimmy Ni: 26, Teppo Uimonen: 21, Markus Johansson: 42, Niklas Nurminen: 0, Matti Siponen: 321, Lusetti: 0, Ari-Pekka Soikkeli: 5

Administrators: admin: 1