cancel
Showing results for 
Search instead for 
Did you mean: 

Error while conecting to repository

0 Kudos

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!

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

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

Former Member
0 Kudos

Manchari,

Check the following things, hope it might help you

  1. Make sure you have added server IP address into allow.ip file.
  2. Check the location of allow.ip file, it must be in exe folder of MDM directory. You can check the location this file, if it is not default in MDS.ini under "TrunstedFilesDir" property.
  3. If possible then take a complete restart MDM server including database, below are the steps:
    • Stop Repository
    • Stop MDM/IS/SS servers
    • Stop Database server
    • Start Database server
    • Start MDM/IS/SS servers
    • Verify and Repair repository
    • Start repository
  4. Check, if the location of MDS.ini is default or not.
  5. Config folder under MDM server directory should not have multiple MDS.ini files. Sometimes, basis consultants create multiple copies as a backup.
  6. Hope, you have added the correct API jar files to your project.
  7. Try to establish the connection with different user.
  8. Try to restart WAS also, if nothing works.

Thx/ -Tarun

Former Member
0 Kudos

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

Former Member
0 Kudos

Hi,

I am also facing same issue.

Is any one got the answer of it.

Regards,

Sunil Patil.