Hi,
When i tried the following code it returns no of repositories comes under the server.
public class Repositories {
public static void main(String[] args) {
String tag = "SSSS";
ConnectionPool connections = null;
try {
connections = ConnectionPoolFactory.getInstance(tag);
} catch (ConnectionException e) {
e.printStackTrace();
return;
}
GetMountedRepositoryListCommand gr = new GetMountedRepositoryListCommand(connections);
try
{
gr.execute();
}
catch(Exception e)
{
}
MountedRepository n[] = gr.getRepositories();
MountedRepository ns;
String repositoryName="";
int repno=0;
for(int i=0;i<n.length;i++)
{
System.out.println(n<i>.getName());
}
}
I passed one of the repository name returned by above code to RepositoryIdentifier reposId = new RepositoryIdentifier("rep1", "SSSS", DBMSType.ORACLE);. But it returned the Exception com.sap.mdm.commands.CommandException: com.sap.mdm.internal.protocol.manual.ServerException: The specified MDM repository was not found on the server
at com.sap.mdm.commands.CreateRepositorySessionCommand.execute(CreateRepositorySessionCommand.java:79) when encounter the line sessionCommand.setRepositoryIdentifier(reposId );
sessionCommand.execute();
But That repository existing on that server.
Please tell me what is the solution for this?
Thanks.