cancel
Showing results for 
Search instead for 
Did you mean: 

Repository Schema is null

Former Member
0 Kudos

Hi,

I am new to MDM.

While trying to fetch some record from MDM, the value returned for repositorySchema object comes as null.

The relevant code is :

GetRepositorySchemaCommand getRepositorySchemaCommand = new GetRepositorySchemaCommand(con);

getRepositorySchemaCommand.setSession(userSession);

getRepositoryRegionListCommand.execute();

RepositorySchema repositorySchema = getRepositorySchemaCommand.getRepositorySchema();

The "con" and "getRepositoryRegionListCommand" are not null . I printed them and they contain some values.

However the repositorySchema object as declared in the above code is null. If I try to do any operation on this, I get a null pointer exception.

Can someone help me sort out as to why repositorySchema comes as null.

Thanks and Regards,

Himanshu

Accepted Solutions (1)

Accepted Solutions (1)

former_member206388
Contributor
0 Kudos

Hi Himamshu.

First check whether getRepositoryRegionListCommand.execute() statement executed succesfully. Put a try catch block to find if exception are raised for that. It looks like the issue is here otherwise getRepositorySchema object cannot be null.

Regards

Bala

Former Member
0 Kudos

Hi Bala,

I tried what you suggested and getRepositoryRegionListCommand.execute() statement is running fine. No exception was caught in the catch block.

The weird thing is that a similar code written in a different DC is running fine.

Just to mention, I am trying this on a WD Project (NWDS 7.0 ) and not on a DC but I believe that should not be an issue.

Kindly suggest.

Thanks and Regards,

Himanshu

Former Member
0 Kudos

check if the APIs u are using are deprecated in the new version !

thanks

-Adrivit

former_member206388
Contributor
0 Kudos

Hi Himanshu.

Some stuff to check from your landscape.

1. Since you are working on Webdynpro environment, check if you have the correct version of MDM API Jar files attached to the Webdynpro DC equal/less than to that of MDM Server's version.

2. Make sure you have the right MDM Connector deployed in the application server.

Regards

Bala

Former Member
0 Kudos

Thanks everyone for helping.

Had to restart the MDM server and now its working fine.

Regards,

Himanshu

Answers (1)

Answers (1)

Former Member
0 Kudos

Hello Himanshu,

You are using old way of creating MDM connections.

Try to use new one which is simpler and better from future perspective.

Try to use UserSessionContext,

SessionManager.getInstance().createSession(..) and

MetadataManager.getInstance().getRepositorySchema(...)