cancel
Showing results for 
Search instead for 
Did you mean: 

Null Pointer Exception while getting the Table Ids and Field Ids

Former Member
0 Kudos

Hi all

I am trying to connect to the repository and search the Products table. Now I have created the connection,session, done the authentications (got the required regions also) but now when I am trying to get the repository schema, it is giving me NullPointerException

The piece of code is:

GetRepositorySchemaCommand repositorySchema = new GetRepositorySchemaCommand(connection);

//wdComponentAPI.getMessageManager().reportSuccess(""+repositorySchema.getRepositorySchema());

try{

TableProperties tableProperties = repositorySchema.getRepositorySchema().getTable("Products");

mainTableId = tableProperties.getId();

//mainTableId = new TableId(1);

}

I am not able to figure out the reason as I think I am connected to the repository.

Any pointers are most welcome

Thanks and Regards

Avinash

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

hi Avinash,

As you are getting NullPointerException that means pointer is locating somewhere, where he not getting data, so tell me where you are getting this error at the data manager or at the catalog.

coz problem may be that if you are importing some field then some values out of the field may be currupted or may be a blank feild so that it is not getting an value.

so please check all your field before importing.

any further queries will be appreciated.

Best Regards.

swapnil

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi

The problem got solved. I had to execute the

GetRepositorySchemaCommand first before proceding to use it.

Thanks

Avinash