14:34, EEST
August 22, 2019
After upgrading from 4.0.0-774 to 4.1.0-868 my client app gets this when connecting to the server.
java.lang.IllegalArgumentException: null arg
at com.prosysopc.ua.stack.application.Application.addApplicationInstanceCertificate(SourceFile:92)
at com.prosysopc.ua.client.UaClient.A(SourceFile:5729)
at com.prosysopc.ua.client.UaClient.connect(SourceFile:857)
.
.
I assume that this is caused by the ApplicationIdentity used not having a defined KeyPair, but why is the KeyPair mandatory also when using SecurityMode.NONE ?
Prior to version 4.1 the code worked well without having to set a KeyPair.
Here is a simplified version of the sourceCode used (none of the uppercase arguments are null):
———————————————————————–
UaClient myClient = new UaClient(SERVER_URI);
ApplicationDescription appDescription = new ApplicationDescription();
appDescription.setApplicationName(new LocalizedText(APPLICATION_NAME, Locale.ENGLISH));
appDescription.setApplicationUri(APPLICATION_URI);
appDescription.setProductUri(PRODUCT_URI);
appDescription.setApplicationType(ApplicationType.Client);
ApplicationIdentity identity = new ApplicationIdentity();
identity.setApplicationDescription(appDescription);
identity.setOrganisation(ORGANIZATION);
myClient.setApplicationIdentity(identity);
myClient.setLocale(Locale.ENGLISH);
myClient.setTimeout(CONNECTION_TIMEOUT);
myClient.setSecurityMode(SecurityMode.NONE);
UserIdentity userIdentity= new UserIdentity(USERNAME, PASSWORD);
myClient.setUserIdentity(userIdentity);
myClient.connect(); // The IllegalArgumentException is thrown here.
————————————————————-
15:21, EEST
April 3, 2012
Hi,
Thanks for reporting and sorry for the issue. Seems to be a side-effect of the improvement that UaClient.getEncoderContext() can now be called before connect(). Due to changes there is now one null-check missing. Seems we need to do 4.1.2 release real soon. I can send a beta build as the issue is fixed (wont take long), send email to uajava-support@prosysopc.com if needed.
Most Users Ever Online: 1919
Currently Online:
21 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: 728
Moderators: 7
Admins: 1
Forum Stats:
Groups: 3
Forums: 15
Topics: 1529
Posts: 6471
Newest Members:
roycedelargie91, kourtneyquisenbe, ellis87832073466, zkxwilliemae, gabriellabachus, Deakin, KTP25Zof, Wojciech Kubala, efrennowell431, wilfredostuartModerators: Jouni Aro: 1026, Pyry: 1, Petri: 0, Bjarne Boström: 1032, Jimmy Ni: 26, Matti Siponen: 349, Lusetti: 0
Administrators: admin: 1