cancel
Showing results for 
Search instead for 
Did you mean: 

Repository session authentication problem

martin_schffler
Participant
0 Kudos

Hi!

I am using Java API to connect to a MDM server and have a problem authenticating my repository session.

The following code works fine if the password is empty but fails for users that actually have a password:


	static void authenticateRepositorySession(String username, String password, ConnectionPool connectionPool, String repositorySessionId) throws CommandException {
		AuthenticateRepositorySessionCommand authCmd = new AuthenticateRepositorySessionCommand(connectionPool);
		authCmd.setSession(repositorySessionId);
		authCmd.setUserName(username);
		authCmd.setUserPassword(password);
		authCmd.execute();
	}

If the user has a password and it is correctly set the following exception is thrown:


Caused by: com.sap.mdm.internal.protocol.manual.ServerException: Ungültiges Kennwort
	at com.sap.mdm.internal.protocol.manual.AbstractProtocolCommand.execute(AbstractProtocolCommand.java:110)
	at com.sap.mdm.commands.AuthenticateRepositorySessionCommand.execute(AuthenticateRepositorySessionCommand.java:64)
	... 28 more

Has anybody a clue what the problem might be?

Accepted Solutions (0)

Answers (1)

Answers (1)

martin_schffler
Participant
0 Kudos

Some more details to encourage some answer:

The program i am implementing is a standalone Java application that extracts the schema information from an MDM server.

The version of the Java API and MDM server is MDM 5.5 SP4.

Here is how i created the repository session:


...
CreateRepositorySessionCommand sessCmd = new CreateRepositorySessionCommand(connectionPool);
sessCmd.setRepositoryIdentifier(repositoryIdentifier);
sessCmd.execute();
return sessCmd.getRepositorySession();

Perhaps there has to be done some more initialization when the user has a password?

I also tried to set the interfaceLocale but calling the method SupportedLocales.getInterfaceLocales(); throws an ErrorInInitializerException...

Any hint on the reasons for this problem are welcome.