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
Version 4.1.0 throws "java.lang.IllegalArgumentException: null arg" when connecting to server
August 22, 2019
14:34, EEST
Avatar
nmnemonic
Member
Members
Forum Posts: 5
Member Since:
August 22, 2019
sp_UserOfflineSmall Offline

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.
————————————————————-

August 22, 2019
15:21, EEST
Avatar
Bjarne Boström
Moderator
Moderators
Forum Posts: 400
Member Since:
April 3, 2012
sp_UserOfflineSmall Offline

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.

September 9, 2019
11:43, EEST
Avatar
Michael Jacoby
New Member
Members
Forum Posts: 1
Member Since:
September 9, 2019
sp_UserOfflineSmall Offline

I’ve also encountered above problem. Any rough estimation on when to expect an officially released fixed version?

September 9, 2019
12:05, EEST
Avatar
Bjarne Boström
Moderator
Moderators
Forum Posts: 400
Member Since:
April 3, 2012
sp_UserOfflineSmall Offline

The release is work in process, hopefully during today.

Forum Timezone: Europe/Helsinki

Most Users Ever Online: 78

Currently Online:
12 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

hbrackel: 91

pramanj: 86

ibrahim: 68

kapsl: 57

gjevremovic: 49

TimK: 41

Fransua33: 39

fred: 36

Rainer Versteeg: 32

peterrob45: 25

Member Stats:

Guest Posters: 0

Members: 866

Moderators: 12

Admins: 1

Forum Stats:

Groups: 3

Forums: 14

Topics: 885

Posts: 3723

Newest Members:

fred, Galla, RMuth, Michael Jacoby, sanjayyadav, sanjayy, AndreasABB, RAMI4.0, nmnemonic, virgie88y3407

Moderators: Jouni Aro: 830, Otso Palonen: 32, Tuomas Hiltunen: 5, janimakela: 0, Pyry: 1, Terho: 0, Petri: 0, Bjarne Boström: 400, Heikki Tahvanainen: 402, Jukka Asikainen: 1, Teppo Uimonen: 15, Markus Johansson: 1

Administrators: admin: 0