TM1JavaAPI - Encode problem with change password

Post Reply
nickolus
Posts: 2
Joined: Mon Jan 14, 2019 3:21 pm
OLAP Product: TM1
Version: 10.2
Excel Version: 2010

TM1JavaAPI - Encode problem with change password

Post by nickolus »

Hello together,

i have a problem with the TM1JavaAPI. I try to change the password of an client. This works fine, till i try to use special characters for german language (ü,ä,ö, etc.). I think it's a problem with the encoding (utf-8 or something else). If i am not using special characters everythings works fine and the user can sign in with the changed password. If i am using special characters for german language i get no error massage but the user cannot sign in afterwards.

I am using TM1JavaAPI.jar with implementation-Version: 10.2.20400 and TM1 Version 10.2.2.

Here is my code (without error-handling):

Code: Select all

public void changePasswordTest(String hostname, String servername, String admin, String adminPassword, String client, String newClientPassword) {
 		
 		TM1Bean tm1bean;
 		TM1Server tm1server;
 		TM1Client tm1client;
 		
 		tm1bean = new TM1Bean();
 		tm1bean.setAdminHost(hostname);
 		tm1bean.setAdminPort(5495);
 		tm1bean.refreshServers();
 		
 		tm1server = tm1bean.openConnection(servername, admin, adminPassword);
 		
		tm1client = tm1server.getClient(client);
		tm1client.assignPassword(newClientPassword);
		
		tm1server.disconnect();
       		tm1bean.closeConnection(tm1server);
		
 	}
I don't know how to go one because i am still using special characters for german language with other classes of the TM1JavaAPI without any problems. For example: If i give a String value as a parameter to a TI-process i have no problems. Only with the TM1Client-Class i have this problem.

Do you have an idea. I would be very grateful for help.

Kind regards

Dominik
nickolus
Posts: 2
Joined: Mon Jan 14, 2019 3:21 pm
OLAP Product: TM1
Version: 10.2
Excel Version: 2010

Re: TM1JavaAPI - Encode problem with change password

Post by nickolus »

I found the solution. It was a problem with the properties of the TM1 Application Server.

As you can see here: https://www-01.ibm.com/support/docview. ... wg27049221

If you are using non-ASCII characters, it's necessary to delete the line -Dfile.encoding=UTF-8 in the Java-properties.
Post Reply