on 08-10-2012 12:07 PM
Hi,
I am connecting to MDM repository using the below code
_repositoryBean = new RepositoryBean();
try{
//wdThis.wdGetSearchCompInterface().setRepositoryBean(repositoryBean);
wdThis.wdGetSupplierDetailsRecordDetailsInterface().setRepositoryBean(_repositoryBean);
wdThis.wdGetSupplierDetailsRecordDetailsInterface().setConfiguration("MDM_SBX","Supplier Details");
}
catch (Exception e) {
e.printStackTrace();
}
RepositorySchemaEx repositorySchemaEx = MetadataManager.getInstance().getRepositorySchema(_repositoryBean.getUserSessionContext());
Getting error after deployment "java.lang.NullPointerException: while trying to invoke the method com.sap.mdm.session.RepositorySessionContext.getUserName() of an object loaded from local variable '<1>'"
In the default trace I found this message "Can not connect with UserSessionContext to repository 'Global_Supplier_Master' on the server '172.16.3.151:59946'., Can not connect with UserSessionContext to repository 'Global_Supplier_Master' on the server '172.16.3.151:59946'., Can not resolve JCA connection. Cause exception: Connection Failed: Cannot create JCA connection. Cause exception: Failed to create MDM session: MDM server='172.16.3.151:59946', repository='Global_Supplier_Master'. Problem can not be localized due to Java API CommandExceptin: com.sap.mdm.internal.protocol.manual.ServerException: User not found, error code: CommandException, com.sap.mdm.internal.protocol.manual.ServerException: User not found"
Please help!
Hi,
The issue is you are setting repository bean before setting configuration.
Just change your java code as follow and it will work.
_repositoryBean = new RepositoryBean();
try{
wdThis.wdGetSupplierDetailsRecordDetailsInterface().setConfiguration("MDM_SBX","Supplier Details");
wdThis.wdGetSupplierDetailsRecordDetailsInterface().setRepositoryBean(_repositoryBean);
}
catch (Exception e) {
e.printStackTrace();
}
This is work for me.
Thanks and Regards,
Sunil PAtile
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Manchari,
Check the following things, hope it might help you
Thx/ -Tarun
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Says, user not found.
first
go and check with you MDM Guy if your user credentials are valid or if you have data manager login, check with those credential if you are able to and connect to the repository.
rgds,
venu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
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.