on 08-07-2007 1:13 PM
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?
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
78 | |
9 | |
9 | |
7 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.